Class: Antlr4ruby::LexerTypeAction
- Inherits:
-
Object
- Object
- Antlr4ruby::LexerTypeAction
- Defined in:
- lib/antlr4ruby/atn/action/lexer_type_action.rb
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #execute(lexer) ⇒ Object
- #get_action_type ⇒ Object
- #get_type ⇒ Object
- #hash ⇒ Object
-
#initialize(type) ⇒ LexerTypeAction
constructor
A new instance of LexerTypeAction.
- #is_position_dependent ⇒ Object
- #to_s ⇒ Object
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_type ⇒ Object
13 14 15 |
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 13 def get_action_type :TYPE end |
#get_type ⇒ Object
9 10 11 |
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 9 def get_type @type end |
#hash ⇒ Object
25 26 27 |
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 25 def hash # todo end |
#is_position_dependent ⇒ Object
17 18 19 |
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 17 def is_position_dependent false end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/antlr4ruby/atn/action/lexer_type_action.rb', line 33 def to_s "type(#{type}" end |