Exemplo n.º 1
0
 private IToken ScanIdent(int start, Func <char, bool> extraChars)
 {
     while (Advancable())
     {
         if (CurrentCharacter.IsAlphanumeric() || extraChars(CurrentCharacter))
         {
             continue;
         }
         else if (CurrentCharacter.IsWhiteSpace())
         {
             return(Add(EToken.Identifier, start, this));
         }
         else
         {
             return(Add(EToken.Identifier, start, Formula.Substring(start - 1, CharPosition-- - start)));
         }
     }
     return(Add(EToken.Identifier, start, this));
 }