Commit 6046b75c authored by Eckhart Arnold's avatar Eckhart Arnold
Browse files

sync commit

parent 70ae2d20
......@@ -201,6 +201,8 @@ def tokenized_to_original_mapping(tokenized_source: str) -> SourceMap:
assert len(positions) == len(offsets), '\n' + str(positions) + '\n' + str(offsets)
assert positions[0] == 0
assert all(positions[i] < positions[i + 1] for i in range(len(positions) - 1))
# specific condition for preprocessor tokens
assert all(offsets[i] > offsets[i + 1] for i in range(len(offsets) - 2))
return SourceMap(positions, offsets)
......@@ -244,4 +246,3 @@ def with_source_mapping(result: PreprocessorResult) -> Tuple[str, SourceMapFunc]
#
#######################################################################
Supports Markdown
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