ToString() public method

Generates a string representation of the class.
This returns an error message summarizing the tracker's errors.
public ToString ( ) : string
return string
示例#1
0
		/// <summary>
		/// Parses the given CPL into an AST.
		/// </summary>
		/// <param name="p_strCplCode">The CPL to convert.</param>
		/// <returns>The AST built from the given CPL.</returns>
		private ITree GenerateAst(string p_strCplCode)
		{
			ErrorTracker ertErrors = new ErrorTracker();
			AntlrParserBase cpbParser = ParserFactory.CreateParser(p_strCplCode, ertErrors);
			ITree astCPL = cpbParser.Parse();
			if (ertErrors.HasErrors)
				throw new ArgumentException("Invalid CPL:" + Environment.NewLine + ertErrors.ToString(), "p_strCplCode");
			return astCPL;
		}