Пример #1
0
 public static LinearSpan ToLinearSpan(this Range range, PythonAst ast)
 => LinearSpan.FromBounds(ast.LocationToIndex(range.start), ast.LocationToIndex(range.end));
Пример #2
0
 public static LinearSpan ToLinearSpan(this SourceSpan span, PythonAst ast)
 => LinearSpan.FromBounds(ast.LocationToIndex(span.Start), ast.LocationToIndex(span.End));