public void RegisterGoto(string token, JumpToken gotoToken) { Require.False(gotos.ContainsKey(token)); gotos.Add(token, gotoToken); }
public void BeginLookahead() { Require.False(lookaheadEnabled); lookaheadEnabled = true; lookahead.Clear(); }
public void RegisterTryContext() { Require.False(tryContext); tryContext = true; }
public void Fail() { Require.False(lookaheadEnabled); throw new CompilerException(CurrentToken, string.Format(Resource.Culture, Resource.UnexpectedToken, CurrentToken.Token, Expected(expected))); }