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

$_ binding #9

Open
kazcw opened this issue Oct 10, 2018 · 0 comments
Open

$_ binding #9

kazcw opened this issue Oct 10, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@kazcw
Copy link
Owner

kazcw commented Oct 10, 2018

$_ is a special binding that:

  1. doesn't require a type specification
  2. doesn't constrain multiple $_ in a pattern to be equal

Because metavars need to be transformed to placeholder expressions of the appropriate type before parsing in a non extend-parser implementation, (1) is a little tricky. I'm thinking of just trying a parse of each possible metavar type and going with the most general that succeeds (i.e. capture the highest possible node in the ast).

@kazcw kazcw added the enhancement New feature or request label Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant