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
There should be a way to reference pattern that was defined before in the rule. like in regex /(foo)\1/:
An example is a rule that matches any XML tag.
start = "<" tag:[\w]+ ">" text:[\s\S]* "</" tag ">" { return { tag: tag.join(''), text: text.join('') }; }
my actual use case is adding heredocs:
heredoc = "<<<" marker:[\w]+ "\n" text:[\s\S]+ "\n" marker { return text.join(''); }
Expected behavior:
I expect to be able to use tag pattern that was defined in the same rule.
Actual behavior:
got error Line 1, column 40: Rule "tag" is not defined.
Line 1, column 40: Rule "tag" is not defined.
The text was updated successfully, but these errors were encountered:
peg.js has been abandoned, so this feature probably won't be implemented.
Sorry, something went wrong.
@jarble I know, see discussion on a maintained fork - peggyjs/peggy#194
No branches or pull requests
Issue type
Prerequisites
Description
There should be a way to reference pattern that was defined before in the rule. like in regex /(foo)\1/:
Steps to Reproduce
An example is a rule that matches any XML tag.
my actual use case is adding heredocs:
Expected behavior:
I expect to be able to use tag pattern that was defined in the same rule.
Actual behavior:
got error
Line 1, column 40: Rule "tag" is not defined.
Software
The text was updated successfully, but these errors were encountered: