Skip to content

Commit 04faac3

Browse files
move postcondition
1 parent 24bb91d commit 04faac3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vyper/ast/parse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ def _parse_to_ast_with_settings(
108108
# postcondition: consumed all the for loop annotations
109109
assert len(pre_parser.for_loop_annotations) == 0
110110

111+
# postcondition: we have used all the hex strings found by the
112+
# pre-parser
113+
assert len(pre_parser.hex_string_locations) == 0
114+
111115
# Convert to Vyper AST.
112116
module = vy_ast.get_node(py_ast)
113117
assert isinstance(module, vy_ast.Module) # mypy hint
@@ -178,10 +182,6 @@ def annotate_python_ast(
178182
)
179183
visitor.visit(parsed_ast)
180184

181-
# sanity check that we have used all the hex strings found by the
182-
# pre-parser
183-
assert len(pre_parser.hex_string_locations) == 0
184-
185185
return parsed_ast
186186

187187

0 commit comments

Comments
 (0)