Skip to content

Commit a5c35ef

Browse files
committed
Fix minor dict access issue
1 parent 55a2678 commit a5c35ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

slither/solc_parsing/expressions/expression_parsing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def parse_expression(expression: Dict, caller_context: CallerContext) -> "Expres
729729
assert "children" not in expression
730730

731731
if is_compact_ast:
732-
value = expression["value"]
732+
value = expression.get("value", None)
733733
if value:
734734
if "subdenomination" in expression and expression["subdenomination"]:
735735
subdenomination = expression["subdenomination"]
@@ -742,7 +742,7 @@ def parse_expression(expression: Dict, caller_context: CallerContext) -> "Expres
742742
if expression["kind"] == "number":
743743
type_candidate = "int_const"
744744
else:
745-
value = expression["attributes"]["value"]
745+
value = expression["attributes"].get("value", None)
746746
if value:
747747
if (
748748
"subdenomination" in expression["attributes"]

0 commit comments

Comments
 (0)