コード例 #1
0
ファイル: UnaryParser.cs プロジェクト: olivr70/Eto.Parse
 public override string GetErrorMessage(ParserErrorArgs args)
 {
     if (args.Push(this))
     {
         if (Inner != null)
         {
             return(string.Format("{0}: {1}", base.DescriptiveName, Inner.GetErrorMessage(args)));
         }
     }
     return(base.DescriptiveName);
 }
コード例 #2
0
ファイル: Parser.cs プロジェクト: david-allison-1/Eto.Parse
 /// <summary>
 /// Gets the error message to display for this parser
 /// </summary>
 /// <remarks>
 /// By default, this will use the DescriptiveName
 /// </remarks>
 /// <returns>The error message to display when not matched</returns>
 public virtual string GetErrorMessage(ParserErrorArgs args)
 {
     return(DescriptiveName);
 }