Skip to content

How to create a pure, synchronous and serializable parser? #1326

Closed Answered by msujew
jindong-zhannng asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @jindong-zhannng,

If you just need an AST (without cross reference resolution, diagnostics, etc.), you can just invoke the parser:

const parseResult = services.parser.Parser.parse(program);

The parser is sync. Note that in order to resolve cross references, the async DocumentBuilder API needs to be used.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@jindong-zhannng
Comment options

@msujew
Comment options

@jindong-zhannng
Comment options

@jindong-zhannng
Comment options

@msujew
Comment options

Answer selected by jindong-zhannng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants