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

Checks for stmt/expr sub-patterns #8

Open
quasilyte opened this issue Jan 4, 2018 · 0 comments
Open

Checks for stmt/expr sub-patterns #8

quasilyte opened this issue Jan 4, 2018 · 0 comments
Milestone

Comments

@quasilyte
Copy link
Collaborator

Give an error if sub-pattern that expects expression gets statement matcher.

For example, (+ a b) expects both a and b to be expressions.
Pattern like (+ (if ...) (for ...)) will never match.

Error should be given at compile-time and read like:

compile pattern: "(+ (block 1) 2)"
error: "arg 0: (block 1) is not an expression in (+ (block 1) 2)"

The exact error message may differ.

@quasilyte quasilyte added this to the alpha v0.9 milestone Jan 6, 2018
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