TypeScript-Compiler-Notes/codebase/src/compiler/parser.md at main · microsoft/TypeScript-Compiler-Notes · GitHub
Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 621 Bytes

parser.md

File metadata and controls

21 lines (12 loc) · 621 Bytes

0: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/program.ts#L1926# Parser

At a measly 8k lines long, the Parser is responsible for controlling a scanner (or two) and turning the output tokens from the scanner into an AST as the canonical representation of the source file.

JSDoc

Context

Because the parser itself is effectively a state machine which creates nodes from scanning text there is some reasonable dancing

`