Sha256: 7d05b1dd3e3d4c710b0ea229daa705afa23cc412451858ee4378d8f860d82b6b

Contents?: true

Size: 672 Bytes

Versions: 5

Compression:

Stored size: 672 Bytes

Contents

module Antlr4::Runtime

  class LexerSkipAction < LexerAction
    include Singleton

    def action_type
      LexerActionType::SKIP
    end

    def position_dependent?
      false
    end

    def execute(lexer)
      lexer.skip
    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 LexerSkipAction'
        else
          puts 'Different hash_code for LexerSkipAction'
        end
      end
      @_hash = hash_code
    end

    def eql?(other)
      other == self
    end

    def to_s
      'skip'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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