Skip to content

Checks for stmt/expr sub-patterns #8

@quasilyte

Description

@quasilyte

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions