Hi, thanks for giving ast-grep a try.
Pattern code must be valid code that tree-sitter can parse.[0]
You can use this syntax `try { $$$CODE } catch ($$$E) { $$$HANDLE }`[1]
[0] https://ast-grep.github.io/guide/pattern-syntax.html#pattern...
[1] https://ast-grep.github.io/playground.html#eyJtb2RlIjoiUGF0Y...