/// <summary>
 /// Returns the span of the name component of the expression
 /// </summary>
 public SourceSpan GetNameSpan(PythonAst parent) => new SourceSpan(parent.IndexToLocation(NameHeader), GetEnd(parent));
Пример #2
0
 public SourceLocation GetHeader(PythonAst ast) => ast.IndexToLocation(HeaderIndex);
 /// <summary>
 /// Returns the span of the name component of the expression
 /// </summary>
 public SourceSpan GetNameSpan(PythonAst ast) => new SourceSpan(ast.IndexToLocation(NameHeader), GetEnd(ast));
 public static SourceSpan ToSourceSpan(this IndexSpan span, PythonAst ast)
 => ast != null ? new SourceSpan(ast.IndexToLocation(span.Start), ast.IndexToLocation(span.End)) : default;