public ParserMessage(ParserErrorLevel level, SourceLocation location, string message, ParserState parserState) { Level = level; Location = location; Message = message; ParserState = parserState; }
public ParserMessage(ParserErrorLevel level, SourceSpan span, string message, ParserState parserState) { Level = level; Span = span; Location = span.Location; Message = message; ParserState = parserState; }
public void AddParserMessage(ParserErrorLevel level, SourceSpan span, string message, params object[] args) { if (CurrentParseTree == null) { return; } if (CurrentParseTree.ParserMessages.Count >= MaxErrors) { return; } if (args != null && args.Length > 0) { message = string.Format(message, args); } AddParserMessage(new ParserMessage(level, span, message, CurrentParserState)); }
public void AddParserMessage(ParserErrorLevel level, SourceLocation location, string message, params object[] args) { if (CurrentParseTree == null) { return; } if (CurrentParseTree.ParserMessages.Count >= MaxErrors) { return; } if (args != null && args.Length > 0) { message = string.Format(message, args); } CurrentParseTree.ParserMessages.Add(new ParserMessage(level, location, message, CurrentParserState)); if (OptionIsSet(ParseOptions.TraceParser)) { ParserTrace.Add(new ParserTraceEntry(CurrentParserState, ParserStack.Top, CurrentParserInput, message, true)); } }
public void AddParserMessage(ParserErrorLevel level, SourceLocation location, string message, params object[] args) { if (CurrentParseTree == null) return; if (CurrentParseTree.ParserMessages.Count >= MaxErrors) return; if (args != null && args.Length > 0) message = string.Format(message, args); CurrentParseTree.ParserMessages.Add(new ParserMessage(level, location, message, CurrentParserState)); if (OptionIsSet(ParseOptions.TraceParser)) ParserTrace.Add( new ParserTraceEntry(CurrentParserState, ParserStack.Top, CurrentParserInput, message, true)); }
/* Added by sones developers */ // Ctor and Property added to take a 'Exeption' public ParserMessage(ParserErrorLevel level, SourceLocation location, string message, ParserState parserState, Exception exception) : this(level, location, message, parserState) { Exception = exception; }
public ExternalErrorMessage(string filepath, ParserErrorLevel level, SourceLocation location, string message, ParserState parserState) : base(level, location, message, parserState) { FilePath = filepath; }
public void AddParserMessage(ParserErrorLevel level, SourceLocation location, string message, params object[] args) { AddParserMessage(level, new SourceSpan(location, 1), message, args); }
public static ParseResult Process(string InPath = null, LanguageOption?InSpec = null, string OutPath = null, string OutFile = null, bool OverwriteOut = false, LanguageOption OutSpec = LanguageOption.Native, bool CheckOnly = false, ParserErrorLevel detaillevel = (ParserErrorLevel)(-1)) { DirectoryInfo diIn = null, diOut = null; FileInfo[] Files = null; if (InPath != null) { if (Directory.Exists(InPath)) { diIn = new DirectoryInfo(InPath); } else if (!InPath.Contains(Path.DirectorySeparatorChar)) { diIn = new DirectoryInfo(Directory.GetCurrentDirectory()); } else { try { diIn = new DirectoryInfo(Path.GetDirectoryName(InPath) ?? Path.GetFullPath(InPath)); } catch (ArgumentException ex) { throw new UOSLArgumentException("Invalid input path.", ex); } }