Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vz g] Mermaid ER diagram As Template Variable #11

Open
personball opened this issue Nov 28, 2023 · 1 comment
Open

[vz g] Mermaid ER diagram As Template Variable #11

personball opened this issue Nov 28, 2023 · 1 comment
Assignees
Labels
high-priority vz g For subcommand vz generate

Comments

@personball
Copy link
Owner

Is your feature request related to a problem? Please describe.

支持从 Markdown 文件中提取(或纯文本的 mermaid 片段)作为模板变量,以自动生成对应的业务代码(如根据ER图和类图生成orm实体)

Describe the solution you'd like

基于 mermaid 自带的 jison 语法文件,结合 jison 库中的 csharp parser 适配机制 生成 csharp parser,并提供 parse result 作为模板变量使用。

jison php port readme

ps: 可以考虑适当扩展一些语法(比如从注释中自定义),以实现更多更灵活的控制

@personball personball self-assigned this Nov 28, 2023
@personball personball changed the title Mermaid ER diagram As Template Variable [vz g] Mermaid ER diagram As Template Variable Nov 28, 2023
@personball personball added vz g For subcommand vz generate high-priority and removed enhancement labels Nov 28, 2023
@personball
Copy link
Owner Author

personball commented Dec 13, 2023

bison 调研和入门:

栗子

target:

  • 短期可用:通过 mermaidjs 导出 c4、classDiagram、erDiagram 的 json 数据
  • 长期目标:实现bison4net,lexer可以考虑引入 %include 机制(lex rules 的DRY)

排除现有实现:

  • csly: 语法过于个性,lex 和 grammar 规则通过代码来表达,grammar 展开采用右递归

todo:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority vz g For subcommand vz generate
Projects
None yet
Development

No branches or pull requests

1 participant