Returns the root of the AST.
Returns the diagnostics collected while preprocessing and parsing.
Releases the native resources owned by the parser.
Calling dispose more than once is allowed, the AST and the tokens of a
disposed parser must not be used.
Generates code in the given format.
the output format.
the generated code, a Uint8Array when the format is obj and a
string for the textual formats.
Returns the handle of the translation unit.
StaticparseParses the given source code.
the source code to parse and the include resolvers.
the parsed translation unit.
A parsed translation unit.
Instances are created by Parser.parse, so a
Parseris always fully parsed and every accessor is synchronous.The AST and the tokens are owned by the parser, they must not be used after the parser has been disposed.