-
Notifications
You must be signed in to change notification settings - Fork 35
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
Dominant Macros #6
Comments
marcioAlmada
added a commit
that referenced
this issue
Jan 4, 2016
marcioAlmada
added a commit
that referenced
this issue
Jan 4, 2016
marcioAlmada
added a commit
that referenced
this issue
Jan 26, 2016
✅ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, by default, a macro backtracks if it's pattern is not fulfilled. But in many cases it would be useful to prevent backtracking after a given entry point is reached.
The idea is to use a single
·
(middle dot) to denote a "point of no return" in a macro pattern, as in:So any wrong usage of the macro after the arbitrary entry point would throw some variant of syntax error:
I'm still unsure if this is a reasonable way to implement dominant macros. Maybe "dominant" should be the default behavior and a tag to allow backtracking (
macro ·allow_backtrack {...} >> {...}
) could be a better option.The text was updated successfully, but these errors were encountered: