класс Prism::Pattern::CompilationError
Вызывается, когда предоставленный для шаблона запрос содержит недопустимый синтаксис Ruby или использует синтаксис, который мы пока не поддерживаем.
Публичные методы класса
Исходный код
# File lib/prism/pattern.rb, line 43
def initialize(repr)
super(<<~ERROR)
prism was unable to compile the pattern you provided 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 prism's patterns. If you're using some syntax
that you believe should be supported, please open an issue on
GitHub at https://github.com/ruby/prism/issues/new.
ERROR
end Создает новый CompilationError с заданным представлением узла, вызвавшего ошибку.
Вызывает метод суперкласса
Exception::new
Ruby Core © 1993–2024 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.