Fix regex patterns (#2442)

pull/2473/head
dm 6 months ago committed by GitHub
parent 4d09e59915
commit 57842b0c86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      slither/solc_parsing/expressions/expression_parsing.py

@ -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] + ")"

Loading…
Cancel
Save