Spec-Zone.ru › Ruby 3.4

класс Prism::Pattern::CompilationError

Родитель:
StandardError

Вызывается, когда предоставленный для шаблона запрос содержит недопустимый синтаксис Ruby или использует синтаксис, который мы пока не поддерживаем.

Публичные методы класса

new (repr)
Исходный код
# 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.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API