Skip to content

Commit

Permalink
Fix regex patterns (#2442)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkaMaul committed Jun 5, 2024
1 parent 4d09e59 commit 57842b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slither/solc_parsing/expressions/expression_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ def parse_expression(expression: Dict, caller_context: CallerContextExpression)
referenced_declaration = expression["attributes"]["referencedDeclaration"]

if t:
found = re.findall(r"[struct|enum|function|modifier] \(([\[\] ()a-zA-Z0-9\.,_]*)\)", t)
found = re.findall(
r"(?:struct|enum|function|modifier) \(([\[\] ()a-zA-Z0-9\.,_]*)\)", t
)
assert len(found) <= 1
if found:
value = value + "(" + found[0] + ")"
Expand Down

0 comments on commit 57842b0

Please sign in to comment.