Sha256: b2a1da1448df65a1a6a4456a8b9388fdc2749420f1f1c36bf84cd6ec59a8a1d2

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

module Antlr4ruby

  # @final LexerAction
  class LexerModeAction

    def initialize(mode)
      @mode = mode
    end


    def get_mode
      @mode
    end

    def get_action_type
      :MODE
    end

    def is_position_dependent
      false
    end

    def execute(lexer)
      lexer.mode = mode
    end

    def hash
      # todo
    end

    def eql?(other)
      # todo
    end

    def to_s
      "mode(#{mode})"
    end



    private
    attr_reader :mode
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
antlr4ruby-0.1.0 lib/antlr4ruby/atn/action/lexer_mode_action.rb