/// <summary> /// Builds the specified source. /// </summary> /// <param name="source">The source.</param> /// <returns>The Build result.</returns> public static SymbolParseResult Build(string source) { var item = new SymbolParser(source); List <Token> data = new List <Token>(); while (true) { var token = item.NextToken(); data.Add(token); if (token.ID == TokenId.End) { break; } } return(new SymbolParseResult(data)); }
/// <summary> /// 解析字符串为类型 /// </summary> /// <returns>读取的类型</returns> public Type Resolve(string typeString) { spResult = SymbolParser.Build(typeString); return(ReadType()); }