Repository navigation
Commit 7322fa8
refactor(javascript): type the nodes the syntax parser builds
Replace EXPECTED_ANY in lib/javascript/syntax-parser.js with node
typedefs declared in the parser itself, named and shaped as ESTree's.
startNode returns an UnfinishedNode whose fields keep their real types,
and finishNode returns the exact node. The typedefs are @internal: the
types generator writes them as any, so types.d.ts keeps main's public
signatures.1 parent 57c5e87 commit 7322fa8
7 files changed
Lines changed: 2180 additions & 1214 deletions
File tree
- lib/javascript
- test/unitCases
- tooling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1784 | 1784 | | |
1785 | 1785 | | |
1786 | 1786 | | |
1787 | | - | |
| 1787 | + | |
1788 | 1788 | | |
1789 | | - | |
| 1789 | + | |
1790 | 1790 | | |
1791 | 1791 | | |
1792 | 1792 | | |
| |||
0 commit comments