Exception: SyntaxTree::Pattern::CompilationError
- Inherits:
-
StandardError
- Object
- StandardError
- SyntaxTree::Pattern::CompilationError
- Defined in:
- lib/syntax_tree/pattern.rb
Overview
Raised when the query given to a pattern is either invalid Ruby syntax or is using syntax that we don’t yet support.
Instance Method Summary collapse
-
#initialize(repr) ⇒ CompilationError
constructor
A new instance of CompilationError.
Constructor Details
#initialize(repr) ⇒ CompilationError
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/syntax_tree/pattern.rb', line 43 def initialize(repr) super(" Syntax Tree was unable to compile the pattern you provided to search\n into a usable expression. It failed on to understand the node\n represented by:\n\n \#{repr}\n\n Note that not all syntax supported by Ruby's pattern matching syntax\n is also supported by Syntax Tree's code search. If you're using some\n syntax that you believe should be supported, please open an issue on\n GitHub at https://github.com/ruby-syntax-tree/syntax_tree/issues/new.\n ERROR\nend\n") |