Beispiel #1
0
    public static Location GetLocation(this SourceNode node)
    {
        // TODO remove this after SourceNode has this method itself
        //return new SourceLocation(node);
        // we don't have tree ref here
        var tree = SourceTree.CreateForRoot(node.AncestorsAndSelf().Last());

        return(new SourceLocation(tree, node.GetSpan()));
    }