Class: Antlr4ruby::LexerTypeAction

Inherits:
Object
  • Object
show all
Defined in:
lib/antlr4ruby/atn/action/lexer_type_action.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ LexerTypeAction



5
6
7
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 5

def initialize(type)
  @type = type
end

Instance Method Details

#eql?(other) ⇒ Boolean



29
30
31
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 29

def eql?(other)
  # todo

end

#execute(lexer) ⇒ Object



21
22
23
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 21

def execute(lexer)
  lexer.set_type(type)
end

#get_action_typeObject



13
14
15
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 13

def get_action_type
  :TYPE
end

#get_typeObject



9
10
11
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 9

def get_type
  @type
end

#hashObject



25
26
27
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 25

def hash
  # todo

end

#is_position_dependentObject



17
18
19
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 17

def is_position_dependent
  false
end

#to_sObject



33
34
35
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 33

def to_s
  "type(#{type}"
end