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

renderer AST #81

Merged
merged 0 commits into from Dec 18, 2020
Merged

renderer AST #81

merged 0 commits into from Dec 18, 2020

Conversation

harttle
Copy link
Member

@harttle harttle commented Dec 16, 2020

让 expr-compiler、anode-compiler、element-compiler、renderer-compiler 和目标语言无关。

  • san 组件 -> renderer AST -> renderer JavaScript code
  • san-ssr-target-php 不再需要重写上述几个 compiler 了。
  • src/optimizers 可以对完整的 AST 做优化,此前只能一边输出一边优化。(更灵活,或者写起来更 SoC)
  • Literal、Identifier 封装了转义过程,emitter 比原来更不容易写错(避免了在 js 里写 js code string)。

兼容性:对 san-ssr-target-php 是 BREAKING,对使用 san-ssr 的编译插件/命令行是向下兼容的。

@harttle harttle force-pushed the refactor-ast branch 3 times, most recently from 46889ea to e91da37 Compare December 18, 2020 10:37
@harttle harttle merged commit e91da37 into master Dec 18, 2020
@github-pages github-pages bot temporarily deployed to github-pages December 18, 2020 10:48 Inactive
@github-actions
Copy link

🎉 This PR is included in version 4.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant