Class: Antlr4ruby::LexerModeAction
- Inherits:
-
Object
- Object
- Antlr4ruby::LexerModeAction
- Defined in:
- lib/antlr4ruby/atn/action/lexer_mode_action.rb
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #execute(lexer) ⇒ Object
- #get_action_type ⇒ Object
- #get_mode ⇒ Object
- #hash ⇒ Object
-
#initialize(mode) ⇒ LexerModeAction
constructor
A new instance of LexerModeAction.
- #is_position_dependent ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(mode) ⇒ LexerModeAction
Returns a new instance of LexerModeAction.
6 7 8 |
# File 'lib/antlr4ruby/atn/action/lexer_mode_action.rb', line 6 def initialize(mode) @mode = mode end |
Instance Method Details
#eql?(other) ⇒ Boolean
31 32 33 |
# File 'lib/antlr4ruby/atn/action/lexer_mode_action.rb', line 31 def eql?(other) # todo end |
#execute(lexer) ⇒ Object
23 24 25 |
# File 'lib/antlr4ruby/atn/action/lexer_mode_action.rb', line 23 def execute(lexer) lexer.mode = mode end |
#get_action_type ⇒ Object
15 16 17 |
# File 'lib/antlr4ruby/atn/action/lexer_mode_action.rb', line 15 def get_action_type :MODE end |
#get_mode ⇒ Object
11 12 13 |
# File 'lib/antlr4ruby/atn/action/lexer_mode_action.rb', line 11 def get_mode @mode end |
#hash ⇒ Object
27 28 29 |
# File 'lib/antlr4ruby/atn/action/lexer_mode_action.rb', line 27 def hash # todo end |
#is_position_dependent ⇒ Object
19 20 21 |
# File 'lib/antlr4ruby/atn/action/lexer_mode_action.rb', line 19 def is_position_dependent false end |
#to_s ⇒ Object
35 36 37 |
# File 'lib/antlr4ruby/atn/action/lexer_mode_action.rb', line 35 def to_s "mode(#{mode})" end |