Skip to content

Conversation

@iwoplaza
Copy link
Contributor

@iwoplaza iwoplaza commented Dec 16, 2025

This PR adds a few changes:

  • Instead of passing around an array of tokens in the parser, it's now a Tokens object with a cursor. This change was motivated by a comment suggesting this change, as well as the need for a way to signal if a parsed statement contained a directive.
  • When parsing, in-statement preprocessor directives are ignored, and the encounteredMacro flag is set to true. If this flag is on after a statement is parsed, the tokens are rearranged, and the resulting tokens are reparsed as a set of statements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants