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

APIReference-Language.md #73

Merged
merged 2 commits into from
Aug 10, 2017
Merged

APIReference-Language.md #73

merged 2 commits into from
Aug 10, 2017

Conversation

0x0042
Copy link

@0x0042 0x0042 commented Aug 8, 2017

close #17.

@0x0042
Copy link
Author

0x0042 commented Aug 8, 2017

@sqrthree 可以校对了。

@linhe0x0 linhe0x0 mentioned this pull request Aug 8, 2017
@0x0042 0x0042 changed the title Translate APIReference-Language.md APIReference-Language.md Aug 8, 2017

### lex
### 词法分析
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 lex 是函数名,保留不翻译

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


### parse
### 解析
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

保留不翻译+1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ydfzgyj 根据 wiki 中 不需要保留英文的关键词 中『parser』不需要保留英文,直接翻译。那么『parse』是不是也应该采取同样的策略呢?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

并非是因为需要保留英文而不翻译,而是因为这里的标题是作为 API 文档中的函数名出现,所以不翻译 @sqrthree

Copy link
Member

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 返回。
Copy link
Collaborator

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: 跳过访问该节点
Copy link
Collaborator

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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下边一行的 Printer 加粗

Copy link
Member

@linhe0x0 linhe0x0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


### lex
### 词法分析
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


### parse
### 解析
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ydfzgyj 根据 wiki 中 不需要保留英文的关键词 中『parser』不需要保留英文,直接翻译。那么『parse』是不是也应该采取同样的策略呢?

@0x0042
Copy link
Author

0x0042 commented Aug 10, 2017

感谢 @ydfzgyj 建议,已修改。

@linhe0x0 linhe0x0 merged commit f425d8d into xitu:zh-Hans Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APIReference-Language.md
3 participants