Пример #1
0
        private LexTokenText scanIdentToken()
        {
            var          tempCol = col;
            string       idtext  = scanIdentText();
            LexTokenText token   = new LexTokenText(line, tempCol, idtext);

            token.CheckKind();
            return(token);
        }
Пример #2
0
 public bool IsKind(params TokenKindKeyword[] kinds)
 {
     if (this is LexTokenText)
     {
         LexTokenText tokensymbol = (LexTokenText)this;
         foreach (var kind in kinds)
         {
             if (kind == TokenKindKeyword.Ident)
             {
                 return(true);
             }
             if (LexTokenText.Dict.ContainsV(kind))
             {
                 string text = LexTokenText.Dict.GetK(kind);
                 if (tokensymbol.Text == text)//if (tokensymbol.Kind == kind)
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }