Method: SingletonPredictionContext.create

Defined in:
lib/antlr4/PredictionContext.rb

.create(parent, returnState) ⇒ Object



98
99
100
101
102
103
104
105
# File 'lib/antlr4/PredictionContext.rb', line 98

def self.create(parent, returnState)
    if returnState == PredictionContext::EMPTY_RETURN_STATE and parent.nil?  then
        # someone can pass in the bits of an array ctx that mean $
        return PredictionContext.EMPTY
    else
        return SingletonPredictionContext.new(parent, returnState)
    end
end