Commit 5927d91d authored by Eckhart Arnold's avatar Eckhart Arnold
Browse files

sync commit

parent 170de697
...@@ -1905,7 +1905,7 @@ def compile_source(source: str, ...@@ -1905,7 +1905,7 @@ def compile_source(source: str,
preprocessor: PreprocessorFunc, # str -> str preprocessor: PreprocessorFunc, # str -> str
parser: Grammar, # str -> Node (concrete syntax tree (CST)) parser: Grammar, # str -> Node (concrete syntax tree (CST))
transformer: TransformationFunc, # Node -> Node (abstract syntax tree (AST)) transformer: TransformationFunc, # Node -> Node (abstract syntax tree (AST))
compiler: Compiler): # Node (AST) -> Any compiler: Compiler) -> Tuple[Any, List[str], Node]: # Node (AST) -> Any
""" """
Compiles a source in four stages: Compiles a source in four stages:
1. Scanning (if needed) 1. Scanning (if needed)
......
...@@ -235,7 +235,7 @@ def sv_index(absolute_index: int, sv: StringView) -> int: ...@@ -235,7 +235,7 @@ def sv_index(absolute_index: int, sv: StringView) -> int:
def sv_indices(absolute_indices: Iterable[int], sv: StringView) -> Tuple[int, ...]: def sv_indices(absolute_indices: Iterable[int], sv: StringView) -> Tuple[int, ...]:
"""Converts the an index into string watched by a StringView object """Converts indices into a string watched by a StringView object
to an index relativ to the string view object. See also: `sv_index()` to an index relativ to the string view object. See also: `sv_index()`
""" """
return tuple(index - sv.begin for index in absolute_indices) return tuple(index - sv.begin for index in absolute_indices)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment