/// <summary> /// Pop the current state. If the state info shouldn't be discarded yylloc and yylval will be set. /// </summary> /// <returns>true if the state should not be discarded, false if it should.</returns> private bool PopState() { yy_pop_state(); ApexLexerStateInfo info = _stateStack.Pop(); if (info.Discard) { return(false); } yylloc = new ApexTextSpan( info.StartPosition, tokEPos, info.StartLine, info.StartColumn + 1, tokELin, tokECol + 1); yylval = new ApexSyntaxNode(info.Token, yylloc, info.Text.ToString()); return(true); }
/// <summary> /// Update the state with the current text. /// </summary> private void UpdateState() { ApexLexerStateInfo info = _stateStack.Peek(); info.Text.Append(yytext); }