Class: LexerSkipAction

Inherits:
LexerAction show all
Defined in:
lib/antlr4/atn/LexerAction.rb

Overview

Implements the skip lexer action by calling Lexer#skip.

<p>The skip command does not have any parameters, so this action is implemented as a singleton instance exposed by #INSTANCE.</p>

Constant Summary collapse

@@INSTANCE =

Provides a singleton instance of this parameterless lexer action.

nil

Instance Attribute Summary

Attributes inherited from LexerAction

#actionType, #isPositionDependent

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LexerAction

#==, #eql?, #hash

Constructor Details

#initializeLexerSkipAction

Returns a new instance of LexerSkipAction.



50
51
52
# File 'lib/antlr4/atn/LexerAction.rb', line 50

def initialize() 
    super(LexerActionType::SKIP)
end

Class Method Details

.INSTANCEObject



44
45
46
47
48
49
# File 'lib/antlr4/atn/LexerAction.rb', line 44

def self.INSTANCE 
    if @@INSTANCE.nil?
      @@INSTANCE = LexerSkipAction.new()
    end
    @@INSTANCE 
end

Instance Method Details

#execute(lexer) ⇒ Object



54
55
56
# File 'lib/antlr4/atn/LexerAction.rb', line 54

def execute(lexer)
    lexer.skip()
end

#to_sObject



58
59
60
# File 'lib/antlr4/atn/LexerAction.rb', line 58

def to_s
    return "skip"
end