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

Auto-group syntax parsers where necessary #1229

Merged
merged 4 commits into from Jun 28, 2022
Merged

Conversation

Kha
Copy link
Member

@Kha Kha commented Jun 18, 2022

No description provided.

@@ -54,7 +54,7 @@ macro "left" : conv => `(lhs)
macro "right" : conv => `(rhs)
macro "intro " xs:(colGt ident)* : conv => `(ext $xs*)

syntax enterArg := ident <|> group("@"? num)
syntax enterArg := ident <|> ("@"? num)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a separate pitfall: <|> is an operator on two stx, not stx+. I think we would need to change all occurrences of stx+ to sepBy1(stx+, " <|> ") to fix this.

Comment on lines +180 to +182
-- as usual, we assume that people using `Parser` know what they are doing
let stackSz := 1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be resolved when we parameterize Parser with stackSz... :)

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.

None yet

2 participants