Exemplo n.º 1
0
 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]));
     }
 }
Exemplo n.º 2
0
        ////////////////////////////////////////////////////////////////
        // 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());
        }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
        ////////////////////////////////////////////////////////////////
        // Constants
        ////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////
        // Variables
        ////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////
        // Constructors
        ////////////////////////////////////////////////////////////////

        public Error(string errorNumber, string text, SourceCodeLocation location)
        {
            this.ErrorNumber = errorNumber;
            this.Location    = location;
            this.Text        = text;
        }
Exemplo n.º 5
0
 public void Append(SourceCodeLocation location, string lineText)
 {
     sourceCodeLines.Add(new SourceCodeLine(location, lineText));
 }