Sha256: de1cc3ce4ec0bf76f9e82716c637a656593583dbeaec0b688ad65fa4210e856e

Contents?: true

Size: 636 Bytes

Versions: 1

Compression:

Stored size: 636 Bytes

Contents

# finished

module Antlr4ruby
  class BailErrorStrategy < DefaultErrorStrategy

    def recover(recognizer, e)
      context = recognizer.get_context
      while context
        context.exception = e; context = context.get_parent
      end

      raise ParseCancellationException.new
    end

    def recover_in_line(recognizer)
      e = InputMismatchException.new(recognizer, nil, nil)
      context = recognizer.get_context
      while context
        context.exception = e; context = context.get_parent
      end
      raise ParseCancellationException.new
    end

    def sync(recognizer) end


  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
antlr4ruby-0.1.0 lib/antlr4ruby/bail_error_strategy.rb