public static TextSpan GetTextSpan(this Node node, IFileNode fileNode)
 {
     var start = fileNode.MapPosition(node.LexicalInfo.Line, node.LexicalInfo.Column);
     var end = fileNode.MapPosition(node.EndSourceLocation.Line, node.EndSourceLocation.Column);
     return new TextSpan
     {
         iStartLine = start.Line,
         iStartIndex = start.Column,
         iEndLine = end.Line,
         iEndIndex = end.Column
     };
 }
        public static TextSpan GetTextSpan(this Node node, IFileNode fileNode)
        {
            var start = fileNode.MapPosition(node.LexicalInfo.Line, node.LexicalInfo.Column);
            var end   = fileNode.MapPosition(node.EndSourceLocation.Line, node.EndSourceLocation.Column);

            return(new TextSpan
            {
                iStartLine = start.Line,
                iStartIndex = start.Column,
                iEndLine = end.Line,
                iEndIndex = end.Column
            });
        }
Beispiel #3
0
 public CompileResults.BufferPoint MapPosition(int line, int column)
 {
     return(fileNode.MapPosition(line, column));
 }