Method: SingletonPredictionContext#initialize

Defined in:
lib/antlr4/PredictionContext.rb

#initialize(parent, returnState) ⇒ SingletonPredictionContext

Returns a new instance of SingletonPredictionContext.



109
110
111
112
113
114
115
116
117
118
119
# File 'lib/antlr4/PredictionContext.rb', line 109

def initialize( parent, returnState)
    #assert returnState!=ATNState.INVALID_STATE_NUMBER
    if parent.nil? then
      hashCode = PredictionContext.calculateEmptyHashCode
    else
      hashCode = PredictionContext.calculateHashCode(parent, returnState) 
    end
    super(hashCode)
    @parentCtx = parent
    @returnState = returnState
end