コード例 #1
0
 public override Token Build(Token lastToken, ScriptEngine engine, Script script, ref SourceCode sourceCode)
 {
     bool plus = sourceCode.Matches("++");
     sourceCode += 2;
     // Check and see if there is already a chunk to "change".
     if (engine.CurrentTokens.Count != 0)
     {
         var tokens = new List<Token>(engine.CurrentTokens);
         engine.CurrentTokens.Clear();
         return new PlusPlusMinusMinusToken(tokens, plus, false);
     }
     else
     {
         // Register with the builder that we need to be ran at the end of this.
         _typeStack.Push(plus);
         engine.WaitForChunkFinish(this);
         return new Token.DelayToken();
     }
     return null;
 }