Example #1
0
        public FilePoint GetError(TextPointer pointer)
        {
            var line  = pointer.GetLine(0);
            var match = fileError.Match(line);

            if (match.Success)
            {
                int lineNo = int.Parse(match.Groups["line"].Value);
                int colNo  = int.Parse(match.Groups["column"].Value);
                int i      = -1;
                do
                {
                    line = pointer.GetLine(i);
                    if (IsFilePath(line))
                    {
                        return(new FilePoint
                        {
                            Path = line.Trim(),
                            Line = lineNo,
                            Column = colNo,
                        });
                    }

                    i--;
                }while (true);
            }

            return(null);
        }
Example #2
0
        public FilePoint GetError(TextPointer pointer)
        {
            var line  = pointer.GetLine(0) + " " + pointer.GetLine(1);
            var match = lineRegex.Match(line);

            if (match.Success)
            {
                return(new FilePoint
                {
                    Path = match.Groups["path"].Value,
                    Line = ToNullableInt(match.Groups["line"]),
                    Column = ToNullableInt(match.Groups["column"]),
                });
            }
            else
            {
                return(null);
            }
        }