Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
docs: polish
Browse files Browse the repository at this point in the history
  • Loading branch information
suica authored and mysteryven committed Nov 14, 2023
1 parent c4f9f37 commit ac6f6c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion i18n/zh/docusaurus-plugin-content-docs/current/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ https://github.com/swc-project/swc/blob/554b459e26b24202f66c3c58a110b3f26bbd13cd

表达式的语法嵌套深且递归,这可能会导致长表达式时出现堆栈溢出(例如[这个 TypeScript 测试](https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/binderBinaryExpressionStressJs.ts))。

为了避免递归,我们可以使用一种称为"Pratt Parsing"的技术。可以在这里找到更深入的教程[Pratt Parsing](https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html),此文作者同时也是Rust-Analyzer的作者。
为了避免递归,我们可以使用"Pratt Parsing"。可以在这里找到更深入的教程[Pratt Parsing](https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html),此文作者同时也是Rust-Analyzer的作者。
Rome中的Rust版本在[Rome](https://github.com/rome/tools/blob/5a059c0413baf1d54436ac0c149a829f0dfd1f4d/crates/rome_js_parser/src/syntax/expr.rs#L442)

## 列表
Expand Down

0 comments on commit ac6f6c0

Please sign in to comment.