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