Fix top level struct parsing

pull/1545/head
Simone 2 years ago
parent 7ea572723b
commit 45e90dc4c1
  1. 7
      slither/solc_parsing/slither_compilation_unit_solc.py

@ -24,6 +24,7 @@ from slither.solc_parsing.declarations.function import FunctionSolc
from slither.solc_parsing.declarations.structure_top_level import StructureTopLevelSolc
from slither.solc_parsing.exceptions import VariableNotFound
from slither.solc_parsing.variables.top_level_variable import TopLevelVariableSolc
from slither.solc_parsing.declarations.caller_context import CallerContextExpression
logging.basicConfig()
logger = logging.getLogger("SlitherSolcParsing")
@ -57,7 +58,7 @@ def _handle_import_aliases(
scope.renaming[local_name] = original_name
class SlitherCompilationUnitSolc:
class SlitherCompilationUnitSolc(CallerContextExpression):
# pylint: disable=no-self-use,too-many-instance-attributes
def __init__(self, compilation_unit: SlitherCompilationUnit):
super().__init__()
@ -95,6 +96,10 @@ class SlitherCompilationUnitSolc:
def underlying_contract_to_parser(self) -> Dict[Contract, ContractSolc]:
return self._underlying_contract_to_parser
@property
def slither_parser(self) -> "SlitherCompilationUnitSolc":
return self
###################################################################################
###################################################################################
# region AST

Loading…
Cancel
Save