Exemplo n.º 1
0
 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
     };
 }
Exemplo n.º 2
0
        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
            });
        }
Exemplo n.º 3
0
 public CompileResults.BufferPoint MapPosition(int line, int column)
 {
     return(fileNode.MapPosition(line, column));
 }