Skip to content

[feature] allow ERROR node in pattern to match everything #1791

@HerringtonDarkholme

Description

@HerringtonDarkholme

⭐ Suggestion

It is quite common people are writing half, partial code snippet and hopes it work.
So it is possible to see pattern tree like

ERROR
  struct 
  some_kind

For this error tree specifically, we can make ERROR matches anything so somehow the pattern still works

💻 Use Cases

See ast-grep/ast-grep.github.io#675

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions