Class: Antlr4::Runtime::LexerSkipAction
- Inherits:
-
LexerAction
- Object
- LexerAction
- Antlr4::Runtime::LexerSkipAction
- Includes:
- Singleton
- Defined in:
- lib/antlr4/runtime/lexer_skip_action.rb
Instance Method Summary collapse
- #action_type ⇒ Object
- #eql?(other) ⇒ Boolean
- #execute(lexer) ⇒ Object
- #hash ⇒ Object
-
#initialize ⇒ LexerSkipAction
constructor
A new instance of LexerSkipAction.
- #position_dependent? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ LexerSkipAction
Returns a new instance of LexerSkipAction.
6 7 8 |
# File 'lib/antlr4/runtime/lexer_skip_action.rb', line 6 def initialize @_hash = nil end |
Instance Method Details
#action_type ⇒ Object
10 11 12 |
# File 'lib/antlr4/runtime/lexer_skip_action.rb', line 10 def action_type LexerActionType::SKIP end |
#eql?(other) ⇒ Boolean
37 38 39 |
# File 'lib/antlr4/runtime/lexer_skip_action.rb', line 37 def eql?(other) other == self end |
#execute(lexer) ⇒ Object
18 19 20 |
# File 'lib/antlr4/runtime/lexer_skip_action.rb', line 18 def execute(lexer) lexer.skip end |
#hash ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/antlr4/runtime/lexer_skip_action.rb', line 22 def hash return @_hash unless @_hash.nil? hash_code = RumourHash.calculate([action_type]) unless @_hash.nil? if hash_code == @_hash puts 'Same hash_code for LexerSkipAction' else puts 'Different hash_code for LexerSkipAction' end end @_hash = hash_code end |
#position_dependent? ⇒ Boolean
14 15 16 |
# File 'lib/antlr4/runtime/lexer_skip_action.rb', line 14 def position_dependent? false end |
#to_s ⇒ Object
41 42 43 |
# File 'lib/antlr4/runtime/lexer_skip_action.rb', line 41 def to_s 'skip' end |