Class: LexerAction

Inherits:
Object show all
Defined in:
lib/antlr4/atn/LexerAction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action) ⇒ LexerAction

Returns a new instance of LexerAction.



17
18
19
20
# File 'lib/antlr4/atn/LexerAction.rb', line 17

def initialize(action)
    self.actionType = action
    self.isPositionDependent = false
end

Instance Attribute Details

#actionTypeObject

Returns the value of attribute actionType.



16
17
18
# File 'lib/antlr4/atn/LexerAction.rb', line 16

def actionType
  @actionType
end

#isPositionDependentObject

Returns the value of attribute isPositionDependent.



16
17
18
# File 'lib/antlr4/atn/LexerAction.rb', line 16

def isPositionDependent
  @isPositionDependent
end

Instance Method Details

#==(other) ⇒ Object



30
31
32
# File 'lib/antlr4/atn/LexerAction.rb', line 30

def ==(other)
    self.equal? other
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/antlr4/atn/LexerAction.rb', line 26

def eql?(other)
  self == other
end

#hashObject



22
23
24
# File 'lib/antlr4/atn/LexerAction.rb', line 22

def hash
    self.actionType.to_s.hash
end