|
|
@ -9,6 +9,7 @@ from slither.core.expressions.assignment_operation import AssignmentOperation |
|
|
|
from slither.core.expressions.binary_operation import BinaryOperation |
|
|
|
from slither.core.expressions.binary_operation import BinaryOperation |
|
|
|
from slither.core.expressions.call_expression import CallExpression |
|
|
|
from slither.core.expressions.call_expression import CallExpression |
|
|
|
from slither.core.expressions.conditional_expression import ConditionalExpression |
|
|
|
from slither.core.expressions.conditional_expression import ConditionalExpression |
|
|
|
|
|
|
|
from slither.core.expressions.elementary_type_name_expression import ElementaryTypeNameExpression |
|
|
|
from slither.core.expressions.expression import Expression |
|
|
|
from slither.core.expressions.expression import Expression |
|
|
|
from slither.core.expressions.identifier import Identifier |
|
|
|
from slither.core.expressions.identifier import Identifier |
|
|
|
from slither.core.expressions.index_access import IndexAccess |
|
|
|
from slither.core.expressions.index_access import IndexAccess |
|
|
@ -80,7 +81,10 @@ class SplitTernaryExpression: |
|
|
|
if isinstance(expression, ConditionalExpression): |
|
|
|
if isinstance(expression, ConditionalExpression): |
|
|
|
raise SlitherException("Nested ternary operator not handled") |
|
|
|
raise SlitherException("Nested ternary operator not handled") |
|
|
|
|
|
|
|
|
|
|
|
if isinstance(expression, (Literal, Identifier, IndexAccess, NewArray, NewContract)): |
|
|
|
if isinstance( |
|
|
|
|
|
|
|
expression, |
|
|
|
|
|
|
|
(Literal, Identifier, IndexAccess, NewArray, NewContract, ElementaryTypeNameExpression), |
|
|
|
|
|
|
|
): |
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
# case of lib |
|
|
|
# case of lib |
|
|
|