class SyntaxTree::Pattern::CompilationError
is using syntax that we don’t yet support.
Raised when the query given to a pattern is either invalid Ruby syntax or
def initialize(repr)
def initialize(repr) super(<<~ERROR) Syntax Tree was unable to compile the pattern you provided to search into a usable expression. It failed on to understand the node represented by: #{repr} Note that not all syntax supported by Ruby's pattern matching syntax is also supported by Syntax Tree's code search. If you're using some syntax that you believe should be supported, please open an issue on GitHub at https://github.com/ruby-syntax-tree/syntax_tree/issues/new. ERROR end