Sha256: 0d07e6c073e92d5287b60190554982cec013b6d20ba60c8aae798f393863b569
Contents?: true
Size: 882 Bytes
Versions: 5
Compression:
Stored size: 882 Bytes
Contents
module Antlr4::Runtime class LexerModeAction < LexerAction attr_reader :mode def initialize(mode) @mode = mode end def action_type LexerActionType::MODE end def position_dependent? false end def execute(lexer) lexer.mode(@mode) end def hash return @_hash unless @_hash.nil? hash_code = MurmurHash.hash_int_int(action_type, mode) if !@_hash.nil? if hash_code == @_hash puts 'Same hash_code for LexerModeAction' else puts 'Different hash_code for LexerModeAction' end end @_hash = hash_code end def eql?(other) if other == self return true else return false unless other.is_a? LexerModeAction end @mode == other.mode end def to_s 'mode(' << @mode << ')' end end end
Version data entries
5 entries across 5 versions & 1 rubygems