Skip to content

Commit

Permalink
parser needs a Constant for the first
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Nov 24, 2024
1 parent 972f789 commit 5c32a81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildingmotif/label_parsing/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ 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))
if first:
if first and isinstance(first.token, Constant):
res["tokens"].append(
{"identifier": r, "type": first.token.value.toPython()}
)
Expand Down

0 comments on commit 5c32a81

Please sign in to comment.