Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Nov 24, 2024
1 parent 5c32a81 commit bdf578c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions buildingmotif/label_parsing/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def results_to_tokens(results):
if first is None:
# if there are any constants left, add them to the token dictionary with the label
first = first_true(parts, pred=lambda x: isinstance(x.token, Constant))
# need to check this is a Constant because during the while True loop, the first
# token could be an Identifier
if first and isinstance(first.token, Constant):
res["tokens"].append(
{"identifier": r, "type": first.token.value.toPython()}
Expand Down

0 comments on commit bdf578c

Please sign in to comment.