private LexTokenText scanIdentToken() { var tempCol = col; string idtext = scanIdentText(); LexTokenText token = new LexTokenText(line, tempCol, idtext); token.CheckKind(); return(token); }
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); }