Exemple #1
0
 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);
 }
Exemple #2
0
 /// <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);
 }