Skip to content
New issue

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

Add <=tag some > capture variables #21

Open
rwxrob opened this issue Nov 8, 2022 · 0 comments
Open

Add <=tag some > capture variables #21

rwxrob opened this issue Nov 8, 2022 · 0 comments

Comments

@rwxrob
Copy link
Owner

rwxrob commented Nov 8, 2022

Often a variable needs to be captured so that it can be used later in the same rule. This syntax begins with a regular capture angle bracket, but is immediately followed by a colon and an identifier that can be used only during the rest of that rule definition. Use of capture variables should be discouraged when creating an actual rule is clearer, but without capture variables we can never create rules for opening tokens of varying length and match that same token later (~~~ in Markdown, etc.).

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

No branches or pull requests

1 participant