Class: LexerPopModeAction
- Inherits:
-
LexerAction
- Object
- LexerAction
- LexerPopModeAction
- Defined in:
- lib/antlr4/atn/LexerAction.rb
Overview
Implements the popMode lexer action by calling Lexer#popMode.
<p>The popMode command does not have any parameters, so this action is implemented as a singleton instance exposed by #INSTANCE.</p>
Constant Summary collapse
- @@INSTANCE =
nil
Instance Attribute Summary
Attributes inherited from LexerAction
#actionType, #isPositionDependent
Class Method Summary collapse
Instance Method Summary collapse
-
#execute(lexer) ⇒ Object
<p>This action is implemented by calling Lexer#popMode.</p>.
-
#initialize ⇒ LexerPopModeAction
constructor
A new instance of LexerPopModeAction.
- #to_s ⇒ Object
Methods inherited from LexerAction
Constructor Details
#initialize ⇒ LexerPopModeAction
Returns a new instance of LexerPopModeAction.
129 130 131 |
# File 'lib/antlr4/atn/LexerAction.rb', line 129 def initialize super(LexerActionType::POP_MODE) end |
Class Method Details
.INSTANCE ⇒ Object
124 125 126 127 |
# File 'lib/antlr4/atn/LexerAction.rb', line 124 def self.INSTANCE @@INSTANCE = new() if @@INSTANCE.nil? @@INSTANCE end |
Instance Method Details
#execute(lexer) ⇒ Object
<p>This action is implemented by calling Lexer#popMode.</p>
134 135 136 |
# File 'lib/antlr4/atn/LexerAction.rb', line 134 def execute(lexer) lexer.popMode() end |
#to_s ⇒ Object
138 139 140 |
# File 'lib/antlr4/atn/LexerAction.rb', line 138 def to_s return "popMode" end |