Sha256: b4011ea38cc486bc89ad5c609d2cc3795c6982c464fd16c67c118f29cf272e55

Contents?: true

Size: 694 Bytes

Versions: 5

Compression:

Stored size: 694 Bytes

Contents

module Antlr4::Runtime

  class LexerPopModeAction < LexerAction
    include Singleton

    def action_type
      LexerActionType::POP_MODE
    end

    def position_dependent?
      false
    end

    def execute(lexer)
      lexer.pop_mode
    end

    def hash
      return @_hash unless @_hash.nil?

      hash_code = RumourHash.calculate([action_type])

      if !@_hash.nil?
        if hash_code == @_hash
          puts 'Same hash_code for LexerPopModeAction'
        else
          puts 'Different hash_code for LexerPopModeAction'
        end
      end
      @_hash = hash_code
    end

    def equals(other)
      other == self
    end

    def to_s
      'popMode'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
antlr4-runtime-0.2.8 lib/antlr4/runtime/lexer_pop_mode_action.rb
antlr4-runtime-0.2.7 lib/antlr4/runtime/lexer_pop_mode_action.rb
antlr4-runtime-0.2.6 lib/antlr4/runtime/lexer_pop_mode_action.rb
antlr4-runtime-0.2.5 lib/antlr4/runtime/lexer_pop_mode_action.rb
antlr4-runtime-0.2.4 lib/antlr4/runtime/lexer_pop_mode_action.rb