private static IToken Resolve(LexerContext context) { if (CommentToken.IsCommentBegin(context)) { return(ResolveComment(context)); } else if (NumberToken.IsNumberBegin(context)) { return(ResolveNumber(context)); } else if (StringToken.IsStringBegin(context)) { return(ResolveString(context)); } else if (SpecialSymbolToken.IsSpecial(context)) { return(ResolveSpecial(context)); } else if (IdentifierToken.IsIdentifierBegin(context)) { return(ResolveIdentifier(context)); } else { throw new SyntaxErrorException(); } }