public void Append(SourceCodeLocation startLocation, string[] textLines) { for (int i = 0; i < textLines.Length; i++) { sourceCodeLines.Add(new SourceCodeLine(startLocation.FileName, startLocation.FilePart, startLocation.LineNo + i, textLines[i])); } }
//////////////////////////////////////////////////////////////// // Methods //////////////////////////////////////////////////////////////// private Error[] __TransformErrors(CompilerErrorCollection errors, SourceCodeData sourceCode) { List <Error> ret = new List <Error>(); foreach (CompilerError e in errors) { if (e.IsWarning) { continue; } SourceCodeLocation location = sourceCode.GetLocation(e.Line); ret.Add(new Error(e.ErrorNumber, e.ErrorText, location)); } return(ret.ToArray()); }
public SourceCodeLine(SourceCodeLocation location, string lineText) { if (location == null) { this.FileName = null; this.FilePart = -1; this.LineNo = -1; } else { this.FileName = location.FileName; this.FilePart = location.FilePart; this.LineNo = location.LineNo; } this.LineText = lineText; }
//////////////////////////////////////////////////////////////// // Constants //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// // Variables //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// // Constructors //////////////////////////////////////////////////////////////// public Error(string errorNumber, string text, SourceCodeLocation location) { this.ErrorNumber = errorNumber; this.Location = location; this.Text = text; }
public void Append(SourceCodeLocation location, string lineText) { sourceCodeLines.Add(new SourceCodeLine(location, lineText)); }