We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attributes restrict the possible values a syntax tree node can have in given properties.
class LetDeclaration extends SyntaxTreeNode { static pattern = new Caten( new Maybe( new Equals('topLevel', true), 'export', ), 'let', 'identifier', '=', '...', ); } // Allows matching "export let foo = ..." Match('variable', LetDeclaration, { topLevel: true }) // Does not match "export let foo = ..." Match('variable', LetDeclaration, { topLevel: false }) // Grammar conflict between reducing with `topLevel: false` and `topLevel: true`. Match('variable', LetDeclaration)
Attributes can be nested and can restrict nested syntax tree nodes.
Match('prop', Symbol, { variable: { topLevel: true } })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Attributes restrict the possible values a syntax tree node can have in given properties.
Attributes can be nested and can restrict nested syntax tree nodes.
The text was updated successfully, but these errors were encountered: