-
Notifications
You must be signed in to change notification settings - Fork 51
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
APIReference-Language.md #73
Conversation
@sqrthree 可以校对了。 |
|
||
### lex | ||
### 词法分析 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 lex 是函数名,保留不翻译
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@llp0574 可参考 需要保留英文的关键词
|
||
### parse | ||
### 解析 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
保留不翻译+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ydfzgyj 根据 wiki 中 不需要保留英文的关键词 中『parser』不需要保留英文,直接翻译。那么『parse』是不是也应该采取同样的策略呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
并非是因为需要保留英文而不翻译,而是因为这里的标题是作为 API 文档中的函数名出现,所以不翻译 @sqrthree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好哒
When using visit() to edit an AST, the original AST will not be modified, and | ||
a new version of the AST with the changes applied will be returned from the | ||
visit function. | ||
当使用 `visit()` 编辑一个 AST 的时候,原始的 AST 不会被修改,`visit` 函数会生成一个经过修改的新版本 AST 返回。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“visit
函数会生成一个经过修改的新版本 AST 返回”=>“visit
函数会返回一个经过修改的新版本 AST”
// null: delete this node | ||
// any value: replace this node with the returned value | ||
// undefined: 无操作 | ||
// false: 跳过访问该节点 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是 no action
</a> | ||
</li> | ||
<li> | ||
<a href="#break"> | ||
<pre>var BREAK</pre> | ||
A token to allow breaking out of the visitor. | ||
用于允许中断访问方法的 token。 | ||
</a> | ||
</li> | ||
</ul> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下边一行的 Printer 加粗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
### lex | ||
### 词法分析 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@llp0574 可参考 需要保留英文的关键词
|
||
### parse | ||
### 解析 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ydfzgyj 根据 wiki 中 不需要保留英文的关键词 中『parser』不需要保留英文,直接翻译。那么『parse』是不是也应该采取同样的策略呢?
感谢 @ydfzgyj 建议,已修改。 |
close #17.