diff --git a/README.md b/README.md index 5a0a45d07..f5057557f 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ Feel free to stop by our [Slack channel](https://empireslacking.herokuapp.com) ( * The [Detector documentation](https://github.com/trailofbits/slither/wiki/Adding-a-new-detector) describes how to write a new vulnerability analyses. -* The [API documentation](https://github.com/trailofbits/slither/wiki/API-examples) describes the methods and objects available for custom analyses. +* The [API documentation](https://github.com/crytic/slither/wiki/Python-API) describes the methods and objects available for custom analyses. * The [SlithIR documentation](https://github.com/trailofbits/slither/wiki/SlithIR) describes the SlithIR intermediate representation. @@ -214,12 +214,14 @@ Slither is licensed and distributed under the AGPLv3 license. [Contact us](mailt - [Slither: A Static Analysis Framework For Smart Contracts](https://arxiv.org/abs/1908.09878), Josselin Feist, Gustavo Grieco, Alex Groce - WETSEB '19 ### External publications -- [ReJection: A AST-Based Reentrancy Vulnerability Detection Method](https://www.researchgate.net/publication/339354823_ReJection_A_AST-Based_Reentrancy_Vulnerability_Detection_Method), Rui Ma, Zefeng Jian, Guangyuan Chen, Ke Ma, Yujia Chen - CTCIS 19 -- [MPro: Combining Static and Symbolic Analysis forScalable Testing of Smart Contract](https://arxiv.org/pdf/1911.00570.pdf), William Zhang, Sebastian Banescu, Leodardo Pasos, Steven Stewart, Vijay Ganesh - ISSRE 2019 -- [ETHPLOIT: From Fuzzing to Efficient Exploit Generation against Smart Contracts](https://wcventure.github.io/FuzzingPaper/Paper/SANER20_ETHPLOIT.pdf), Qingzhao Zhang, Yizhuo Wang, Juanru Li, Siqi Ma - SANER 20 -- [Verification of Ethereum Smart Contracts: A Model Checking Approach](http://www.ijmlc.org/vol10/977-AM0059.pdf), Tam Bang, Hoang H Nguyen, Dung Nguyen, Toan Trieu, Tho Quan - IJMLC 20 -- [Smart Contract Repair](https://arxiv.org/pdf/1912.05823.pdf), Xiao Liang Yu, Omar Al-Bataineh, David Lo, Abhik Roychoudhury - TOSEM 20 -- [Demystifying Loops in Smart Contracts](https://www.microsoft.com/en-us/research/uploads/prod/2020/08/loops_solidity__camera_ready-5f3fec3f15c69.pdf), Ben Mariano, Yanju Chen, Yu Feng, Shuvendu Lahiri, Isil Dillig - ASE 20 -- [Trace-Based Dynamic Gas Estimation of Loops in Smart Contracts](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9268144), Chunmiao Li, Shijie Nie, Yang Cao, Yijun Yu, Zhenjiang Hu - IEEE Open J. Comput. Soc. 1 (2020) +Title | Usage | Authors | Venue +--- | --- | --- | --- +[ReJection: A AST-Based Reentrancy Vulnerability Detection Method](https://www.researchgate.net/publication/339354823_ReJection_A_AST-Based_Reentrancy_Vulnerability_Detection_Method) | AST-based analysis built on top of Slither | Rui Ma, Zefeng Jian, Guangyuan Chen, Ke Ma, Yujia Chen | CTCIS 19 +[MPro: Combining Static and Symbolic Analysis forScalable Testing of Smart Contract](https://arxiv.org/pdf/1911.00570.pdf) | Leverage data dependency through Slither | William Zhang, Sebastian Banescu, Leodardo Pasos, Steven Stewart, Vijay Ganesh | ISSRE 2019 +[ETHPLOIT: From Fuzzing to Efficient Exploit Generation against Smart Contracts](https://wcventure.github.io/FuzzingPaper/Paper/SANER20_ETHPLOIT.pdf) | Leverage data dependency through Slither | Qingzhao Zhang, Yizhuo Wang, Juanru Li, Siqi Ma | SANER 20 +[Verification of Ethereum Smart Contracts: A Model Checking Approach](http://www.ijmlc.org/vol10/977-AM0059.pdf) | Symbolic execution built on top of Slither’s CFG | Tam Bang, Hoang H Nguyen, Dung Nguyen, Toan Trieu, Tho Quan | IJMLC 20 +[Smart Contract Repair](https://arxiv.org/pdf/1912.05823.pdf) | Rely on Slither’s vulnerabilities detectors | Xiao Liang Yu, Omar Al-Bataineh, David Lo, Abhik Roychoudhury | TOSEM 20 +[Demystifying Loops in Smart Contracts](https://www.microsoft.com/en-us/research/uploads/prod/2020/08/loops_solidity__camera_ready-5f3fec3f15c69.pdf) | Leverage data dependency through Slither | Ben Mariano, Yanju Chen, Yu Feng, Shuvendu Lahiri, Isil Dillig | ASE 20 +[Trace-Based Dynamic Gas Estimation of Loops in Smart Contracts](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9268144) | Use Slither’s CFG to detect loops | Chunmiao Li, Shijie Nie, Yang Cao, Yijun Yu, Zhenjiang Hu | IEEE Open J. Comput. Soc. 1 (2020) If you are using Slither on an academic work, consider applying to the [Crytic $10k Research Prize](https://blog.trailofbits.com/2019/11/13/announcing-the-crytic-10k-research-prize/). diff --git a/setup.py b/setup.py index 7e0b8f31f..4e77c8766 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( ], dependency_links=["git+https://github.com/crytic/crytic-compile.git@master#egg=crytic-compile"], license="AGPL-3.0", - long_description=open("README.md").read(), + long_description=open("README.md", "r", encoding="utf-8").read(), entry_points={ "console_scripts": [ "slither = slither.__main__:main", diff --git a/slither/core/compilation_unit.py b/slither/core/compilation_unit.py index 293474778..693eff821 100644 --- a/slither/core/compilation_unit.py +++ b/slither/core/compilation_unit.py @@ -13,6 +13,7 @@ from slither.core.declarations import ( Function, Modifier, ) +from slither.core.declarations.custom_error import CustomError from slither.core.declarations.enum_top_level import EnumTopLevel from slither.core.declarations.function_top_level import FunctionTopLevel from slither.core.declarations.structure_top_level import StructureTopLevel @@ -40,6 +41,7 @@ class SlitherCompilationUnit(Context): self._functions_top_level: List[FunctionTopLevel] = [] self._pragma_directives: List[Pragma] = [] self._import_directives: List[Import] = [] + self._custom_errors: List[CustomError] = [] self._all_functions: Set[Function] = set() self._all_modifiers: Set[Modifier] = set() @@ -210,6 +212,10 @@ class SlitherCompilationUnit(Context): def functions_top_level(self) -> List[FunctionTopLevel]: return self._functions_top_level + @property + def custom_errors(self) -> List[CustomError]: + return self._custom_errors + # endregion ################################################################################### ################################################################################### diff --git a/slither/core/declarations/contract.py b/slither/core/declarations/contract.py index 08279246a..73c7fbfc5 100644 --- a/slither/core/declarations/contract.py +++ b/slither/core/declarations/contract.py @@ -11,7 +11,7 @@ from slither.core.cfg.scope import Scope from slither.core.solidity_types.type import Type from slither.core.source_mapping.source_mapping import SourceMapping -from slither.core.declarations.function import Function, FunctionType +from slither.core.declarations.function import Function, FunctionType, FunctionLanguage from slither.utils.erc import ( ERC20_signatures, ERC165_signatures, @@ -38,6 +38,7 @@ if TYPE_CHECKING: from slither.core.variables.variable import Variable from slither.core.variables.state_variable import StateVariable from slither.core.compilation_unit import SlitherCompilationUnit + from slither.core.declarations.custom_error_contract import CustomErrorContract LOGGER = logging.getLogger("Contract") @@ -68,6 +69,7 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods self._modifiers: Dict[str, "Modifier"] = {} self._functions: Dict[str, "FunctionContract"] = {} self._linearizedBaseContracts: List[int] = [] + self._custom_errors: Dict[str:"CustomErrorContract"] = {} # The only str is "*" self._using_for: Dict[Union[str, Type], List[str]] = {} @@ -242,6 +244,38 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods def using_for(self) -> Dict[Union[str, Type], List[str]]: return self._using_for + # endregion + ################################################################################### + ################################################################################### + # region Custom Errors + ################################################################################### + ################################################################################### + + @property + def custom_errors(self) -> List["CustomErrorContract"]: + """ + list(CustomErrorContract): List of the contract's custom errors + """ + return list(self._custom_errors.values()) + + @property + def custom_errors_inherited(self) -> List["CustomErrorContract"]: + """ + list(CustomErrorContract): List of the inherited custom errors + """ + return [s for s in self.custom_errors if s.contract != self] + + @property + def custom_errors_declared(self) -> List["CustomErrorContract"]: + """ + list(CustomErrorContract): List of the custom errors declared within the contract (not inherited) + """ + return [s for s in self.custom_errors if s.contract == self] + + @property + def custom_errors_as_dict(self) -> Dict[str, "CustomErrorContract"]: + return self._custom_errors + # endregion ################################################################################### ################################################################################### @@ -506,7 +540,7 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods def available_elements_from_inheritances( self, elements: Dict[str, "Function"], - getter_available: Callable[["Contract"], List["Function"]], + getter_available: Callable[["Contract"], List["FunctionContract"]], ) -> Dict[str, "Function"]: """ @@ -517,14 +551,16 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods # keep track of the contracts visited # to prevent an ovveride due to multiple inheritance of the same contract # A is B, C, D is C, --> the second C was already seen - inherited_elements: Dict[str, "Function"] = {} + inherited_elements: Dict[str, "FunctionContract"] = {} accessible_elements = {} contracts_visited = [] for father in self.inheritance_reverse: - functions: Dict[str, "Function"] = { + functions: Dict[str, "FunctionContract"] = { v.full_name: v for v in getter_available(father) if v.contract not in contracts_visited + and v.function_language + != FunctionLanguage.Yul # Yul functions are not propagated in the inheritance } contracts_visited.append(father) inherited_elements.update(functions) diff --git a/slither/core/declarations/custom_error.py b/slither/core/declarations/custom_error.py new file mode 100644 index 000000000..fc2066982 --- /dev/null +++ b/slither/core/declarations/custom_error.py @@ -0,0 +1,71 @@ +from typing import List, TYPE_CHECKING, Optional, Type, Union + +from slither.core.solidity_types import UserDefinedType +from slither.core.source_mapping.source_mapping import SourceMapping +from slither.core.variables.local_variable import LocalVariable + +if TYPE_CHECKING: + from slither.core.compilation_unit import SlitherCompilationUnit + + +class CustomError(SourceMapping): + def __init__(self, compilation_unit: "SlitherCompilationUnit"): + super().__init__() + self._name: str = "" + self._parameters: List[LocalVariable] = [] + self._compilation_unit = compilation_unit + + self._solidity_signature: Optional[str] = None + + @property + def name(self) -> str: + return self._name + + @name.setter + def name(self, new_name: str) -> None: + self._name = new_name + + @property + def parameters(self) -> List[LocalVariable]: + return self._parameters + + def add_parameters(self, p: "LocalVariable"): + self._parameters.append(p) + + @property + def compilation_unit(self) -> "SlitherCompilationUnit": + return self._compilation_unit + + # region Signature + ################################################################################### + ################################################################################### + + @staticmethod + def _convert_type_for_solidity_signature(t: Optional[Union[Type, List[Type]]]): + # pylint: disable=import-outside-toplevel + from slither.core.declarations import Contract + + if isinstance(t, UserDefinedType) and isinstance(t.type, Contract): + return "address" + return str(t) + + @property + def solidity_signature(self) -> str: + """ + Return a signature following the Solidity Standard + Contract and converted into address + :return: the solidity signature + """ + if self._solidity_signature is None: + parameters = [ + self._convert_type_for_solidity_signature(x.type) for x in self.parameters + ] + self._solidity_signature = self.name + "(" + ",".join(parameters) + ")" + return self._solidity_signature + + # endregion + ################################################################################### + ################################################################################### + + def __str__(self): + return "revert " + self.solidity_signature diff --git a/slither/core/declarations/custom_error_contract.py b/slither/core/declarations/custom_error_contract.py new file mode 100644 index 000000000..a96f12057 --- /dev/null +++ b/slither/core/declarations/custom_error_contract.py @@ -0,0 +1,12 @@ +from slither.core.children.child_contract import ChildContract +from slither.core.declarations.custom_error import CustomError + + +class CustomErrorContract(CustomError, ChildContract): + def is_declared_by(self, contract): + """ + Check if the element is declared by the contract + :param contract: + :return: + """ + return self.contract == contract diff --git a/slither/core/declarations/custom_error_top_level.py b/slither/core/declarations/custom_error_top_level.py new file mode 100644 index 000000000..f6463a528 --- /dev/null +++ b/slither/core/declarations/custom_error_top_level.py @@ -0,0 +1,6 @@ +from slither.core.declarations.custom_error import CustomError +from slither.core.declarations.top_level import TopLevel + + +class CustomErrorTopLevel(CustomError, TopLevel): + pass diff --git a/slither/core/declarations/function.py b/slither/core/declarations/function.py index feb97ac91..60ce01290 100644 --- a/slither/core/declarations/function.py +++ b/slither/core/declarations/function.py @@ -104,6 +104,12 @@ def _filter_state_variables_written(expressions: List["Expression"]): return ret +class FunctionLanguage(Enum): + Solidity = 0 + Yul = 1 + Vyper = 2 + + class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-public-methods """ Function class @@ -207,6 +213,9 @@ class Function(SourceMapping, metaclass=ABCMeta): # pylint: disable=too-many-pu self.compilation_unit: "SlitherCompilationUnit" = compilation_unit + # Assume we are analyzing Solidty by default + self.function_language: FunctionLanguage = FunctionLanguage.Solidity + ################################################################################### ################################################################################### # region General properties diff --git a/slither/core/declarations/solidity_variables.py b/slither/core/declarations/solidity_variables.py index 5a2218d18..4ae49c014 100644 --- a/slither/core/declarations/solidity_variables.py +++ b/slither/core/declarations/solidity_variables.py @@ -2,6 +2,7 @@ from typing import List, Dict, Union, TYPE_CHECKING from slither.core.context.context import Context +from slither.core.declarations.custom_error import CustomError from slither.core.solidity_types import ElementaryType, TypeInformation from slither.exceptions import SlitherException @@ -42,6 +43,7 @@ SOLIDITY_FUNCTIONS: Dict[str, List[str]] = { "require(bool,string)": [], "revert()": [], "revert(string)": [], + "revert ": [], "addmod(uint256,uint256,uint256)": ["uint256"], "mulmod(uint256,uint256,uint256)": ["uint256"], "keccak256()": ["bytes32"], @@ -184,3 +186,20 @@ class SolidityFunction: def __hash__(self): return hash(self.name) + + +class SolidityCustomRevert(SolidityFunction): + def __init__(self, custom_error: CustomError): # pylint: disable=super-init-not-called + self._name = "revert " + custom_error.solidity_signature + self._custom_error = custom_error + self._return_type: List[Union[TypeInformation, ElementaryType]] = [] + + def __eq__(self, other): + return ( + self.__class__ == other.__class__ + and self.name == other.name + and self._custom_error == other._custom_error + ) + + def __hash__(self): + return hash(hash(self.name) + hash(self._custom_error)) diff --git a/slither/detectors/erc/unindexed_event_parameters.py b/slither/detectors/erc/unindexed_event_parameters.py index b3045a19a..3962e2358 100644 --- a/slither/detectors/erc/unindexed_event_parameters.py +++ b/slither/detectors/erc/unindexed_event_parameters.py @@ -16,7 +16,7 @@ class UnindexedERC20EventParameters(AbstractDetector): WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters" - WIKI_TITLE = "Unindexed ERC20 event oarameters" + WIKI_TITLE = "Unindexed ERC20 event parameters" WIKI_DESCRIPTION = "Detects whether events defined by the `ERC20` specification that should have some parameters as `indexed` are missing the `indexed` keyword." # region wiki_exploit_scenario diff --git a/slither/detectors/statements/calls_in_loop.py b/slither/detectors/statements/calls_in_loop.py index cec24029c..7ea83f8fd 100644 --- a/slither/detectors/statements/calls_in_loop.py +++ b/slither/detectors/statements/calls_in_loop.py @@ -1,14 +1,51 @@ -from slither.core.cfg.node import NodeType +from typing import List +from slither.core.cfg.node import NodeType, Node from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification +from slither.core.declarations import Contract +from slither.utils.output import Output from slither.slithir.operations import ( HighLevelCall, LibraryCall, LowLevelCall, Send, Transfer, + InternalCall, ) +def detect_call_in_loop(contract: Contract) -> List[Node]: + ret: List[Node] = [] + for f in contract.functions_entry_points: + if f.is_implemented: + call_in_loop(f.entry_point, 0, [], ret) + + return ret + + +def call_in_loop(node: Node, in_loop_counter: int, visited: List[Node], ret: List[Node]) -> None: + if node in visited: + return + # shared visited + visited.append(node) + + if node.type == NodeType.STARTLOOP: + in_loop_counter += 1 + elif node.type == NodeType.ENDLOOP: + in_loop_counter -= 1 + + if in_loop_counter > 0: + for ir in node.all_slithir_operations(): + if isinstance(ir, (LowLevelCall, HighLevelCall, Send, Transfer)): + if isinstance(ir, LibraryCall): + continue + ret.append(ir.node) + if isinstance(ir, (InternalCall)): + call_in_loop(ir.function.entry_point, in_loop_counter, visited, ret) + + for son in node.sons: + call_in_loop(son, in_loop_counter, visited, ret) + + class MultipleCallsInLoop(AbstractDetector): ARGUMENT = "calls-loop" @@ -45,42 +82,11 @@ If one of the destinations has a fallback function that reverts, `bad` will alwa WIKI_RECOMMENDATION = "Favor [pull over push](https://github.com/ethereum/wiki/wiki/Safety#favor-pull-over-push-for-external-calls) strategy for external calls." - @staticmethod - def call_in_loop(node, in_loop, visited, ret): - if node in visited: - return - # shared visited - visited.append(node) - - if node.type == NodeType.STARTLOOP: - in_loop = True - elif node.type == NodeType.ENDLOOP: - in_loop = False - - if in_loop: - for ir in node.irs: - if isinstance(ir, (LowLevelCall, HighLevelCall, Send, Transfer)): - if isinstance(ir, LibraryCall): - continue - ret.append(node) - - for son in node.sons: - MultipleCallsInLoop.call_in_loop(son, in_loop, visited, ret) - - @staticmethod - def detect_call_in_loop(contract): - ret = [] - for f in contract.functions + contract.modifiers: - if f.contract_declarer == contract and f.is_implemented: - MultipleCallsInLoop.call_in_loop(f.entry_point, False, [], ret) - - return ret - - def _detect(self): + def _detect(self) -> List[Output]: """""" - results = [] + results: List[Output] = [] for c in self.compilation_unit.contracts_derived: - values = self.detect_call_in_loop(c) + values = detect_call_in_loop(c) for node in values: func = node.function diff --git a/slither/detectors/statements/costly_operations_in_loop.py b/slither/detectors/statements/costly_operations_in_loop.py index 5a07e44a7..d10cfaaf0 100644 --- a/slither/detectors/statements/costly_operations_in_loop.py +++ b/slither/detectors/statements/costly_operations_in_loop.py @@ -1,7 +1,45 @@ -from slither.core.cfg.node import NodeType -from slither.core.solidity_types.array_type import ArrayType -from slither.core.solidity_types.mapping_type import MappingType +from typing import List +from slither.core.cfg.node import NodeType, Node from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification +from slither.core.declarations import Contract +from slither.utils.output import Output +from slither.slithir.operations import InternalCall, OperationWithLValue +from slither.core.variables.state_variable import StateVariable + + +def detect_costly_operations_in_loop(contract: Contract) -> List[Node]: + ret: List[Node] = [] + for f in contract.functions_entry_points: + if f.is_implemented: + costly_operations_in_loop(f.entry_point, 0, [], ret) + + return ret + + +def costly_operations_in_loop( + node: Node, in_loop_counter: int, visited: List[Node], ret: List[Node] +) -> None: + if node in visited: + return + # shared visited + visited.append(node) + + if node.type == NodeType.STARTLOOP: + in_loop_counter += 1 + elif node.type == NodeType.ENDLOOP: + in_loop_counter -= 1 + + if in_loop_counter > 0: + for ir in node.all_slithir_operations(): + # Ignore Array/Mapping/Struct types for now + if isinstance(ir, OperationWithLValue) and isinstance(ir.lvalue, StateVariable): + ret.append(ir.node) + break + if isinstance(ir, (InternalCall)): + costly_operations_in_loop(ir.function.entry_point, in_loop_counter, visited, ret) + + for son in node.sons: + costly_operations_in_loop(son, in_loop_counter, visited, ret) class CostlyOperationsInLoop(AbstractDetector): @@ -49,44 +87,11 @@ Incrementing `state_variable` in a loop incurs a lot of gas because of expensive WIKI_RECOMMENDATION = "Use a local variable to hold the loop computation result." - @staticmethod - def costly_operations_in_loop(node, in_loop, visited, ret): - if node in visited: - return - # shared visited - visited.append(node) - - if node.type == NodeType.STARTLOOP: - in_loop = True - elif node.type == NodeType.ENDLOOP: - in_loop = False - - if in_loop: - sv_written = node.state_variables_written - for sv in sv_written: - # Ignore Array/Mapping/Struct types for now - if isinstance(sv.type, (ArrayType, MappingType)): - continue - ret.append(node) - break - - for son in node.sons: - CostlyOperationsInLoop.costly_operations_in_loop(son, in_loop, visited, ret) - - @staticmethod - def detect_costly_operations_in_loop(contract): - ret = [] - for f in contract.functions + contract.modifiers: - if f.contract_declarer == contract and f.is_implemented: - CostlyOperationsInLoop.costly_operations_in_loop(f.entry_point, False, [], ret) - - return ret - - def _detect(self): + def _detect(self) -> List[Output]: """""" - results = [] + results: List[Output] = [] for c in self.compilation_unit.contracts_derived: - values = self.detect_costly_operations_in_loop(c) + values = detect_costly_operations_in_loop(c) for node in values: func = node.function info = [func, " has costly operations inside a loop:\n"] diff --git a/slither/detectors/statements/incorrect_strict_equality.py b/slither/detectors/statements/incorrect_strict_equality.py index c6512e393..4a31380d8 100644 --- a/slither/detectors/statements/incorrect_strict_equality.py +++ b/slither/detectors/statements/incorrect_strict_equality.py @@ -5,6 +5,7 @@ from slither.analyses.data_dependency.data_dependency import is_dependent_ssa from slither.core.declarations import Function +from slither.core.declarations.function_top_level import FunctionTopLevel from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification from slither.slithir.operations import ( Assignment, @@ -106,6 +107,9 @@ contract Crowdsale{ taints += self.sources_taint for func in funcs: + # Disable the detector on top level function until we have good taint on those + if isinstance(func, FunctionTopLevel): + continue for node in func.nodes: for ir in node.irs_ssa: diff --git a/slither/printers/call/call_graph.py b/slither/printers/call/call_graph.py index 5adc24a89..e10db3f76 100644 --- a/slither/printers/call/call_graph.py +++ b/slither/printers/call/call_graph.py @@ -218,7 +218,12 @@ class PrinterCallGraph(AbstractPrinter): all_contracts_filename = "" if not filename.endswith(".dot"): - all_contracts_filename = f"{filename}.all_contracts.call-graph.dot" + if filename in ("", "."): + filename = "" + else: + filename += "." + all_contracts_filename = f"{filename}all_contracts.call-graph.dot" + if filename == ".dot": all_contracts_filename = "all_contracts.dot" @@ -227,7 +232,7 @@ class PrinterCallGraph(AbstractPrinter): with open(all_contracts_filename, "w", encoding="utf8") as f: info += f"Call Graph: {all_contracts_filename}\n" - # Avoid dupplicate funcitons due to different compilation unit + # Avoid duplicate functions due to different compilation unit all_functionss = [ compilation_unit.functions for compilation_unit in self.slither.compilation_units ] @@ -242,7 +247,7 @@ class PrinterCallGraph(AbstractPrinter): results.append((all_contracts_filename, content)) for derived_contract in self.slither.contracts_derived: - derived_output_filename = f"{filename}.{derived_contract.name}.call-graph.dot" + derived_output_filename = f"{filename}{derived_contract.name}.call-graph.dot" with open(derived_output_filename, "w", encoding="utf8") as f: info += f"Call Graph: {derived_output_filename}\n" content = "\n".join( diff --git a/slither/printers/inheritance/inheritance.py b/slither/printers/inheritance/inheritance.py index f487be73d..08c05f95f 100644 --- a/slither/printers/inheritance/inheritance.py +++ b/slither/printers/inheritance/inheritance.py @@ -30,9 +30,6 @@ class PrinterInheritance(AbstractPrinter): """ info = "Inheritance\n" - if not self.contracts: - return [] - info += blue("Child_Contract -> ") + green("Immediate_Base_Contracts") info += green(" [Not_Immediate_Base_Contracts]") diff --git a/slither/slithir/convert.py b/slither/slithir/convert.py index b9bc85c70..c467d245b 100644 --- a/slither/slithir/convert.py +++ b/slither/slithir/convert.py @@ -13,8 +13,10 @@ from slither.core.declarations import ( SolidityVariableComposed, Structure, ) +from slither.core.declarations.custom_error import CustomError from slither.core.declarations.function_contract import FunctionContract from slither.core.declarations.solidity_import_placeholder import SolidityImportPlaceHolder +from slither.core.declarations.solidity_variables import SolidityCustomRevert from slither.core.expressions import Identifier, Literal from slither.core.solidity_types import ( ArrayType, @@ -621,7 +623,19 @@ def propagate_types(ir, node: "Node"): # pylint: disable=too-many-locals b.set_expression(ir.expression) b.set_node(ir.node) return b - if ir.variable_right == "selector" and isinstance(ir.variable_left.type, Function): + if ir.variable_right == "selector" and isinstance(ir.variable_left, (CustomError)): + assignment = Assignment( + ir.lvalue, + Constant(str(get_function_id(ir.variable_left.solidity_signature))), + ElementaryType("bytes4"), + ) + assignment.set_expression(ir.expression) + assignment.set_node(ir.node) + assignment.lvalue.set_type(ElementaryType("bytes4")) + return assignment + if ir.variable_right == "selector" and isinstance( + ir.variable_left.type, (Function) + ): assignment = Assignment( ir.lvalue, Constant(str(get_function_id(ir.variable_left.type.full_name))), @@ -941,6 +955,12 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]): # pylint: dis s.set_expression(ins.expression) return s + if isinstance(ins.called, CustomError): + sol_function = SolidityCustomRevert(ins.called) + s = SolidityCall(sol_function, ins.nbr_arguments, ins.lvalue, ins.type_call) + s.set_expression(ins.expression) + return s + if isinstance(ins.ori, TmpNewElementaryType): n = NewElementaryType(ins.ori.type, ins.lvalue) n.set_expression(ins.expression) diff --git a/slither/slithir/operations/member.py b/slither/slithir/operations/member.py index 86ea1fb60..a2ab5be17 100644 --- a/slither/slithir/operations/member.py +++ b/slither/slithir/operations/member.py @@ -1,4 +1,5 @@ from slither.core.declarations import Contract, Function +from slither.core.declarations.custom_error import CustomError from slither.core.declarations.enum import Enum from slither.core.declarations.solidity_import_placeholder import SolidityImportPlaceHolder from slither.slithir.operations.lvalue import OperationWithLValue @@ -21,7 +22,7 @@ class Member(OperationWithLValue): # } # } assert is_valid_rvalue(variable_left) or isinstance( - variable_left, (Contract, Enum, Function, SolidityImportPlaceHolder) + variable_left, (Contract, Enum, Function, CustomError, SolidityImportPlaceHolder) ) assert isinstance(variable_right, Constant) diff --git a/slither/slithir/tmp_operations/tmp_call.py b/slither/slithir/tmp_operations/tmp_call.py index 2157d0323..adb461e50 100644 --- a/slither/slithir/tmp_operations/tmp_call.py +++ b/slither/slithir/tmp_operations/tmp_call.py @@ -5,6 +5,7 @@ from slither.core.declarations import ( SolidityFunction, Structure, ) +from slither.core.declarations.custom_error import CustomError from slither.core.variables.variable import Variable from slither.slithir.operations.lvalue import OperationWithLValue @@ -20,6 +21,7 @@ class TmpCall(OperationWithLValue): # pylint: disable=too-many-instance-attribu SolidityFunction, Structure, Event, + CustomError, ), ) super().__init__() diff --git a/slither/slithir/utils/ssa.py b/slither/slithir/utils/ssa.py index 44c52794a..663f4c436 100644 --- a/slither/slithir/utils/ssa.py +++ b/slither/slithir/utils/ssa.py @@ -284,7 +284,13 @@ def generate_ssa_irs( if isinstance(new_ir.rvalue, ReferenceVariable): refers_to = new_ir.rvalue.points_to_origin new_ir.lvalue.add_refers_to(refers_to) - else: + # Discard Constant + # This can happen on yul, like + # assembly { var.slot = some_value } + # Here we do not keep track of the references as we do not track + # such low level manipulation + # However we could extend our storage model to do so in the future + elif not isinstance(new_ir.rvalue, Constant): new_ir.lvalue.add_refers_to(new_ir.rvalue) for succ in node.dominator_successors: diff --git a/slither/solc_parsing/declarations/contract.py b/slither/solc_parsing/declarations/contract.py index dde0053c4..dba0bf771 100644 --- a/slither/solc_parsing/declarations/contract.py +++ b/slither/solc_parsing/declarations/contract.py @@ -3,8 +3,10 @@ from typing import List, Dict, Callable, TYPE_CHECKING, Union, Set from slither.core.declarations import Modifier, Event, EnumContract, StructureContract, Function from slither.core.declarations.contract import Contract +from slither.core.declarations.custom_error_contract import CustomErrorContract from slither.core.declarations.function_contract import FunctionContract from slither.core.variables.state_variable import StateVariable +from slither.solc_parsing.declarations.custom_error import CustomErrorSolc from slither.solc_parsing.declarations.event import EventSolc from slither.solc_parsing.declarations.function import FunctionSolc from slither.solc_parsing.declarations.modifier import ModifierSolc @@ -35,15 +37,17 @@ class ContractSolc: self._modifiersNotParsed: List[Dict] = [] self._functions_no_params: List[FunctionSolc] = [] self._modifiers_no_params: List[ModifierSolc] = [] - self._eventsNotParsed: List[EventSolc] = [] + self._eventsNotParsed: List[Dict] = [] self._variablesNotParsed: List[Dict] = [] self._enumsNotParsed: List[Dict] = [] self._structuresNotParsed: List[Dict] = [] self._usingForNotParsed: List[Dict] = [] + self._customErrorParsed: List[Dict] = [] self._functions_parser: List[FunctionSolc] = [] self._modifiers_parser: List[ModifierSolc] = [] self._structures_parser: List[StructureContractSolc] = [] + self._custom_errors_parser: List[CustomErrorSolc] = [] self._is_analyzed: bool = False @@ -246,6 +250,8 @@ class ContractSolc: self._structuresNotParsed.append(item) elif item[self.get_key()] == "UsingForDirective": self._usingForNotParsed.append(item) + elif item[self.get_key()] == "ErrorDefinition": + self._customErrorParsed.append(item) else: raise ParsingError("Unknown contract item: " + item[self.get_key()]) return @@ -268,6 +274,23 @@ class ContractSolc: self._parse_struct(struct) self._structuresNotParsed = None + def _parse_custom_error(self, custom_error: Dict): + ce = CustomErrorContract(self.compilation_unit) + ce.set_contract(self._contract) + ce.set_offset(custom_error["src"], self.compilation_unit) + + ce_parser = CustomErrorSolc(ce, custom_error, self._slither_parser) + self._contract.custom_errors_as_dict[ce.name] = ce + self._custom_errors_parser.append(ce_parser) + + def parse_custom_errors(self): + for father in self._contract.inheritance_reverse: + self._contract.custom_errors_as_dict.update(father.custom_errors_as_dict) + + for custom_error in self._customErrorParsed: + self._parse_custom_error(custom_error) + self._customErrorParsed = None + def parse_state_variables(self): for father in self._contract.inheritance_reverse: self._contract.variables_as_dict.update(father.variables_as_dict) @@ -600,6 +623,10 @@ class ContractSolc: except (VariableNotFound, KeyError) as e: self.log_incorrect_parsing(f"Missing struct {e}") + def analyze_custom_errors(self): + for custom_error in self._custom_errors_parser: + custom_error.analyze_params() + def analyze_events(self): try: for father in self._contract.inheritance_reverse: @@ -640,6 +667,7 @@ class ContractSolc: self._enumsNotParsed = [] self._structuresNotParsed = [] self._usingForNotParsed = [] + self._customErrorParsed = [] # endregion ################################################################################### diff --git a/slither/solc_parsing/declarations/custom_error.py b/slither/solc_parsing/declarations/custom_error.py new file mode 100644 index 000000000..417e5bc52 --- /dev/null +++ b/slither/solc_parsing/declarations/custom_error.py @@ -0,0 +1,101 @@ +from typing import TYPE_CHECKING, Dict + +from slither.core.declarations.custom_error import CustomError +from slither.core.variables.local_variable import LocalVariable +from slither.solc_parsing.variables.local_variable import LocalVariableSolc + +if TYPE_CHECKING: + from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc + + +# Part of the code was copied from the function parsing +# In the long term we should refactor these two classes to merge the duplicated code + + +class CustomErrorSolc: + def __init__( + self, + custom_error: CustomError, + custom_error_data: dict, + slither_parser: "SlitherCompilationUnitSolc", + ): + self._slither_parser: "SlitherCompilationUnitSolc" = slither_parser + self._custom_error = custom_error + custom_error.name = custom_error_data["name"] + self._params_was_analyzed = False + + if not self._slither_parser.is_compact_ast: + custom_error_data = custom_error_data["attributes"] + self._custom_error_data = custom_error_data + + def analyze_params(self): + # Can be re-analyzed due to inheritance + if self._params_was_analyzed: + return + + self._params_was_analyzed = True + + if self._slither_parser.is_compact_ast: + params = self._custom_error_data["parameters"] + else: + children = self._custom_error_data[self.get_children("children")] + # It uses to be + # params = children[0] + # returns = children[1] + # But from Solidity 0.6.3 to 0.6.10 (included) + # Comment above a function might be added in the children + child_iter = iter( + [child for child in children if child[self.get_key()] == "ParameterList"] + ) + params = next(child_iter) + + if params: + self._parse_params(params) + + @property + def is_compact_ast(self) -> bool: + return self._slither_parser.is_compact_ast + + def get_key(self) -> str: + return self._slither_parser.get_key() + + def get_children(self, key: str) -> str: + if self._slither_parser.is_compact_ast: + return key + return "children" + + def _parse_params(self, params: Dict): + assert params[self.get_key()] == "ParameterList" + + if self._slither_parser.is_compact_ast: + params = params["parameters"] + else: + params = params[self.get_children("children")] + + for param in params: + assert param[self.get_key()] == "VariableDeclaration" + local_var = self._add_param(param) + self._custom_error.add_parameters(local_var.underlying_variable) + + def _add_param(self, param: Dict) -> LocalVariableSolc: + + local_var = LocalVariable() + local_var.set_offset(param["src"], self._slither_parser.compilation_unit) + + local_var_parser = LocalVariableSolc(local_var, param) + + local_var_parser.analyze(self) + + # see https://solidity.readthedocs.io/en/v0.4.24/types.html?highlight=storage%20location#data-location + if local_var.location == "default": + local_var.set_location("memory") + + return local_var_parser + + @property + def underlying_custom_error(self) -> CustomError: + return self._custom_error + + @property + def slither_parser(self) -> "SlitherCompilationUnitSolc": + return self._slither_parser diff --git a/slither/solc_parsing/declarations/function.py b/slither/solc_parsing/declarations/function.py index c3f7d8fd9..4bc10f1ff 100644 --- a/slither/solc_parsing/declarations/function.py +++ b/slither/solc_parsing/declarations/function.py @@ -10,12 +10,11 @@ from slither.core.declarations.function import ( FunctionType, ) from slither.core.declarations.function_contract import FunctionContract - from slither.core.expressions import AssignmentOperation from slither.core.variables.local_variable import LocalVariable from slither.core.variables.local_variable_init_from_tuple import LocalVariableInitFromTuple - from slither.solc_parsing.cfg.node import NodeSolc +from slither.solc_parsing.exceptions import ParsingError from slither.solc_parsing.expressions.expression_parsing import parse_expression from slither.solc_parsing.variables.local_variable import LocalVariableSolc from slither.solc_parsing.variables.local_variable_init_from_tuple import ( @@ -26,13 +25,11 @@ from slither.solc_parsing.yul.parse_yul import YulBlock from slither.utils.expression_manipulations import SplitTernaryExpression from slither.visitors.expression.export_values import ExportValues from slither.visitors.expression.has_conditional import HasConditional -from slither.solc_parsing.exceptions import ParsingError if TYPE_CHECKING: from slither.core.expressions.expression import Expression from slither.solc_parsing.declarations.contract import ContractSolc from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc - from slither.core.slither_core import SlitherCore from slither.core.compilation_unit import SlitherCompilationUnit @@ -1012,6 +1009,15 @@ class FunctionSolc: node = self._parse_try_catch(statement, node) # elif name == 'TryCatchClause': # self._parse_catch(statement, node) + elif name == "RevertStatement": + if self.is_compact_ast: + expression = statement[self.get_children("errorCall")] + else: + expression = statement[self.get_children("errorCall")][0] + new_node = self._new_node(NodeType.EXPRESSION, statement["src"], scope) + new_node.add_unparsed_expression(expression) + link_underlying_nodes(node, new_node) + node = new_node else: raise ParsingError("Statement not parsed %s" % name) diff --git a/slither/solc_parsing/expressions/find_variable.py b/slither/solc_parsing/expressions/find_variable.py index 3edb29d98..a981db252 100644 --- a/slither/solc_parsing/expressions/find_variable.py +++ b/slither/solc_parsing/expressions/find_variable.py @@ -2,6 +2,7 @@ from typing import TYPE_CHECKING, Optional, Union, List, Tuple from slither.core.declarations import Event, Enum, Structure from slither.core.declarations.contract import Contract +from slither.core.declarations.custom_error import CustomError from slither.core.declarations.function import Function from slither.core.declarations.function_contract import FunctionContract from slither.core.declarations.function_top_level import FunctionTopLevel @@ -100,7 +101,7 @@ def _find_variable_in_function_parser( def _find_top_level( var_name: str, sl: "SlitherCompilationUnit" -) -> Tuple[Optional[Union[Enum, Structure, SolidityImportPlaceHolder]], bool]: +) -> Tuple[Optional[Union[Enum, Structure, SolidityImportPlaceHolder, CustomError]], bool]: """ Return the top level variable use, and a boolean indicating if the variable returning was cretead If the variable was created, it has no source_mapping @@ -127,6 +128,11 @@ def _find_top_level( new_val = SolidityImportPlaceHolder(import_directive) return new_val, True + # Note for now solidity prevent two custom error from having the same name + for custom_error in sl.custom_errors: + if custom_error.solidity_signature == var_name: + return custom_error, False + return None, False @@ -135,7 +141,7 @@ def _find_in_contract( contract: Optional[Contract], contract_declarer: Optional[Contract], is_super: bool, -) -> Optional[Union[Variable, Function, Contract, Event, Enum, Structure,]]: +) -> Optional[Union[Variable, Function, Contract, Event, Enum, Structure, CustomError]]: if contract is None or contract_declarer is None: return None @@ -191,6 +197,14 @@ def _find_in_contract( if var_name in enums: return enums[var_name] + # Note: contract.custom_errors_as_dict uses the name (not the sol sig) as key + # This is because when the dic is populated the underlying object is not yet parsed + # As a result, we need to iterate over all the custom errors here instead of using the dict + custom_errors = contract.custom_errors + for custom_error in custom_errors: + if var_name == custom_error.solidity_signature: + return custom_error + # If the enum is refered as its name rather than its canonicalName enums = {e.name: e for e in contract.enums} if var_name in enums: @@ -260,6 +274,7 @@ def find_variable( Event, Enum, Structure, + CustomError, ], bool, ]: @@ -384,4 +399,4 @@ def find_variable( if ret: return ret, False - raise VariableNotFound("Variable not found: {} (context {})".format(var_name, caller_context)) + raise VariableNotFound("Variable not found: {} (context {})".format(var_name, contract)) diff --git a/slither/solc_parsing/slither_compilation_unit_solc.py b/slither/solc_parsing/slither_compilation_unit_solc.py index 35c94e493..356b55db9 100644 --- a/slither/solc_parsing/slither_compilation_unit_solc.py +++ b/slither/solc_parsing/slither_compilation_unit_solc.py @@ -8,6 +8,7 @@ from typing import List, Dict from slither.analyses.data_dependency.data_dependency import compute_dependency from slither.core.compilation_unit import SlitherCompilationUnit from slither.core.declarations import Contract +from slither.core.declarations.custom_error_top_level import CustomErrorTopLevel from slither.core.declarations.enum_top_level import EnumTopLevel from slither.core.declarations.function_top_level import FunctionTopLevel from slither.core.declarations.import_directive import Import @@ -16,6 +17,7 @@ from slither.core.declarations.structure_top_level import StructureTopLevel from slither.core.variables.top_level_variable import TopLevelVariable from slither.exceptions import SlitherException from slither.solc_parsing.declarations.contract import ContractSolc +from slither.solc_parsing.declarations.custom_error import CustomErrorSolc 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 @@ -37,6 +39,7 @@ class SlitherCompilationUnitSolc: self._underlying_contract_to_parser: Dict[Contract, ContractSolc] = dict() self._structures_top_level_parser: List[StructureTopLevelSolc] = [] + self._custom_error_parser: List[CustomErrorSolc] = [] self._variables_top_level_parser: List[TopLevelVariableSolc] = [] self._functions_top_level_parser: List[FunctionSolc] = [] @@ -146,7 +149,7 @@ class SlitherCompilationUnitSolc: def parse_top_level_from_loaded_json( self, data_loaded: Dict, filename: str - ): # pylint: disable=too-many-branches,too-many-statements + ): # pylint: disable=too-many-branches,too-many-statements,too-many-locals if "nodeType" in data_loaded: self._is_compact_ast = True @@ -164,6 +167,8 @@ class SlitherCompilationUnitSolc: logger.error("solc version is not supported") return + if self.get_children() not in data_loaded: + return for top_level_data in data_loaded[self.get_children()]: if top_level_data[self.get_key()] == "ContractDefinition": contract = Contract(self._compilation_unit) @@ -235,6 +240,14 @@ class SlitherCompilationUnitSolc: self._functions_top_level_parser.append(func_parser) self.add_function_or_modifier_parser(func_parser) + elif top_level_data[self.get_key()] == "ErrorDefinition": + custom_error = CustomErrorTopLevel(self._compilation_unit) + custom_error.set_offset(top_level_data["src"], self._compilation_unit) + + custom_error_parser = CustomErrorSolc(custom_error, top_level_data, self) + self._compilation_unit.custom_errors.append(custom_error) + self._custom_error_parser.append(custom_error_parser) + else: raise SlitherException(f"Top level {top_level_data[self.get_key()]} not supported") @@ -522,6 +535,7 @@ Please rename it, this name is reserved for Slither's internals""" contract.parse_state_variables() contract.parse_modifiers() contract.parse_functions() + contract.parse_custom_errors() contract.set_is_analyzed(True) def _analyze_struct_events(self, contract: ContractSolc): @@ -534,6 +548,7 @@ Please rename it, this name is reserved for Slither's internals""" contract.analyze_events() contract.analyze_using_for() + contract.analyze_custom_errors() contract.set_is_analyzed(True) @@ -556,6 +571,10 @@ Please rename it, this name is reserved for Slither's internals""" func_parser.analyze_params() self._compilation_unit.add_function(func_parser.underlying_function) + def _analyze_params_custom_error(self): + for custom_error_parser in self._custom_error_parser: + custom_error_parser.analyze_params() + def _analyze_content_top_level_function(self): try: for func_parser in self._functions_top_level_parser: @@ -569,6 +588,7 @@ Please rename it, this name is reserved for Slither's internals""" contract.analyze_params_modifiers() contract.analyze_params_functions() self._analyze_params_top_level_function() + self._analyze_params_custom_error() contract.analyze_state_variables() diff --git a/slither/solc_parsing/solidity_types/type_parsing.py b/slither/solc_parsing/solidity_types/type_parsing.py index d1c4e83cd..21b819e75 100644 --- a/slither/solc_parsing/solidity_types/type_parsing.py +++ b/slither/solc_parsing/solidity_types/type_parsing.py @@ -190,7 +190,12 @@ def _find_from_type_name( # pylint: disable=too-many-locals,too-many-branches,t return UserDefinedType(var_type) -def parse_type(t: Union[Dict, UnknownType], caller_context): +def parse_type( + t: Union[Dict, UnknownType], + caller_context: Union[ + "SlitherCompilationUnitSolc", "FunctionSolc", "ContractSolc", "CustomSolc" + ], +): # local import to avoid circular dependency # pylint: disable=too-many-locals,too-many-branches,too-many-statements # pylint: disable=import-outside-toplevel @@ -198,17 +203,22 @@ def parse_type(t: Union[Dict, UnknownType], caller_context): from slither.solc_parsing.variables.function_type_variable import FunctionTypeVariableSolc from slither.solc_parsing.declarations.contract import ContractSolc from slither.solc_parsing.declarations.function import FunctionSolc + from slither.solc_parsing.declarations.custom_error import CustomErrorSolc from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc sl: "SlitherCompilationUnit" # Note: for convenicence top level functions use the same parser than function in contract # but contract_parser is set to None - if isinstance(caller_context, SlitherCompilationUnitSolc) or ( + if isinstance(caller_context, (SlitherCompilationUnitSolc, CustomErrorSolc)) or ( isinstance(caller_context, FunctionSolc) and caller_context.contract_parser is None ): + structures_direct_access: List["Structure"] if isinstance(caller_context, SlitherCompilationUnitSolc): sl = caller_context.compilation_unit next_context = caller_context + elif isinstance(caller_context, CustomErrorSolc): + sl = caller_context.underlying_custom_error.compilation_unit + next_context = caller_context.slither_parser else: assert isinstance(caller_context, FunctionSolc) sl = caller_context.underlying_function.compilation_unit @@ -235,13 +245,13 @@ def parse_type(t: Union[Dict, UnknownType], caller_context): contract = caller_context.underlying_contract next_context = caller_context - structures_direct_access = ( - contract.structures + contract.compilation_unit.structures_top_level - ) + structures_direct_access = contract.structures + structures_direct_access += contract.compilation_unit.structures_top_level all_structuress = [c.structures for c in contract.compilation_unit.contracts] all_structures = [item for sublist in all_structuress for item in sublist] all_structures += contract.compilation_unit.structures_top_level - enums_direct_access = contract.enums + contract.compilation_unit.enums_top_level + enums_direct_access: List["Enum"] = contract.enums + enums_direct_access += contract.compilation_unit.enums_top_level all_enumss = [c.enums for c in contract.compilation_unit.contracts] all_enums = [item for sublist in all_enumss for item in sublist] all_enums += contract.compilation_unit.enums_top_level diff --git a/slither/solc_parsing/yul/parse_yul.py b/slither/solc_parsing/yul/parse_yul.py index 624e666d3..783f03761 100644 --- a/slither/solc_parsing/yul/parse_yul.py +++ b/slither/solc_parsing/yul/parse_yul.py @@ -10,7 +10,9 @@ from slither.core.declarations import ( SolidityFunction, Contract, ) +from slither.core.declarations.function import FunctionLanguage from slither.core.declarations.function_contract import FunctionContract +from slither.core.declarations.function_top_level import FunctionTopLevel from slither.core.expressions import ( Literal, AssignmentOperation, @@ -353,7 +355,13 @@ def convert_yul_block( def convert_yul_function_definition( root: YulScope, parent: YulNode, ast: Dict, node_scope: Union[Function, Scope] ) -> YulNode: - func = FunctionContract(root.compilation_unit) + top_node_scope = node_scope + while not isinstance(top_node_scope, Function): + top_node_scope = top_node_scope.father + + assert isinstance(top_node_scope, (FunctionTopLevel, FunctionContract)) + func = type(top_node_scope)(root.compilation_unit) + func.function_language = FunctionLanguage.Yul yul_function = YulFunction(func, root, ast, node_scope) root.contract.add_function(func) @@ -707,6 +715,15 @@ def parse_yul_function_call(root: YulScope, node: YulNode, ast: Dict) -> Optiona raise SlitherException(f"unexpected function call target type {str(type(ident.value))}") +def _check_for_state_variable_name(root: YulScope, potential_name: str) -> Optional[Identifier]: + root_function = root.function + if isinstance(root_function, FunctionContract): + var = root_function.contract.get_state_variable_from_name(potential_name) + if var: + return Identifier(var) + return None + + def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[Expression]: name = ast["name"] @@ -739,17 +756,17 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[ # check for magic suffixes if name.endswith("_slot") or name.endswith(".slot"): potential_name = name[:-5] - var = root.function.contract.get_state_variable_from_name(potential_name) - if var: - return Identifier(var) + variable_found = _check_for_state_variable_name(root, potential_name) + if variable_found: + return variable_found var = root.function.get_local_variable_from_name(potential_name) if var and var.is_storage: return Identifier(var) if name.endswith("_offset") or name.endswith(".offset"): potential_name = name[:-7] - var = root.function.contract.get_state_variable_from_name(potential_name) - if var: - return Identifier(var) + variable_found = _check_for_state_variable_name(root, potential_name) + if variable_found: + return variable_found raise SlitherException(f"unresolved reference to identifier {name}") diff --git a/slither/tools/flattening/flattening.py b/slither/tools/flattening/flattening.py index f2c721fcd..a1dbc0a9d 100644 --- a/slither/tools/flattening/flattening.py +++ b/slither/tools/flattening/flattening.py @@ -88,7 +88,7 @@ class Flattening: :return: """ src_mapping = contract.source_mapping - content = self._slither.source_code[src_mapping["filename_absolute"]].encode("utf8") + content = self._slither.source_code[src_mapping["filename_absolute"]] start = src_mapping["start"] end = src_mapping["start"] + src_mapping["length"] @@ -171,7 +171,7 @@ class Flattening: index = index - start if patch_type == "public_to_external": content = content[:index] + "public" + content[index + len("external") :] - if patch_type == "private_to_internal": + elif patch_type == "private_to_internal": content = content[:index] + "internal" + content[index + len("private") :] elif patch_type == "calldata_to_memory": content = content[:index] + "memory" + content[index + len("calldata") :] @@ -179,7 +179,7 @@ class Flattening: assert patch_type == "line_removal" content = content[:index] + " // " + content[index:] - self._source_codes[contract] = content.decode("utf8") + self._source_codes[contract] = content def _pragmas(self) -> str: """ diff --git a/tests/ast-parsing/compile/assembly-0.8.10-compact.zip b/tests/ast-parsing/compile/assembly-0.8.10-compact.zip new file mode 100644 index 000000000..ffec4292f Binary files /dev/null and b/tests/ast-parsing/compile/assembly-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/assembly-0.8.8-compact.zip b/tests/ast-parsing/compile/assembly-0.8.8-compact.zip new file mode 100644 index 000000000..abaff9935 Binary files /dev/null and b/tests/ast-parsing/compile/assembly-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/assembly-0.8.9-compact.zip b/tests/ast-parsing/compile/assembly-0.8.9-compact.zip new file mode 100644 index 000000000..bcb38aec0 Binary files /dev/null and b/tests/ast-parsing/compile/assembly-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/assignment-0.8.10-compact.zip b/tests/ast-parsing/compile/assignment-0.8.10-compact.zip new file mode 100644 index 000000000..926f4879a Binary files /dev/null and b/tests/ast-parsing/compile/assignment-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/assignment-0.8.8-compact.zip b/tests/ast-parsing/compile/assignment-0.8.8-compact.zip new file mode 100644 index 000000000..234d1d6a5 Binary files /dev/null and b/tests/ast-parsing/compile/assignment-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/assignment-0.8.9-compact.zip b/tests/ast-parsing/compile/assignment-0.8.9-compact.zip new file mode 100644 index 000000000..ada3082a6 Binary files /dev/null and b/tests/ast-parsing/compile/assignment-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/binaryoperation-0.8.10-compact.zip b/tests/ast-parsing/compile/binaryoperation-0.8.10-compact.zip new file mode 100644 index 000000000..4e9639131 Binary files /dev/null and b/tests/ast-parsing/compile/binaryoperation-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/binaryoperation-0.8.8-compact.zip b/tests/ast-parsing/compile/binaryoperation-0.8.8-compact.zip new file mode 100644 index 000000000..d1b83266d Binary files /dev/null and b/tests/ast-parsing/compile/binaryoperation-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/binaryoperation-0.8.9-compact.zip b/tests/ast-parsing/compile/binaryoperation-0.8.9-compact.zip new file mode 100644 index 000000000..a2a135b31 Binary files /dev/null and b/tests/ast-parsing/compile/binaryoperation-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/break-0.8.10-compact.zip b/tests/ast-parsing/compile/break-0.8.10-compact.zip new file mode 100644 index 000000000..f2f74a8d9 Binary files /dev/null and b/tests/ast-parsing/compile/break-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/break-0.8.8-compact.zip b/tests/ast-parsing/compile/break-0.8.8-compact.zip new file mode 100644 index 000000000..0cbbb227f Binary files /dev/null and b/tests/ast-parsing/compile/break-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/break-0.8.9-compact.zip b/tests/ast-parsing/compile/break-0.8.9-compact.zip new file mode 100644 index 000000000..a9e745160 Binary files /dev/null and b/tests/ast-parsing/compile/break-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/call_to_variable-0.8.10-compact.zip b/tests/ast-parsing/compile/call_to_variable-0.8.10-compact.zip new file mode 100644 index 000000000..d5c17590a Binary files /dev/null and b/tests/ast-parsing/compile/call_to_variable-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/call_to_variable-0.8.8-compact.zip b/tests/ast-parsing/compile/call_to_variable-0.8.8-compact.zip new file mode 100644 index 000000000..b52e3d53d Binary files /dev/null and b/tests/ast-parsing/compile/call_to_variable-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/call_to_variable-0.8.9-compact.zip b/tests/ast-parsing/compile/call_to_variable-0.8.9-compact.zip new file mode 100644 index 000000000..6813247c9 Binary files /dev/null and b/tests/ast-parsing/compile/call_to_variable-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/comment-0.8.10-compact.zip b/tests/ast-parsing/compile/comment-0.8.10-compact.zip new file mode 100644 index 000000000..75f80ed19 Binary files /dev/null and b/tests/ast-parsing/compile/comment-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/comment-0.8.8-compact.zip b/tests/ast-parsing/compile/comment-0.8.8-compact.zip new file mode 100644 index 000000000..58b11d40d Binary files /dev/null and b/tests/ast-parsing/compile/comment-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/comment-0.8.9-compact.zip b/tests/ast-parsing/compile/comment-0.8.9-compact.zip new file mode 100644 index 000000000..875551dab Binary files /dev/null and b/tests/ast-parsing/compile/comment-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/conditional-0.8.10-compact.zip b/tests/ast-parsing/compile/conditional-0.8.10-compact.zip new file mode 100644 index 000000000..a3da084fb Binary files /dev/null and b/tests/ast-parsing/compile/conditional-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/conditional-0.8.8-compact.zip b/tests/ast-parsing/compile/conditional-0.8.8-compact.zip new file mode 100644 index 000000000..5180db7a4 Binary files /dev/null and b/tests/ast-parsing/compile/conditional-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/conditional-0.8.9-compact.zip b/tests/ast-parsing/compile/conditional-0.8.9-compact.zip new file mode 100644 index 000000000..7202d6986 Binary files /dev/null and b/tests/ast-parsing/compile/conditional-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/continue-0.8.10-compact.zip b/tests/ast-parsing/compile/continue-0.8.10-compact.zip new file mode 100644 index 000000000..5df679dea Binary files /dev/null and b/tests/ast-parsing/compile/continue-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/continue-0.8.8-compact.zip b/tests/ast-parsing/compile/continue-0.8.8-compact.zip new file mode 100644 index 000000000..a0a65f4a6 Binary files /dev/null and b/tests/ast-parsing/compile/continue-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/continue-0.8.9-compact.zip b/tests/ast-parsing/compile/continue-0.8.9-compact.zip new file mode 100644 index 000000000..6a16ee4d7 Binary files /dev/null and b/tests/ast-parsing/compile/continue-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/contract-0.8.10-compact.zip b/tests/ast-parsing/compile/contract-0.8.10-compact.zip new file mode 100644 index 000000000..913a9910e Binary files /dev/null and b/tests/ast-parsing/compile/contract-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/contract-0.8.8-compact.zip b/tests/ast-parsing/compile/contract-0.8.8-compact.zip new file mode 100644 index 000000000..c709b73c0 Binary files /dev/null and b/tests/ast-parsing/compile/contract-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/contract-0.8.9-compact.zip b/tests/ast-parsing/compile/contract-0.8.9-compact.zip new file mode 100644 index 000000000..c91c147eb Binary files /dev/null and b/tests/ast-parsing/compile/contract-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.0-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.0-legacy.zip new file mode 100644 index 000000000..45aa93540 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.1-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.1-legacy.zip new file mode 100644 index 000000000..4da0d8d93 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.10-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.10-legacy.zip new file mode 100644 index 000000000..db3215cb2 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.11-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.11-legacy.zip new file mode 100644 index 000000000..2718b2552 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.12-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.12-compact.zip new file mode 100644 index 000000000..2921a0588 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.12-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.12-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.12-legacy.zip new file mode 100644 index 000000000..95efd03df Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.13-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.13-compact.zip new file mode 100644 index 000000000..c0acaafca Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.13-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.13-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.13-legacy.zip new file mode 100644 index 000000000..61849e80e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.13-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.14-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.14-compact.zip new file mode 100644 index 000000000..0b910af62 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.14-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.14-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.14-legacy.zip new file mode 100644 index 000000000..84e9aa286 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.15-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.15-compact.zip new file mode 100644 index 000000000..c3662208b Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.15-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.15-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.15-legacy.zip new file mode 100644 index 000000000..6966f4154 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.15-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.16-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.16-compact.zip new file mode 100644 index 000000000..7c7995bab Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.16-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.16-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.16-legacy.zip new file mode 100644 index 000000000..5427c26e9 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.17-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.17-compact.zip new file mode 100644 index 000000000..db9833f07 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.17-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.17-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.17-legacy.zip new file mode 100644 index 000000000..6cf97274b Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.17-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.18-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.18-compact.zip new file mode 100644 index 000000000..efc780ef6 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.18-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.18-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.18-legacy.zip new file mode 100644 index 000000000..bc6af6a43 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.18-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.19-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.19-compact.zip new file mode 100644 index 000000000..1174950a7 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.19-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.19-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.19-legacy.zip new file mode 100644 index 000000000..e75033abe Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.19-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.2-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.2-legacy.zip new file mode 100644 index 000000000..2541a7b92 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.20-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.20-compact.zip new file mode 100644 index 000000000..09b4aae6e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.20-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.20-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.20-legacy.zip new file mode 100644 index 000000000..b3e04f680 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.20-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.21-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.21-compact.zip new file mode 100644 index 000000000..84f3633d3 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.21-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.21-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.21-legacy.zip new file mode 100644 index 000000000..62d823edd Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.21-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.22-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.22-compact.zip new file mode 100644 index 000000000..7cf966851 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.22-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.22-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.22-legacy.zip new file mode 100644 index 000000000..4224e17ec Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.22-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.23-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.23-compact.zip new file mode 100644 index 000000000..8238a4914 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.23-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.23-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.23-legacy.zip new file mode 100644 index 000000000..1b46a9bca Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.23-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.24-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.24-compact.zip new file mode 100644 index 000000000..3225144eb Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.24-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.24-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.24-legacy.zip new file mode 100644 index 000000000..b61f364ff Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.24-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.25-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.25-compact.zip new file mode 100644 index 000000000..5a44e6a4a Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.25-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.25-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.25-legacy.zip new file mode 100644 index 000000000..e05ce9631 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.25-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.26-compact.zip b/tests/ast-parsing/compile/custom_error-0.4.26-compact.zip new file mode 100644 index 000000000..7585ea209 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.26-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.26-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.26-legacy.zip new file mode 100644 index 000000000..4cfaa11d3 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.26-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.3-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.3-legacy.zip new file mode 100644 index 000000000..1b53b6cde Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.4-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.4-legacy.zip new file mode 100644 index 000000000..d3a039d69 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.5-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.5-legacy.zip new file mode 100644 index 000000000..7f57e57d7 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.6-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.6-legacy.zip new file mode 100644 index 000000000..079a8b892 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.7-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.7-legacy.zip new file mode 100644 index 000000000..a8d8e619e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.8-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.8-legacy.zip new file mode 100644 index 000000000..0758d829c Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.4.9-legacy.zip b/tests/ast-parsing/compile/custom_error-0.4.9-legacy.zip new file mode 100644 index 000000000..347050544 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.4.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.0-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.0-compact.zip new file mode 100644 index 000000000..945b2c634 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.0-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.0-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.0-legacy.zip new file mode 100644 index 000000000..cd03e29f2 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.1-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.1-compact.zip new file mode 100644 index 000000000..c703c3bc9 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.1-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.1-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.1-legacy.zip new file mode 100644 index 000000000..dd7b72c6f Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.10-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.10-compact.zip new file mode 100644 index 000000000..89e01aa2b Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.10-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.10-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.10-legacy.zip new file mode 100644 index 000000000..fc0b4788c Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.11-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.11-compact.zip new file mode 100644 index 000000000..7d1b47d0a Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.11-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.11-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.11-legacy.zip new file mode 100644 index 000000000..9ba30100f Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.12-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.12-compact.zip new file mode 100644 index 000000000..cb7a5e0fb Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.12-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.12-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.12-legacy.zip new file mode 100644 index 000000000..df8446d3f Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.13-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.13-compact.zip new file mode 100644 index 000000000..0369574f6 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.13-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.13-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.13-legacy.zip new file mode 100644 index 000000000..899e8dada Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.13-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.14-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.14-compact.zip new file mode 100644 index 000000000..e0d3a2308 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.14-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.14-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.14-legacy.zip new file mode 100644 index 000000000..740a69097 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.15-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.15-compact.zip new file mode 100644 index 000000000..a9f64dc8a Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.15-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.15-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.15-legacy.zip new file mode 100644 index 000000000..ef59a0dad Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.15-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.16-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.16-compact.zip new file mode 100644 index 000000000..1b98ff888 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.16-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.16-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.16-legacy.zip new file mode 100644 index 000000000..349a7d972 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.17-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.17-compact.zip new file mode 100644 index 000000000..a862d5595 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.17-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.17-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.17-legacy.zip new file mode 100644 index 000000000..08cfcf969 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.17-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.2-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.2-compact.zip new file mode 100644 index 000000000..31009f2c5 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.2-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.2-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.2-legacy.zip new file mode 100644 index 000000000..6e66366a3 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.3-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.3-compact.zip new file mode 100644 index 000000000..11c17edd0 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.3-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.3-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.3-legacy.zip new file mode 100644 index 000000000..cc09e5a23 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.4-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.4-compact.zip new file mode 100644 index 000000000..e1d30fd68 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.4-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.4-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.4-legacy.zip new file mode 100644 index 000000000..44bba1e75 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.5-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.5-compact.zip new file mode 100644 index 000000000..3bc6ab3f2 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.5-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.5-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.5-legacy.zip new file mode 100644 index 000000000..e338b3d06 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.6-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.6-compact.zip new file mode 100644 index 000000000..71f935530 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.6-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.6-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.6-legacy.zip new file mode 100644 index 000000000..dcc7293f4 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.7-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.7-compact.zip new file mode 100644 index 000000000..2050d339e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.7-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.7-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.7-legacy.zip new file mode 100644 index 000000000..8e2fdbafc Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.8-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.8-compact.zip new file mode 100644 index 000000000..7223c7567 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.8-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.8-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.8-legacy.zip new file mode 100644 index 000000000..c25d9e0e5 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.9-compact.zip b/tests/ast-parsing/compile/custom_error-0.5.9-compact.zip new file mode 100644 index 000000000..224a08eda Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.9-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.5.9-legacy.zip b/tests/ast-parsing/compile/custom_error-0.5.9-legacy.zip new file mode 100644 index 000000000..7203a0e3b Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.5.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.0-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.0-compact.zip new file mode 100644 index 000000000..3b203a023 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.0-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.0-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.0-legacy.zip new file mode 100644 index 000000000..7e30e85e7 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.1-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.1-compact.zip new file mode 100644 index 000000000..59465f3f3 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.1-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.1-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.1-legacy.zip new file mode 100644 index 000000000..cef2ef0b3 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.10-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.10-compact.zip new file mode 100644 index 000000000..28f594b02 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.10-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.10-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.10-legacy.zip new file mode 100644 index 000000000..8bcdd0db1 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.11-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.11-compact.zip new file mode 100644 index 000000000..3fb301733 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.11-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.11-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.11-legacy.zip new file mode 100644 index 000000000..cedd4590b Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.12-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.12-compact.zip new file mode 100644 index 000000000..22d574f96 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.12-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.12-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.12-legacy.zip new file mode 100644 index 000000000..32a4a421c Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.2-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.2-compact.zip new file mode 100644 index 000000000..8d721f3fd Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.2-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.2-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.2-legacy.zip new file mode 100644 index 000000000..896eea7d6 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.3-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.3-compact.zip new file mode 100644 index 000000000..01dfeddd6 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.3-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.3-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.3-legacy.zip new file mode 100644 index 000000000..de300bdc0 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.4-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.4-compact.zip new file mode 100644 index 000000000..b5c5b3d8f Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.4-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.4-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.4-legacy.zip new file mode 100644 index 000000000..a688083a2 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.5-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.5-compact.zip new file mode 100644 index 000000000..09ef6758e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.5-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.5-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.5-legacy.zip new file mode 100644 index 000000000..16b4829d9 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.6-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.6-compact.zip new file mode 100644 index 000000000..d1cb13d83 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.6-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.6-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.6-legacy.zip new file mode 100644 index 000000000..08bdc27c7 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.7-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.7-compact.zip new file mode 100644 index 000000000..c7e9bac1d Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.7-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.7-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.7-legacy.zip new file mode 100644 index 000000000..a89cb6479 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.8-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.8-compact.zip new file mode 100644 index 000000000..99f0a0f9e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.8-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.8-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.8-legacy.zip new file mode 100644 index 000000000..900668ce3 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.9-compact.zip b/tests/ast-parsing/compile/custom_error-0.6.9-compact.zip new file mode 100644 index 000000000..9e0f14ea2 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.9-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.6.9-legacy.zip b/tests/ast-parsing/compile/custom_error-0.6.9-legacy.zip new file mode 100644 index 000000000..da7c51b9f Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.6.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.0-compact.zip b/tests/ast-parsing/compile/custom_error-0.7.0-compact.zip new file mode 100644 index 000000000..6b6897139 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.0-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.0-legacy.zip b/tests/ast-parsing/compile/custom_error-0.7.0-legacy.zip new file mode 100644 index 000000000..d104ec84d Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.1-compact.zip b/tests/ast-parsing/compile/custom_error-0.7.1-compact.zip new file mode 100644 index 000000000..ae7674b6e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.1-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.1-legacy.zip b/tests/ast-parsing/compile/custom_error-0.7.1-legacy.zip new file mode 100644 index 000000000..30dc23f89 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.2-compact.zip b/tests/ast-parsing/compile/custom_error-0.7.2-compact.zip new file mode 100644 index 000000000..b84522e6e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.2-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.2-legacy.zip b/tests/ast-parsing/compile/custom_error-0.7.2-legacy.zip new file mode 100644 index 000000000..2bfe6d3b7 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.3-compact.zip b/tests/ast-parsing/compile/custom_error-0.7.3-compact.zip new file mode 100644 index 000000000..50ab663a9 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.3-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.3-legacy.zip b/tests/ast-parsing/compile/custom_error-0.7.3-legacy.zip new file mode 100644 index 000000000..3dc094047 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.4-compact.zip b/tests/ast-parsing/compile/custom_error-0.7.4-compact.zip new file mode 100644 index 000000000..30723f20d Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.4-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.4-legacy.zip b/tests/ast-parsing/compile/custom_error-0.7.4-legacy.zip new file mode 100644 index 000000000..0afddd3c2 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.5-compact.zip b/tests/ast-parsing/compile/custom_error-0.7.5-compact.zip new file mode 100644 index 000000000..9f637991d Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.5-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.5-legacy.zip b/tests/ast-parsing/compile/custom_error-0.7.5-legacy.zip new file mode 100644 index 000000000..70844b1b0 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.6-compact.zip b/tests/ast-parsing/compile/custom_error-0.7.6-compact.zip new file mode 100644 index 000000000..3ab1a8e7b Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.6-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.7.6-legacy.zip b/tests/ast-parsing/compile/custom_error-0.7.6-legacy.zip new file mode 100644 index 000000000..7135706c6 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.7.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.0-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.0-compact.zip new file mode 100644 index 000000000..addcaf9c9 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.0-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.1-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.1-compact.zip new file mode 100644 index 000000000..930c3bb34 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.1-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.10-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.10-compact.zip new file mode 100644 index 000000000..337ad1575 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.2-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.2-compact.zip new file mode 100644 index 000000000..f9f16562d Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.2-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.3-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.3-compact.zip new file mode 100644 index 000000000..44dc532db Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.3-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.4-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.4-compact.zip new file mode 100644 index 000000000..21138281d Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.4-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.5-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.5-compact.zip new file mode 100644 index 000000000..53df9098e Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.5-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.6-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.6-compact.zip new file mode 100644 index 000000000..f2661e033 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.6-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.7-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.7-compact.zip new file mode 100644 index 000000000..008e3081a Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.7-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.8-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.8-compact.zip new file mode 100644 index 000000000..caaffd6d0 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.9-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.9-compact.zip new file mode 100644 index 000000000..2b86d545c Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/dowhile-0.8.10-compact.zip b/tests/ast-parsing/compile/dowhile-0.8.10-compact.zip new file mode 100644 index 000000000..3e0ecbd60 Binary files /dev/null and b/tests/ast-parsing/compile/dowhile-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/dowhile-0.8.8-compact.zip b/tests/ast-parsing/compile/dowhile-0.8.8-compact.zip new file mode 100644 index 000000000..ad2866f00 Binary files /dev/null and b/tests/ast-parsing/compile/dowhile-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/dowhile-0.8.9-compact.zip b/tests/ast-parsing/compile/dowhile-0.8.9-compact.zip new file mode 100644 index 000000000..72938d8f8 Binary files /dev/null and b/tests/ast-parsing/compile/dowhile-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/emit-0.8.10-compact.zip b/tests/ast-parsing/compile/emit-0.8.10-compact.zip new file mode 100644 index 000000000..3ea9b7717 Binary files /dev/null and b/tests/ast-parsing/compile/emit-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/emit-0.8.8-compact.zip b/tests/ast-parsing/compile/emit-0.8.8-compact.zip new file mode 100644 index 000000000..b0675e72a Binary files /dev/null and b/tests/ast-parsing/compile/emit-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/emit-0.8.9-compact.zip b/tests/ast-parsing/compile/emit-0.8.9-compact.zip new file mode 100644 index 000000000..63a4a22f2 Binary files /dev/null and b/tests/ast-parsing/compile/emit-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/enum-0.8.10-compact.zip b/tests/ast-parsing/compile/enum-0.8.10-compact.zip new file mode 100644 index 000000000..a2c3c6525 Binary files /dev/null and b/tests/ast-parsing/compile/enum-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/enum-0.8.8-compact.zip b/tests/ast-parsing/compile/enum-0.8.8-compact.zip new file mode 100644 index 000000000..e021c2e47 Binary files /dev/null and b/tests/ast-parsing/compile/enum-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/enum-0.8.9-compact.zip b/tests/ast-parsing/compile/enum-0.8.9-compact.zip new file mode 100644 index 000000000..445de8134 Binary files /dev/null and b/tests/ast-parsing/compile/enum-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/event-0.8.10-compact.zip b/tests/ast-parsing/compile/event-0.8.10-compact.zip new file mode 100644 index 000000000..062d4095c Binary files /dev/null and b/tests/ast-parsing/compile/event-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/event-0.8.8-compact.zip b/tests/ast-parsing/compile/event-0.8.8-compact.zip new file mode 100644 index 000000000..ee74d6430 Binary files /dev/null and b/tests/ast-parsing/compile/event-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/event-0.8.9-compact.zip b/tests/ast-parsing/compile/event-0.8.9-compact.zip new file mode 100644 index 000000000..65c1c06ca Binary files /dev/null and b/tests/ast-parsing/compile/event-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/for-0.8.10-compact.zip b/tests/ast-parsing/compile/for-0.8.10-compact.zip new file mode 100644 index 000000000..af4f0b57a Binary files /dev/null and b/tests/ast-parsing/compile/for-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/for-0.8.8-compact.zip b/tests/ast-parsing/compile/for-0.8.8-compact.zip new file mode 100644 index 000000000..542e18f11 Binary files /dev/null and b/tests/ast-parsing/compile/for-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/for-0.8.9-compact.zip b/tests/ast-parsing/compile/for-0.8.9-compact.zip new file mode 100644 index 000000000..1127a333e Binary files /dev/null and b/tests/ast-parsing/compile/for-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/function-0.8.10-compact.zip b/tests/ast-parsing/compile/function-0.8.10-compact.zip new file mode 100644 index 000000000..2ae3fb77c Binary files /dev/null and b/tests/ast-parsing/compile/function-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/function-0.8.8-compact.zip b/tests/ast-parsing/compile/function-0.8.8-compact.zip new file mode 100644 index 000000000..d4bc0b29a Binary files /dev/null and b/tests/ast-parsing/compile/function-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/function-0.8.9-compact.zip b/tests/ast-parsing/compile/function-0.8.9-compact.zip new file mode 100644 index 000000000..01b250f0a Binary files /dev/null and b/tests/ast-parsing/compile/function-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/functioncall-0.8.10-compact.zip b/tests/ast-parsing/compile/functioncall-0.8.10-compact.zip new file mode 100644 index 000000000..289246919 Binary files /dev/null and b/tests/ast-parsing/compile/functioncall-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/functioncall-0.8.8-compact.zip b/tests/ast-parsing/compile/functioncall-0.8.8-compact.zip new file mode 100644 index 000000000..7f7c070e3 Binary files /dev/null and b/tests/ast-parsing/compile/functioncall-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/functioncall-0.8.9-compact.zip b/tests/ast-parsing/compile/functioncall-0.8.9-compact.zip new file mode 100644 index 000000000..73a82d151 Binary files /dev/null and b/tests/ast-parsing/compile/functioncall-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/if-0.8.10-compact.zip b/tests/ast-parsing/compile/if-0.8.10-compact.zip new file mode 100644 index 000000000..b53dff68f Binary files /dev/null and b/tests/ast-parsing/compile/if-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/if-0.8.8-compact.zip b/tests/ast-parsing/compile/if-0.8.8-compact.zip new file mode 100644 index 000000000..0a8783742 Binary files /dev/null and b/tests/ast-parsing/compile/if-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/if-0.8.9-compact.zip b/tests/ast-parsing/compile/if-0.8.9-compact.zip new file mode 100644 index 000000000..bb85b0e41 Binary files /dev/null and b/tests/ast-parsing/compile/if-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/indexaccess-0.8.10-compact.zip b/tests/ast-parsing/compile/indexaccess-0.8.10-compact.zip new file mode 100644 index 000000000..54857b3b6 Binary files /dev/null and b/tests/ast-parsing/compile/indexaccess-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/indexaccess-0.8.8-compact.zip b/tests/ast-parsing/compile/indexaccess-0.8.8-compact.zip new file mode 100644 index 000000000..022e40817 Binary files /dev/null and b/tests/ast-parsing/compile/indexaccess-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/indexaccess-0.8.9-compact.zip b/tests/ast-parsing/compile/indexaccess-0.8.9-compact.zip new file mode 100644 index 000000000..4dcc4239b Binary files /dev/null and b/tests/ast-parsing/compile/indexaccess-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/indexrangeaccess-0.8.10-compact.zip b/tests/ast-parsing/compile/indexrangeaccess-0.8.10-compact.zip new file mode 100644 index 000000000..f7884fb72 Binary files /dev/null and b/tests/ast-parsing/compile/indexrangeaccess-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/indexrangeaccess-0.8.8-compact.zip b/tests/ast-parsing/compile/indexrangeaccess-0.8.8-compact.zip new file mode 100644 index 000000000..9438446c5 Binary files /dev/null and b/tests/ast-parsing/compile/indexrangeaccess-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/indexrangeaccess-0.8.9-compact.zip b/tests/ast-parsing/compile/indexrangeaccess-0.8.9-compact.zip new file mode 100644 index 000000000..5cb7e94b6 Binary files /dev/null and b/tests/ast-parsing/compile/indexrangeaccess-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/library_implicit_conversion-0.8.10-compact.zip b/tests/ast-parsing/compile/library_implicit_conversion-0.8.10-compact.zip new file mode 100644 index 000000000..2d4403174 Binary files /dev/null and b/tests/ast-parsing/compile/library_implicit_conversion-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/library_implicit_conversion-0.8.8-compact.zip b/tests/ast-parsing/compile/library_implicit_conversion-0.8.8-compact.zip new file mode 100644 index 000000000..0cc7e3cc8 Binary files /dev/null and b/tests/ast-parsing/compile/library_implicit_conversion-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/library_implicit_conversion-0.8.9-compact.zip b/tests/ast-parsing/compile/library_implicit_conversion-0.8.9-compact.zip new file mode 100644 index 000000000..f7b209a66 Binary files /dev/null and b/tests/ast-parsing/compile/library_implicit_conversion-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/literal-0.8.10-compact.zip b/tests/ast-parsing/compile/literal-0.8.10-compact.zip new file mode 100644 index 000000000..f932988df Binary files /dev/null and b/tests/ast-parsing/compile/literal-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/literal-0.8.8-compact.zip b/tests/ast-parsing/compile/literal-0.8.8-compact.zip new file mode 100644 index 000000000..a773f4005 Binary files /dev/null and b/tests/ast-parsing/compile/literal-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/literal-0.8.9-compact.zip b/tests/ast-parsing/compile/literal-0.8.9-compact.zip new file mode 100644 index 000000000..535b6c097 Binary files /dev/null and b/tests/ast-parsing/compile/literal-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/memberaccess-0.8.10-compact.zip b/tests/ast-parsing/compile/memberaccess-0.8.10-compact.zip new file mode 100644 index 000000000..7aac35aaf Binary files /dev/null and b/tests/ast-parsing/compile/memberaccess-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/memberaccess-0.8.8-compact.zip b/tests/ast-parsing/compile/memberaccess-0.8.8-compact.zip new file mode 100644 index 000000000..8b06bd31e Binary files /dev/null and b/tests/ast-parsing/compile/memberaccess-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/memberaccess-0.8.9-compact.zip b/tests/ast-parsing/compile/memberaccess-0.8.9-compact.zip new file mode 100644 index 000000000..b18764f0f Binary files /dev/null and b/tests/ast-parsing/compile/memberaccess-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/minmax-0.8.10-compact.zip b/tests/ast-parsing/compile/minmax-0.8.10-compact.zip new file mode 100644 index 000000000..d5be2a2d6 Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/minmax-0.8.8-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8-compact.zip new file mode 100644 index 000000000..af4f25663 Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/minmax-0.8.9-compact.zip b/tests/ast-parsing/compile/minmax-0.8.9-compact.zip new file mode 100644 index 000000000..10389dbee Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/modifier-0.8.10-compact.zip b/tests/ast-parsing/compile/modifier-0.8.10-compact.zip new file mode 100644 index 000000000..7bb93734a Binary files /dev/null and b/tests/ast-parsing/compile/modifier-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/modifier-0.8.8-compact.zip b/tests/ast-parsing/compile/modifier-0.8.8-compact.zip new file mode 100644 index 000000000..2e703b23d Binary files /dev/null and b/tests/ast-parsing/compile/modifier-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/modifier-0.8.9-compact.zip b/tests/ast-parsing/compile/modifier-0.8.9-compact.zip new file mode 100644 index 000000000..201e32d1e Binary files /dev/null and b/tests/ast-parsing/compile/modifier-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/newexpression-0.8.10-compact.zip b/tests/ast-parsing/compile/newexpression-0.8.10-compact.zip new file mode 100644 index 000000000..23407dbb2 Binary files /dev/null and b/tests/ast-parsing/compile/newexpression-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/newexpression-0.8.8-compact.zip b/tests/ast-parsing/compile/newexpression-0.8.8-compact.zip new file mode 100644 index 000000000..e5d1d770c Binary files /dev/null and b/tests/ast-parsing/compile/newexpression-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/newexpression-0.8.9-compact.zip b/tests/ast-parsing/compile/newexpression-0.8.9-compact.zip new file mode 100644 index 000000000..89f27e06a Binary files /dev/null and b/tests/ast-parsing/compile/newexpression-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/pragma-0.8.10-compact.zip b/tests/ast-parsing/compile/pragma-0.8.10-compact.zip new file mode 100644 index 000000000..8706fb259 Binary files /dev/null and b/tests/ast-parsing/compile/pragma-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/pragma-0.8.8-compact.zip b/tests/ast-parsing/compile/pragma-0.8.8-compact.zip new file mode 100644 index 000000000..848338fd8 Binary files /dev/null and b/tests/ast-parsing/compile/pragma-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/pragma-0.8.9-compact.zip b/tests/ast-parsing/compile/pragma-0.8.9-compact.zip new file mode 100644 index 000000000..79a72fed6 Binary files /dev/null and b/tests/ast-parsing/compile/pragma-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/push-0.8.10-compact.zip b/tests/ast-parsing/compile/push-0.8.10-compact.zip new file mode 100644 index 000000000..687de17dc Binary files /dev/null and b/tests/ast-parsing/compile/push-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/push-0.8.8-compact.zip b/tests/ast-parsing/compile/push-0.8.8-compact.zip new file mode 100644 index 000000000..291f74d31 Binary files /dev/null and b/tests/ast-parsing/compile/push-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/push-0.8.9-compact.zip b/tests/ast-parsing/compile/push-0.8.9-compact.zip new file mode 100644 index 000000000..052898ebf Binary files /dev/null and b/tests/ast-parsing/compile/push-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/return-0.8.10-compact.zip b/tests/ast-parsing/compile/return-0.8.10-compact.zip new file mode 100644 index 000000000..0e5565a5c Binary files /dev/null and b/tests/ast-parsing/compile/return-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/return-0.8.8-compact.zip b/tests/ast-parsing/compile/return-0.8.8-compact.zip new file mode 100644 index 000000000..5c651e0e7 Binary files /dev/null and b/tests/ast-parsing/compile/return-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/return-0.8.9-compact.zip b/tests/ast-parsing/compile/return-0.8.9-compact.zip new file mode 100644 index 000000000..5ad7511d1 Binary files /dev/null and b/tests/ast-parsing/compile/return-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/scope-0.8.10-compact.zip b/tests/ast-parsing/compile/scope-0.8.10-compact.zip new file mode 100644 index 000000000..b8b43ab16 Binary files /dev/null and b/tests/ast-parsing/compile/scope-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/scope-0.8.8-compact.zip b/tests/ast-parsing/compile/scope-0.8.8-compact.zip new file mode 100644 index 000000000..b91e3b0d7 Binary files /dev/null and b/tests/ast-parsing/compile/scope-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/scope-0.8.9-compact.zip b/tests/ast-parsing/compile/scope-0.8.9-compact.zip new file mode 100644 index 000000000..f9bab04e5 Binary files /dev/null and b/tests/ast-parsing/compile/scope-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/struct-0.8.10-compact.zip b/tests/ast-parsing/compile/struct-0.8.10-compact.zip new file mode 100644 index 000000000..a75da7e5e Binary files /dev/null and b/tests/ast-parsing/compile/struct-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/struct-0.8.8-compact.zip b/tests/ast-parsing/compile/struct-0.8.8-compact.zip new file mode 100644 index 000000000..ad898f23e Binary files /dev/null and b/tests/ast-parsing/compile/struct-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/struct-0.8.9-compact.zip b/tests/ast-parsing/compile/struct-0.8.9-compact.zip new file mode 100644 index 000000000..f683562aa Binary files /dev/null and b/tests/ast-parsing/compile/struct-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/throw-0.8.10-compact.zip b/tests/ast-parsing/compile/throw-0.8.10-compact.zip new file mode 100644 index 000000000..5eaae1bda Binary files /dev/null and b/tests/ast-parsing/compile/throw-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/throw-0.8.8-compact.zip b/tests/ast-parsing/compile/throw-0.8.8-compact.zip new file mode 100644 index 000000000..c24ebb1b5 Binary files /dev/null and b/tests/ast-parsing/compile/throw-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/throw-0.8.9-compact.zip b/tests/ast-parsing/compile/throw-0.8.9-compact.zip new file mode 100644 index 000000000..3156695ec Binary files /dev/null and b/tests/ast-parsing/compile/throw-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-0.8.10-compact.zip b/tests/ast-parsing/compile/top-level-0.8.10-compact.zip new file mode 100644 index 000000000..d9350dd2e Binary files /dev/null and b/tests/ast-parsing/compile/top-level-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-0.8.8-compact.zip b/tests/ast-parsing/compile/top-level-0.8.8-compact.zip new file mode 100644 index 000000000..21aafec66 Binary files /dev/null and b/tests/ast-parsing/compile/top-level-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-0.8.9-compact.zip b/tests/ast-parsing/compile/top-level-0.8.9-compact.zip new file mode 100644 index 000000000..bcb205b2f Binary files /dev/null and b/tests/ast-parsing/compile/top-level-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-import-0.8.10-compact.zip b/tests/ast-parsing/compile/top-level-import-0.8.10-compact.zip new file mode 100644 index 000000000..d67f51e3f Binary files /dev/null and b/tests/ast-parsing/compile/top-level-import-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-import-0.8.8-compact.zip b/tests/ast-parsing/compile/top-level-import-0.8.8-compact.zip new file mode 100644 index 000000000..e5d64437b Binary files /dev/null and b/tests/ast-parsing/compile/top-level-import-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-import-0.8.9-compact.zip b/tests/ast-parsing/compile/top-level-import-0.8.9-compact.zip new file mode 100644 index 000000000..ca62a4efc Binary files /dev/null and b/tests/ast-parsing/compile/top-level-import-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-import-bis-0.8.10-compact.zip b/tests/ast-parsing/compile/top-level-import-bis-0.8.10-compact.zip new file mode 100644 index 000000000..53d2667c1 Binary files /dev/null and b/tests/ast-parsing/compile/top-level-import-bis-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-import-bis-0.8.8-compact.zip b/tests/ast-parsing/compile/top-level-import-bis-0.8.8-compact.zip new file mode 100644 index 000000000..2d1ae8e6e Binary files /dev/null and b/tests/ast-parsing/compile/top-level-import-bis-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-import-bis-0.8.9-compact.zip b/tests/ast-parsing/compile/top-level-import-bis-0.8.9-compact.zip new file mode 100644 index 000000000..df89344ee Binary files /dev/null and b/tests/ast-parsing/compile/top-level-import-bis-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/trycatch-0.8.10-compact.zip b/tests/ast-parsing/compile/trycatch-0.8.10-compact.zip new file mode 100644 index 000000000..e015def73 Binary files /dev/null and b/tests/ast-parsing/compile/trycatch-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/trycatch-0.8.8-compact.zip b/tests/ast-parsing/compile/trycatch-0.8.8-compact.zip new file mode 100644 index 000000000..41624564c Binary files /dev/null and b/tests/ast-parsing/compile/trycatch-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/trycatch-0.8.9-compact.zip b/tests/ast-parsing/compile/trycatch-0.8.9-compact.zip new file mode 100644 index 000000000..97856e9f9 Binary files /dev/null and b/tests/ast-parsing/compile/trycatch-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/tupleexpression-0.8.10-compact.zip b/tests/ast-parsing/compile/tupleexpression-0.8.10-compact.zip new file mode 100644 index 000000000..bc5df20f4 Binary files /dev/null and b/tests/ast-parsing/compile/tupleexpression-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/tupleexpression-0.8.8-compact.zip b/tests/ast-parsing/compile/tupleexpression-0.8.8-compact.zip new file mode 100644 index 000000000..d0b15373a Binary files /dev/null and b/tests/ast-parsing/compile/tupleexpression-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/tupleexpression-0.8.9-compact.zip b/tests/ast-parsing/compile/tupleexpression-0.8.9-compact.zip new file mode 100644 index 000000000..326e2714f Binary files /dev/null and b/tests/ast-parsing/compile/tupleexpression-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/unaryexpression-0.8.10-compact.zip b/tests/ast-parsing/compile/unaryexpression-0.8.10-compact.zip new file mode 100644 index 000000000..b54a86b22 Binary files /dev/null and b/tests/ast-parsing/compile/unaryexpression-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/unaryexpression-0.8.8-compact.zip b/tests/ast-parsing/compile/unaryexpression-0.8.8-compact.zip new file mode 100644 index 000000000..419f4cc9e Binary files /dev/null and b/tests/ast-parsing/compile/unaryexpression-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/unaryexpression-0.8.9-compact.zip b/tests/ast-parsing/compile/unaryexpression-0.8.9-compact.zip new file mode 100644 index 000000000..ab57f2dc9 Binary files /dev/null and b/tests/ast-parsing/compile/unaryexpression-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/unchecked-0.8.10-compact.zip b/tests/ast-parsing/compile/unchecked-0.8.10-compact.zip new file mode 100644 index 000000000..f106df137 Binary files /dev/null and b/tests/ast-parsing/compile/unchecked-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/unchecked-0.8.8-compact.zip b/tests/ast-parsing/compile/unchecked-0.8.8-compact.zip new file mode 100644 index 000000000..1a3a70dcc Binary files /dev/null and b/tests/ast-parsing/compile/unchecked-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/unchecked-0.8.9-compact.zip b/tests/ast-parsing/compile/unchecked-0.8.9-compact.zip new file mode 100644 index 000000000..8ae70068e Binary files /dev/null and b/tests/ast-parsing/compile/unchecked-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/using-for-0.8.10-compact.zip b/tests/ast-parsing/compile/using-for-0.8.10-compact.zip new file mode 100644 index 000000000..9f06ffe30 Binary files /dev/null and b/tests/ast-parsing/compile/using-for-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/using-for-0.8.8-compact.zip b/tests/ast-parsing/compile/using-for-0.8.8-compact.zip new file mode 100644 index 000000000..36034deae Binary files /dev/null and b/tests/ast-parsing/compile/using-for-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/using-for-0.8.9-compact.zip b/tests/ast-parsing/compile/using-for-0.8.9-compact.zip new file mode 100644 index 000000000..f02bc3457 Binary files /dev/null and b/tests/ast-parsing/compile/using-for-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/variable-0.8.10-compact.zip b/tests/ast-parsing/compile/variable-0.8.10-compact.zip new file mode 100644 index 000000000..9bd880882 Binary files /dev/null and b/tests/ast-parsing/compile/variable-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/variable-0.8.8-compact.zip b/tests/ast-parsing/compile/variable-0.8.8-compact.zip new file mode 100644 index 000000000..abd1f45bd Binary files /dev/null and b/tests/ast-parsing/compile/variable-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/variable-0.8.9-compact.zip b/tests/ast-parsing/compile/variable-0.8.9-compact.zip new file mode 100644 index 000000000..23bc10911 Binary files /dev/null and b/tests/ast-parsing/compile/variable-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/variabledeclaration-0.8.10-compact.zip b/tests/ast-parsing/compile/variabledeclaration-0.8.10-compact.zip new file mode 100644 index 000000000..79654ea02 Binary files /dev/null and b/tests/ast-parsing/compile/variabledeclaration-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/variabledeclaration-0.8.8-compact.zip b/tests/ast-parsing/compile/variabledeclaration-0.8.8-compact.zip new file mode 100644 index 000000000..6bcd64628 Binary files /dev/null and b/tests/ast-parsing/compile/variabledeclaration-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/variabledeclaration-0.8.9-compact.zip b/tests/ast-parsing/compile/variabledeclaration-0.8.9-compact.zip new file mode 100644 index 000000000..9bd064e2d Binary files /dev/null and b/tests/ast-parsing/compile/variabledeclaration-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/while-0.8.10-compact.zip b/tests/ast-parsing/compile/while-0.8.10-compact.zip new file mode 100644 index 000000000..a56af95c1 Binary files /dev/null and b/tests/ast-parsing/compile/while-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/while-0.8.8-compact.zip b/tests/ast-parsing/compile/while-0.8.8-compact.zip new file mode 100644 index 000000000..9b61f66a4 Binary files /dev/null and b/tests/ast-parsing/compile/while-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/while-0.8.9-compact.zip b/tests/ast-parsing/compile/while-0.8.9-compact.zip new file mode 100644 index 000000000..30d33fd49 Binary files /dev/null and b/tests/ast-parsing/compile/while-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.0-compact.zip b/tests/ast-parsing/compile/yul-0.8.0-compact.zip index 7510d1fd0..9f9a054ae 100644 Binary files a/tests/ast-parsing/compile/yul-0.8.0-compact.zip and b/tests/ast-parsing/compile/yul-0.8.0-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.1-compact.zip b/tests/ast-parsing/compile/yul-0.8.1-compact.zip index f1af763aa..2d3c07851 100644 Binary files a/tests/ast-parsing/compile/yul-0.8.1-compact.zip and b/tests/ast-parsing/compile/yul-0.8.1-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.10-compact.zip b/tests/ast-parsing/compile/yul-0.8.10-compact.zip new file mode 100644 index 000000000..b4c9d3c46 Binary files /dev/null and b/tests/ast-parsing/compile/yul-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.2-compact.zip b/tests/ast-parsing/compile/yul-0.8.2-compact.zip index 7fab06eb7..4905ea726 100644 Binary files a/tests/ast-parsing/compile/yul-0.8.2-compact.zip and b/tests/ast-parsing/compile/yul-0.8.2-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.3-compact.zip b/tests/ast-parsing/compile/yul-0.8.3-compact.zip index 78f2a9db0..2699b20dc 100644 Binary files a/tests/ast-parsing/compile/yul-0.8.3-compact.zip and b/tests/ast-parsing/compile/yul-0.8.3-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.4-compact.zip b/tests/ast-parsing/compile/yul-0.8.4-compact.zip index f6f36b64d..c61f44a07 100644 Binary files a/tests/ast-parsing/compile/yul-0.8.4-compact.zip and b/tests/ast-parsing/compile/yul-0.8.4-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.5-compact.zip b/tests/ast-parsing/compile/yul-0.8.5-compact.zip index 839c75400..54fa8ca25 100644 Binary files a/tests/ast-parsing/compile/yul-0.8.5-compact.zip and b/tests/ast-parsing/compile/yul-0.8.5-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.6-compact.zip b/tests/ast-parsing/compile/yul-0.8.6-compact.zip index da2077639..ed9f2ac82 100644 Binary files a/tests/ast-parsing/compile/yul-0.8.6-compact.zip and b/tests/ast-parsing/compile/yul-0.8.6-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.7-compact.zip b/tests/ast-parsing/compile/yul-0.8.7-compact.zip index 9b76b7bd4..f798b2361 100644 Binary files a/tests/ast-parsing/compile/yul-0.8.7-compact.zip and b/tests/ast-parsing/compile/yul-0.8.7-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.8-compact.zip b/tests/ast-parsing/compile/yul-0.8.8-compact.zip new file mode 100644 index 000000000..f4fad22ce Binary files /dev/null and b/tests/ast-parsing/compile/yul-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.9-compact.zip b/tests/ast-parsing/compile/yul-0.8.9-compact.zip new file mode 100644 index 000000000..799eb8fa6 Binary files /dev/null and b/tests/ast-parsing/compile/yul-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/custom_error-0.4.0.sol b/tests/ast-parsing/custom_error-0.4.0.sol new file mode 100644 index 000000000..a8dc8410f --- /dev/null +++ b/tests/ast-parsing/custom_error-0.4.0.sol @@ -0,0 +1 @@ +// not available util 0.8.4 diff --git a/tests/ast-parsing/custom_error-0.8.4.sol b/tests/ast-parsing/custom_error-0.8.4.sol new file mode 100644 index 000000000..d62f96e87 --- /dev/null +++ b/tests/ast-parsing/custom_error-0.8.4.sol @@ -0,0 +1,45 @@ +pragma solidity ^0.8.4; + +struct St{ + uint v; +} + +error ErrorSimple(); +error ErrorWithArgs(uint, uint); +error ErrorWithStruct(St s); + +contract VendingMachine { + + function err0() public { + revert ErrorSimple(); + } + function err1() public { + St memory s; + revert ErrorWithStruct(s); + } + function err2() public{ + revert ErrorWithArgs(10+10, 10); + } + function err3() public{ + revert('test'); + } +} + +contract A{ + + error MyError(uint); + function f() public{ + revert MyError(2); + } +} + +contract B is A{ + function g() public{ + revert MyError(2); + } + + function h() public returns(bytes4){ + return MyError.selector; + } +} + diff --git a/tests/ast-parsing/expected/assembly-0.8.10-compact.json b/tests/ast-parsing/expected/assembly-0.8.10-compact.json new file mode 100644 index 000000000..d0a1cb33e --- /dev/null +++ b/tests/ast-parsing/expected/assembly-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assembly-0.8.5-compact.json b/tests/ast-parsing/expected/assembly-0.8.5-compact.json new file mode 100644 index 000000000..d0a1cb33e --- /dev/null +++ b/tests/ast-parsing/expected/assembly-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assembly-0.8.6-compact.json b/tests/ast-parsing/expected/assembly-0.8.6-compact.json new file mode 100644 index 000000000..d0a1cb33e --- /dev/null +++ b/tests/ast-parsing/expected/assembly-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assembly-0.8.7-compact.json b/tests/ast-parsing/expected/assembly-0.8.7-compact.json new file mode 100644 index 000000000..d0a1cb33e --- /dev/null +++ b/tests/ast-parsing/expected/assembly-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assembly-0.8.8-compact.json b/tests/ast-parsing/expected/assembly-0.8.8-compact.json new file mode 100644 index 000000000..d0a1cb33e --- /dev/null +++ b/tests/ast-parsing/expected/assembly-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assembly-0.8.9-compact.json b/tests/ast-parsing/expected/assembly-0.8.9-compact.json new file mode 100644 index 000000000..d0a1cb33e --- /dev/null +++ b/tests/ast-parsing/expected/assembly-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assignment-0.8.10-compact.json b/tests/ast-parsing/expected/assignment-0.8.10-compact.json new file mode 100644 index 000000000..8f9f9857b --- /dev/null +++ b/tests/ast-parsing/expected/assignment-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assignment-0.8.5-compact.json b/tests/ast-parsing/expected/assignment-0.8.5-compact.json new file mode 100644 index 000000000..8f9f9857b --- /dev/null +++ b/tests/ast-parsing/expected/assignment-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assignment-0.8.6-compact.json b/tests/ast-parsing/expected/assignment-0.8.6-compact.json new file mode 100644 index 000000000..8f9f9857b --- /dev/null +++ b/tests/ast-parsing/expected/assignment-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assignment-0.8.7-compact.json b/tests/ast-parsing/expected/assignment-0.8.7-compact.json new file mode 100644 index 000000000..8f9f9857b --- /dev/null +++ b/tests/ast-parsing/expected/assignment-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assignment-0.8.8-compact.json b/tests/ast-parsing/expected/assignment-0.8.8-compact.json new file mode 100644 index 000000000..8f9f9857b --- /dev/null +++ b/tests/ast-parsing/expected/assignment-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assignment-0.8.9-compact.json b/tests/ast-parsing/expected/assignment-0.8.9-compact.json new file mode 100644 index 000000000..8f9f9857b --- /dev/null +++ b/tests/ast-parsing/expected/assignment-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/binaryoperation-0.8.10-compact.json b/tests/ast-parsing/expected/binaryoperation-0.8.10-compact.json new file mode 100644 index 000000000..8939b57f2 --- /dev/null +++ b/tests/ast-parsing/expected/binaryoperation-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/binaryoperation-0.8.5-compact.json b/tests/ast-parsing/expected/binaryoperation-0.8.5-compact.json new file mode 100644 index 000000000..8939b57f2 --- /dev/null +++ b/tests/ast-parsing/expected/binaryoperation-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/binaryoperation-0.8.6-compact.json b/tests/ast-parsing/expected/binaryoperation-0.8.6-compact.json new file mode 100644 index 000000000..8939b57f2 --- /dev/null +++ b/tests/ast-parsing/expected/binaryoperation-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/binaryoperation-0.8.7-compact.json b/tests/ast-parsing/expected/binaryoperation-0.8.7-compact.json new file mode 100644 index 000000000..8939b57f2 --- /dev/null +++ b/tests/ast-parsing/expected/binaryoperation-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/binaryoperation-0.8.8-compact.json b/tests/ast-parsing/expected/binaryoperation-0.8.8-compact.json new file mode 100644 index 000000000..8939b57f2 --- /dev/null +++ b/tests/ast-parsing/expected/binaryoperation-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/binaryoperation-0.8.9-compact.json b/tests/ast-parsing/expected/binaryoperation-0.8.9-compact.json new file mode 100644 index 000000000..8939b57f2 --- /dev/null +++ b/tests/ast-parsing/expected/binaryoperation-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/break-0.8.10-compact.json b/tests/ast-parsing/expected/break-0.8.10-compact.json new file mode 100644 index 000000000..b9b7fc93e --- /dev/null +++ b/tests/ast-parsing/expected/break-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/break-0.8.5-compact.json b/tests/ast-parsing/expected/break-0.8.5-compact.json new file mode 100644 index 000000000..b9b7fc93e --- /dev/null +++ b/tests/ast-parsing/expected/break-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/break-0.8.6-compact.json b/tests/ast-parsing/expected/break-0.8.6-compact.json new file mode 100644 index 000000000..b9b7fc93e --- /dev/null +++ b/tests/ast-parsing/expected/break-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/break-0.8.7-compact.json b/tests/ast-parsing/expected/break-0.8.7-compact.json new file mode 100644 index 000000000..b9b7fc93e --- /dev/null +++ b/tests/ast-parsing/expected/break-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/break-0.8.8-compact.json b/tests/ast-parsing/expected/break-0.8.8-compact.json new file mode 100644 index 000000000..b9b7fc93e --- /dev/null +++ b/tests/ast-parsing/expected/break-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/break-0.8.9-compact.json b/tests/ast-parsing/expected/break-0.8.9-compact.json new file mode 100644 index 000000000..b9b7fc93e --- /dev/null +++ b/tests/ast-parsing/expected/break-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/call_to_variable-0.8.10-compact.json b/tests/ast-parsing/expected/call_to_variable-0.8.10-compact.json new file mode 100644 index 000000000..113bb5a14 --- /dev/null +++ b/tests/ast-parsing/expected/call_to_variable-0.8.10-compact.json @@ -0,0 +1,6 @@ +{ + "C": {}, + "D": { + "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/call_to_variable-0.8.5-compact.json b/tests/ast-parsing/expected/call_to_variable-0.8.5-compact.json new file mode 100644 index 000000000..113bb5a14 --- /dev/null +++ b/tests/ast-parsing/expected/call_to_variable-0.8.5-compact.json @@ -0,0 +1,6 @@ +{ + "C": {}, + "D": { + "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/call_to_variable-0.8.6-compact.json b/tests/ast-parsing/expected/call_to_variable-0.8.6-compact.json new file mode 100644 index 000000000..113bb5a14 --- /dev/null +++ b/tests/ast-parsing/expected/call_to_variable-0.8.6-compact.json @@ -0,0 +1,6 @@ +{ + "C": {}, + "D": { + "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/call_to_variable-0.8.7-compact.json b/tests/ast-parsing/expected/call_to_variable-0.8.7-compact.json new file mode 100644 index 000000000..113bb5a14 --- /dev/null +++ b/tests/ast-parsing/expected/call_to_variable-0.8.7-compact.json @@ -0,0 +1,6 @@ +{ + "C": {}, + "D": { + "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/call_to_variable-0.8.8-compact.json b/tests/ast-parsing/expected/call_to_variable-0.8.8-compact.json new file mode 100644 index 000000000..113bb5a14 --- /dev/null +++ b/tests/ast-parsing/expected/call_to_variable-0.8.8-compact.json @@ -0,0 +1,6 @@ +{ + "C": {}, + "D": { + "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/call_to_variable-0.8.9-compact.json b/tests/ast-parsing/expected/call_to_variable-0.8.9-compact.json new file mode 100644 index 000000000..113bb5a14 --- /dev/null +++ b/tests/ast-parsing/expected/call_to_variable-0.8.9-compact.json @@ -0,0 +1,6 @@ +{ + "C": {}, + "D": { + "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/comment-0.8.10-compact.json b/tests/ast-parsing/expected/comment-0.8.10-compact.json new file mode 100644 index 000000000..a53745acd --- /dev/null +++ b/tests/ast-parsing/expected/comment-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/comment-0.8.5-compact.json b/tests/ast-parsing/expected/comment-0.8.5-compact.json new file mode 100644 index 000000000..a53745acd --- /dev/null +++ b/tests/ast-parsing/expected/comment-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/comment-0.8.6-compact.json b/tests/ast-parsing/expected/comment-0.8.6-compact.json new file mode 100644 index 000000000..a53745acd --- /dev/null +++ b/tests/ast-parsing/expected/comment-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/comment-0.8.7-compact.json b/tests/ast-parsing/expected/comment-0.8.7-compact.json new file mode 100644 index 000000000..a53745acd --- /dev/null +++ b/tests/ast-parsing/expected/comment-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/comment-0.8.8-compact.json b/tests/ast-parsing/expected/comment-0.8.8-compact.json new file mode 100644 index 000000000..a53745acd --- /dev/null +++ b/tests/ast-parsing/expected/comment-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/comment-0.8.9-compact.json b/tests/ast-parsing/expected/comment-0.8.9-compact.json new file mode 100644 index 000000000..a53745acd --- /dev/null +++ b/tests/ast-parsing/expected/comment-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/conditional-0.8.10-compact.json b/tests/ast-parsing/expected/conditional-0.8.10-compact.json new file mode 100644 index 000000000..6ef3d40e7 --- /dev/null +++ b/tests/ast-parsing/expected/conditional-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->6;\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->9;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n9->10;\n10[label=\"Node Type: IF 10\n\"];\n10->11[label=\"True\"];\n10->12[label=\"False\"];\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->13;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: END_IF 13\n\"];\n13->14;\n14[label=\"Node Type: IF 14\n\"];\n14->16[label=\"True\"];\n14->26[label=\"False\"];\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: END_IF 17\n\"];\n17->18;\n18[label=\"Node Type: IF 18\n\"];\n18->19[label=\"True\"];\n18->20[label=\"False\"];\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->21;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: IF 22\n\"];\n22->23[label=\"True\"];\n22->24[label=\"False\"];\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->25;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: END_IF 25\n\"];\n26[label=\"Node Type: IF 26\n\"];\n26->27[label=\"True\"];\n26->28[label=\"False\"];\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->29;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: END_IF 29\n\"];\n29->17;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/conditional-0.8.5-compact.json b/tests/ast-parsing/expected/conditional-0.8.5-compact.json new file mode 100644 index 000000000..6ef3d40e7 --- /dev/null +++ b/tests/ast-parsing/expected/conditional-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->6;\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->9;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n9->10;\n10[label=\"Node Type: IF 10\n\"];\n10->11[label=\"True\"];\n10->12[label=\"False\"];\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->13;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: END_IF 13\n\"];\n13->14;\n14[label=\"Node Type: IF 14\n\"];\n14->16[label=\"True\"];\n14->26[label=\"False\"];\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: END_IF 17\n\"];\n17->18;\n18[label=\"Node Type: IF 18\n\"];\n18->19[label=\"True\"];\n18->20[label=\"False\"];\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->21;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: IF 22\n\"];\n22->23[label=\"True\"];\n22->24[label=\"False\"];\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->25;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: END_IF 25\n\"];\n26[label=\"Node Type: IF 26\n\"];\n26->27[label=\"True\"];\n26->28[label=\"False\"];\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->29;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: END_IF 29\n\"];\n29->17;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/conditional-0.8.6-compact.json b/tests/ast-parsing/expected/conditional-0.8.6-compact.json new file mode 100644 index 000000000..6ef3d40e7 --- /dev/null +++ b/tests/ast-parsing/expected/conditional-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->6;\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->9;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n9->10;\n10[label=\"Node Type: IF 10\n\"];\n10->11[label=\"True\"];\n10->12[label=\"False\"];\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->13;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: END_IF 13\n\"];\n13->14;\n14[label=\"Node Type: IF 14\n\"];\n14->16[label=\"True\"];\n14->26[label=\"False\"];\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: END_IF 17\n\"];\n17->18;\n18[label=\"Node Type: IF 18\n\"];\n18->19[label=\"True\"];\n18->20[label=\"False\"];\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->21;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: IF 22\n\"];\n22->23[label=\"True\"];\n22->24[label=\"False\"];\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->25;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: END_IF 25\n\"];\n26[label=\"Node Type: IF 26\n\"];\n26->27[label=\"True\"];\n26->28[label=\"False\"];\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->29;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: END_IF 29\n\"];\n29->17;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/conditional-0.8.7-compact.json b/tests/ast-parsing/expected/conditional-0.8.7-compact.json new file mode 100644 index 000000000..6ef3d40e7 --- /dev/null +++ b/tests/ast-parsing/expected/conditional-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->6;\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->9;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n9->10;\n10[label=\"Node Type: IF 10\n\"];\n10->11[label=\"True\"];\n10->12[label=\"False\"];\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->13;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: END_IF 13\n\"];\n13->14;\n14[label=\"Node Type: IF 14\n\"];\n14->16[label=\"True\"];\n14->26[label=\"False\"];\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: END_IF 17\n\"];\n17->18;\n18[label=\"Node Type: IF 18\n\"];\n18->19[label=\"True\"];\n18->20[label=\"False\"];\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->21;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: IF 22\n\"];\n22->23[label=\"True\"];\n22->24[label=\"False\"];\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->25;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: END_IF 25\n\"];\n26[label=\"Node Type: IF 26\n\"];\n26->27[label=\"True\"];\n26->28[label=\"False\"];\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->29;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: END_IF 29\n\"];\n29->17;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/conditional-0.8.8-compact.json b/tests/ast-parsing/expected/conditional-0.8.8-compact.json new file mode 100644 index 000000000..6ef3d40e7 --- /dev/null +++ b/tests/ast-parsing/expected/conditional-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->6;\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->9;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n9->10;\n10[label=\"Node Type: IF 10\n\"];\n10->11[label=\"True\"];\n10->12[label=\"False\"];\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->13;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: END_IF 13\n\"];\n13->14;\n14[label=\"Node Type: IF 14\n\"];\n14->16[label=\"True\"];\n14->26[label=\"False\"];\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: END_IF 17\n\"];\n17->18;\n18[label=\"Node Type: IF 18\n\"];\n18->19[label=\"True\"];\n18->20[label=\"False\"];\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->21;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: IF 22\n\"];\n22->23[label=\"True\"];\n22->24[label=\"False\"];\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->25;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: END_IF 25\n\"];\n26[label=\"Node Type: IF 26\n\"];\n26->27[label=\"True\"];\n26->28[label=\"False\"];\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->29;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: END_IF 29\n\"];\n29->17;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/conditional-0.8.9-compact.json b/tests/ast-parsing/expected/conditional-0.8.9-compact.json new file mode 100644 index 000000000..6ef3d40e7 --- /dev/null +++ b/tests/ast-parsing/expected/conditional-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->6;\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->9;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n9->10;\n10[label=\"Node Type: IF 10\n\"];\n10->11[label=\"True\"];\n10->12[label=\"False\"];\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->13;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: END_IF 13\n\"];\n13->14;\n14[label=\"Node Type: IF 14\n\"];\n14->16[label=\"True\"];\n14->26[label=\"False\"];\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: END_IF 17\n\"];\n17->18;\n18[label=\"Node Type: IF 18\n\"];\n18->19[label=\"True\"];\n18->20[label=\"False\"];\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->21;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: IF 22\n\"];\n22->23[label=\"True\"];\n22->24[label=\"False\"];\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->25;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: END_IF 25\n\"];\n26[label=\"Node Type: IF 26\n\"];\n26->27[label=\"True\"];\n26->28[label=\"False\"];\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->29;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: END_IF 29\n\"];\n29->17;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/continue-0.8.10-compact.json b/tests/ast-parsing/expected/continue-0.8.10-compact.json new file mode 100644 index 000000000..bba15d9bd --- /dev/null +++ b/tests/ast-parsing/expected/continue-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/continue-0.8.5-compact.json b/tests/ast-parsing/expected/continue-0.8.5-compact.json new file mode 100644 index 000000000..bba15d9bd --- /dev/null +++ b/tests/ast-parsing/expected/continue-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/continue-0.8.6-compact.json b/tests/ast-parsing/expected/continue-0.8.6-compact.json new file mode 100644 index 000000000..bba15d9bd --- /dev/null +++ b/tests/ast-parsing/expected/continue-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/continue-0.8.7-compact.json b/tests/ast-parsing/expected/continue-0.8.7-compact.json new file mode 100644 index 000000000..bba15d9bd --- /dev/null +++ b/tests/ast-parsing/expected/continue-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/continue-0.8.8-compact.json b/tests/ast-parsing/expected/continue-0.8.8-compact.json new file mode 100644 index 000000000..bba15d9bd --- /dev/null +++ b/tests/ast-parsing/expected/continue-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/continue-0.8.9-compact.json b/tests/ast-parsing/expected/continue-0.8.9-compact.json new file mode 100644 index 000000000..bba15d9bd --- /dev/null +++ b/tests/ast-parsing/expected/continue-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/contract-0.8.10-compact.json b/tests/ast-parsing/expected/contract-0.8.10-compact.json new file mode 100644 index 000000000..1df28fb3d --- /dev/null +++ b/tests/ast-parsing/expected/contract-0.8.10-compact.json @@ -0,0 +1,19 @@ +{ + "A": {}, + "B": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "D": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "E": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "F": {}, + "G": {}, + "H": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/contract-0.8.5-compact.json b/tests/ast-parsing/expected/contract-0.8.5-compact.json new file mode 100644 index 000000000..1df28fb3d --- /dev/null +++ b/tests/ast-parsing/expected/contract-0.8.5-compact.json @@ -0,0 +1,19 @@ +{ + "A": {}, + "B": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "D": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "E": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "F": {}, + "G": {}, + "H": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/contract-0.8.6-compact.json b/tests/ast-parsing/expected/contract-0.8.6-compact.json new file mode 100644 index 000000000..1df28fb3d --- /dev/null +++ b/tests/ast-parsing/expected/contract-0.8.6-compact.json @@ -0,0 +1,19 @@ +{ + "A": {}, + "B": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "D": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "E": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "F": {}, + "G": {}, + "H": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/contract-0.8.7-compact.json b/tests/ast-parsing/expected/contract-0.8.7-compact.json new file mode 100644 index 000000000..1df28fb3d --- /dev/null +++ b/tests/ast-parsing/expected/contract-0.8.7-compact.json @@ -0,0 +1,19 @@ +{ + "A": {}, + "B": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "D": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "E": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "F": {}, + "G": {}, + "H": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/contract-0.8.8-compact.json b/tests/ast-parsing/expected/contract-0.8.8-compact.json new file mode 100644 index 000000000..1df28fb3d --- /dev/null +++ b/tests/ast-parsing/expected/contract-0.8.8-compact.json @@ -0,0 +1,19 @@ +{ + "A": {}, + "B": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "D": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "E": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "F": {}, + "G": {}, + "H": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/contract-0.8.9-compact.json b/tests/ast-parsing/expected/contract-0.8.9-compact.json new file mode 100644 index 000000000..1df28fb3d --- /dev/null +++ b/tests/ast-parsing/expected/contract-0.8.9-compact.json @@ -0,0 +1,19 @@ +{ + "A": {}, + "B": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "D": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "E": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "F": {}, + "G": {}, + "H": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/dowhile-0.8.10-compact.json b/tests/ast-parsing/expected/dowhile-0.8.10-compact.json new file mode 100644 index 000000000..1cf317575 --- /dev/null +++ b/tests/ast-parsing/expected/dowhile-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/dowhile-0.8.5-compact.json b/tests/ast-parsing/expected/dowhile-0.8.5-compact.json new file mode 100644 index 000000000..1cf317575 --- /dev/null +++ b/tests/ast-parsing/expected/dowhile-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/dowhile-0.8.6-compact.json b/tests/ast-parsing/expected/dowhile-0.8.6-compact.json new file mode 100644 index 000000000..1cf317575 --- /dev/null +++ b/tests/ast-parsing/expected/dowhile-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/dowhile-0.8.7-compact.json b/tests/ast-parsing/expected/dowhile-0.8.7-compact.json new file mode 100644 index 000000000..1cf317575 --- /dev/null +++ b/tests/ast-parsing/expected/dowhile-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/dowhile-0.8.8-compact.json b/tests/ast-parsing/expected/dowhile-0.8.8-compact.json new file mode 100644 index 000000000..1cf317575 --- /dev/null +++ b/tests/ast-parsing/expected/dowhile-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/dowhile-0.8.9-compact.json b/tests/ast-parsing/expected/dowhile-0.8.9-compact.json new file mode 100644 index 000000000..1cf317575 --- /dev/null +++ b/tests/ast-parsing/expected/dowhile-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/emit-0.8.10-compact.json b/tests/ast-parsing/expected/emit-0.8.10-compact.json new file mode 100644 index 000000000..b043ced39 --- /dev/null +++ b/tests/ast-parsing/expected/emit-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/emit-0.8.5-compact.json b/tests/ast-parsing/expected/emit-0.8.5-compact.json new file mode 100644 index 000000000..b043ced39 --- /dev/null +++ b/tests/ast-parsing/expected/emit-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/emit-0.8.6-compact.json b/tests/ast-parsing/expected/emit-0.8.6-compact.json new file mode 100644 index 000000000..b043ced39 --- /dev/null +++ b/tests/ast-parsing/expected/emit-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/emit-0.8.7-compact.json b/tests/ast-parsing/expected/emit-0.8.7-compact.json new file mode 100644 index 000000000..b043ced39 --- /dev/null +++ b/tests/ast-parsing/expected/emit-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/emit-0.8.8-compact.json b/tests/ast-parsing/expected/emit-0.8.8-compact.json new file mode 100644 index 000000000..b043ced39 --- /dev/null +++ b/tests/ast-parsing/expected/emit-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/emit-0.8.9-compact.json b/tests/ast-parsing/expected/emit-0.8.9-compact.json new file mode 100644 index 000000000..b043ced39 --- /dev/null +++ b/tests/ast-parsing/expected/emit-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/enum-0.8.10-compact.json b/tests/ast-parsing/expected/enum-0.8.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/enum-0.8.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/enum-0.8.5-compact.json b/tests/ast-parsing/expected/enum-0.8.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/enum-0.8.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/enum-0.8.6-compact.json b/tests/ast-parsing/expected/enum-0.8.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/enum-0.8.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/enum-0.8.7-compact.json b/tests/ast-parsing/expected/enum-0.8.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/enum-0.8.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/enum-0.8.8-compact.json b/tests/ast-parsing/expected/enum-0.8.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/enum-0.8.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/enum-0.8.9-compact.json b/tests/ast-parsing/expected/enum-0.8.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/enum-0.8.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/event-0.8.10-compact.json b/tests/ast-parsing/expected/event-0.8.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/event-0.8.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/event-0.8.5-compact.json b/tests/ast-parsing/expected/event-0.8.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/event-0.8.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/event-0.8.6-compact.json b/tests/ast-parsing/expected/event-0.8.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/event-0.8.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/event-0.8.7-compact.json b/tests/ast-parsing/expected/event-0.8.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/event-0.8.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/event-0.8.8-compact.json b/tests/ast-parsing/expected/event-0.8.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/event-0.8.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/event-0.8.9-compact.json b/tests/ast-parsing/expected/event-0.8.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/event-0.8.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/for-0.8.10-compact.json b/tests/ast-parsing/expected/for-0.8.10-compact.json new file mode 100644 index 000000000..fe24348d8 --- /dev/null +++ b/tests/ast-parsing/expected/for-0.8.10-compact.json @@ -0,0 +1,15 @@ +{ + "C": { + "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", + "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/for-0.8.5-compact.json b/tests/ast-parsing/expected/for-0.8.5-compact.json new file mode 100644 index 000000000..fe24348d8 --- /dev/null +++ b/tests/ast-parsing/expected/for-0.8.5-compact.json @@ -0,0 +1,15 @@ +{ + "C": { + "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", + "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/for-0.8.6-compact.json b/tests/ast-parsing/expected/for-0.8.6-compact.json new file mode 100644 index 000000000..fe24348d8 --- /dev/null +++ b/tests/ast-parsing/expected/for-0.8.6-compact.json @@ -0,0 +1,15 @@ +{ + "C": { + "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", + "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/for-0.8.7-compact.json b/tests/ast-parsing/expected/for-0.8.7-compact.json new file mode 100644 index 000000000..fe24348d8 --- /dev/null +++ b/tests/ast-parsing/expected/for-0.8.7-compact.json @@ -0,0 +1,15 @@ +{ + "C": { + "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", + "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/for-0.8.8-compact.json b/tests/ast-parsing/expected/for-0.8.8-compact.json new file mode 100644 index 000000000..fe24348d8 --- /dev/null +++ b/tests/ast-parsing/expected/for-0.8.8-compact.json @@ -0,0 +1,15 @@ +{ + "C": { + "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", + "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/for-0.8.9-compact.json b/tests/ast-parsing/expected/for-0.8.9-compact.json new file mode 100644 index 000000000..fe24348d8 --- /dev/null +++ b/tests/ast-parsing/expected/for-0.8.9-compact.json @@ -0,0 +1,15 @@ +{ + "C": { + "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", + "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/function-0.8.10-compact.json b/tests/ast-parsing/expected/function-0.8.10-compact.json new file mode 100644 index 000000000..50465d36d --- /dev/null +++ b/tests/ast-parsing/expected/function-0.8.10-compact.json @@ -0,0 +1,52 @@ +{ + "C1": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C2": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C3": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + }, + "C4": { + "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C5": { + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n}\n" + }, + "C6": { + "abstractFunc()": "digraph{\n}\n", + "abstractFunc2()": "digraph{\n}\n" + }, + "C7": { + "abstractFunc3()": "digraph{\n}\n" + }, + "C8": { + "abstractFunc3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/function-0.8.5-compact.json b/tests/ast-parsing/expected/function-0.8.5-compact.json new file mode 100644 index 000000000..50465d36d --- /dev/null +++ b/tests/ast-parsing/expected/function-0.8.5-compact.json @@ -0,0 +1,52 @@ +{ + "C1": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C2": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C3": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + }, + "C4": { + "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C5": { + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n}\n" + }, + "C6": { + "abstractFunc()": "digraph{\n}\n", + "abstractFunc2()": "digraph{\n}\n" + }, + "C7": { + "abstractFunc3()": "digraph{\n}\n" + }, + "C8": { + "abstractFunc3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/function-0.8.6-compact.json b/tests/ast-parsing/expected/function-0.8.6-compact.json new file mode 100644 index 000000000..50465d36d --- /dev/null +++ b/tests/ast-parsing/expected/function-0.8.6-compact.json @@ -0,0 +1,52 @@ +{ + "C1": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C2": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C3": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + }, + "C4": { + "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C5": { + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n}\n" + }, + "C6": { + "abstractFunc()": "digraph{\n}\n", + "abstractFunc2()": "digraph{\n}\n" + }, + "C7": { + "abstractFunc3()": "digraph{\n}\n" + }, + "C8": { + "abstractFunc3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/function-0.8.7-compact.json b/tests/ast-parsing/expected/function-0.8.7-compact.json new file mode 100644 index 000000000..50465d36d --- /dev/null +++ b/tests/ast-parsing/expected/function-0.8.7-compact.json @@ -0,0 +1,52 @@ +{ + "C1": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C2": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C3": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + }, + "C4": { + "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C5": { + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n}\n" + }, + "C6": { + "abstractFunc()": "digraph{\n}\n", + "abstractFunc2()": "digraph{\n}\n" + }, + "C7": { + "abstractFunc3()": "digraph{\n}\n" + }, + "C8": { + "abstractFunc3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/function-0.8.8-compact.json b/tests/ast-parsing/expected/function-0.8.8-compact.json new file mode 100644 index 000000000..50465d36d --- /dev/null +++ b/tests/ast-parsing/expected/function-0.8.8-compact.json @@ -0,0 +1,52 @@ +{ + "C1": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C2": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C3": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + }, + "C4": { + "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C5": { + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n}\n" + }, + "C6": { + "abstractFunc()": "digraph{\n}\n", + "abstractFunc2()": "digraph{\n}\n" + }, + "C7": { + "abstractFunc3()": "digraph{\n}\n" + }, + "C8": { + "abstractFunc3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/function-0.8.9-compact.json b/tests/ast-parsing/expected/function-0.8.9-compact.json new file mode 100644 index 000000000..50465d36d --- /dev/null +++ b/tests/ast-parsing/expected/function-0.8.9-compact.json @@ -0,0 +1,52 @@ +{ + "C1": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C2": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C3": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + }, + "C4": { + "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C5": { + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n}\n" + }, + "C6": { + "abstractFunc()": "digraph{\n}\n", + "abstractFunc2()": "digraph{\n}\n" + }, + "C7": { + "abstractFunc3()": "digraph{\n}\n" + }, + "C8": { + "abstractFunc3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/functioncall-0.8.10-compact.json b/tests/ast-parsing/expected/functioncall-0.8.10-compact.json new file mode 100644 index 000000000..f266b62b1 --- /dev/null +++ b/tests/ast-parsing/expected/functioncall-0.8.10-compact.json @@ -0,0 +1,10 @@ +{ + "I": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n}\n", + "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/functioncall-0.8.5-compact.json b/tests/ast-parsing/expected/functioncall-0.8.5-compact.json new file mode 100644 index 000000000..f266b62b1 --- /dev/null +++ b/tests/ast-parsing/expected/functioncall-0.8.5-compact.json @@ -0,0 +1,10 @@ +{ + "I": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n}\n", + "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/functioncall-0.8.6-compact.json b/tests/ast-parsing/expected/functioncall-0.8.6-compact.json new file mode 100644 index 000000000..f266b62b1 --- /dev/null +++ b/tests/ast-parsing/expected/functioncall-0.8.6-compact.json @@ -0,0 +1,10 @@ +{ + "I": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n}\n", + "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/functioncall-0.8.7-compact.json b/tests/ast-parsing/expected/functioncall-0.8.7-compact.json new file mode 100644 index 000000000..f266b62b1 --- /dev/null +++ b/tests/ast-parsing/expected/functioncall-0.8.7-compact.json @@ -0,0 +1,10 @@ +{ + "I": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n}\n", + "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/functioncall-0.8.8-compact.json b/tests/ast-parsing/expected/functioncall-0.8.8-compact.json new file mode 100644 index 000000000..f266b62b1 --- /dev/null +++ b/tests/ast-parsing/expected/functioncall-0.8.8-compact.json @@ -0,0 +1,10 @@ +{ + "I": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n}\n", + "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/functioncall-0.8.9-compact.json b/tests/ast-parsing/expected/functioncall-0.8.9-compact.json new file mode 100644 index 000000000..f266b62b1 --- /dev/null +++ b/tests/ast-parsing/expected/functioncall-0.8.9-compact.json @@ -0,0 +1,10 @@ +{ + "I": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n}\n", + "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/if-0.8.10-compact.json b/tests/ast-parsing/expected/if-0.8.10-compact.json new file mode 100644 index 000000000..c0c884b4e --- /dev/null +++ b/tests/ast-parsing/expected/if-0.8.10-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", + "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", + "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/if-0.8.5-compact.json b/tests/ast-parsing/expected/if-0.8.5-compact.json new file mode 100644 index 000000000..c0c884b4e --- /dev/null +++ b/tests/ast-parsing/expected/if-0.8.5-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", + "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", + "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/if-0.8.6-compact.json b/tests/ast-parsing/expected/if-0.8.6-compact.json new file mode 100644 index 000000000..c0c884b4e --- /dev/null +++ b/tests/ast-parsing/expected/if-0.8.6-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", + "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", + "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/if-0.8.7-compact.json b/tests/ast-parsing/expected/if-0.8.7-compact.json new file mode 100644 index 000000000..c0c884b4e --- /dev/null +++ b/tests/ast-parsing/expected/if-0.8.7-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", + "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", + "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/if-0.8.8-compact.json b/tests/ast-parsing/expected/if-0.8.8-compact.json new file mode 100644 index 000000000..c0c884b4e --- /dev/null +++ b/tests/ast-parsing/expected/if-0.8.8-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", + "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", + "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/if-0.8.9-compact.json b/tests/ast-parsing/expected/if-0.8.9-compact.json new file mode 100644 index 000000000..c0c884b4e --- /dev/null +++ b/tests/ast-parsing/expected/if-0.8.9-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", + "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", + "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexaccess-0.8.10-compact.json b/tests/ast-parsing/expected/indexaccess-0.8.10-compact.json new file mode 100644 index 000000000..43190fcd6 --- /dev/null +++ b/tests/ast-parsing/expected/indexaccess-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexaccess-0.8.5-compact.json b/tests/ast-parsing/expected/indexaccess-0.8.5-compact.json new file mode 100644 index 000000000..43190fcd6 --- /dev/null +++ b/tests/ast-parsing/expected/indexaccess-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexaccess-0.8.6-compact.json b/tests/ast-parsing/expected/indexaccess-0.8.6-compact.json new file mode 100644 index 000000000..43190fcd6 --- /dev/null +++ b/tests/ast-parsing/expected/indexaccess-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexaccess-0.8.7-compact.json b/tests/ast-parsing/expected/indexaccess-0.8.7-compact.json new file mode 100644 index 000000000..43190fcd6 --- /dev/null +++ b/tests/ast-parsing/expected/indexaccess-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexaccess-0.8.8-compact.json b/tests/ast-parsing/expected/indexaccess-0.8.8-compact.json new file mode 100644 index 000000000..43190fcd6 --- /dev/null +++ b/tests/ast-parsing/expected/indexaccess-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexaccess-0.8.9-compact.json b/tests/ast-parsing/expected/indexaccess-0.8.9-compact.json new file mode 100644 index 000000000..43190fcd6 --- /dev/null +++ b/tests/ast-parsing/expected/indexaccess-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexrangeaccess-0.8.10-compact.json b/tests/ast-parsing/expected/indexrangeaccess-0.8.10-compact.json new file mode 100644 index 000000000..f4529bc86 --- /dev/null +++ b/tests/ast-parsing/expected/indexrangeaccess-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexrangeaccess-0.8.5-compact.json b/tests/ast-parsing/expected/indexrangeaccess-0.8.5-compact.json new file mode 100644 index 000000000..f4529bc86 --- /dev/null +++ b/tests/ast-parsing/expected/indexrangeaccess-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexrangeaccess-0.8.6-compact.json b/tests/ast-parsing/expected/indexrangeaccess-0.8.6-compact.json new file mode 100644 index 000000000..f4529bc86 --- /dev/null +++ b/tests/ast-parsing/expected/indexrangeaccess-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexrangeaccess-0.8.7-compact.json b/tests/ast-parsing/expected/indexrangeaccess-0.8.7-compact.json new file mode 100644 index 000000000..f4529bc86 --- /dev/null +++ b/tests/ast-parsing/expected/indexrangeaccess-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexrangeaccess-0.8.8-compact.json b/tests/ast-parsing/expected/indexrangeaccess-0.8.8-compact.json new file mode 100644 index 000000000..f4529bc86 --- /dev/null +++ b/tests/ast-parsing/expected/indexrangeaccess-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexrangeaccess-0.8.9-compact.json b/tests/ast-parsing/expected/indexrangeaccess-0.8.9-compact.json new file mode 100644 index 000000000..f4529bc86 --- /dev/null +++ b/tests/ast-parsing/expected/indexrangeaccess-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/library_implicit_conversion-0.8.10-compact.json b/tests/ast-parsing/expected/library_implicit_conversion-0.8.10-compact.json new file mode 100644 index 000000000..81b56547c --- /dev/null +++ b/tests/ast-parsing/expected/library_implicit_conversion-0.8.10-compact.json @@ -0,0 +1,23 @@ +{ + "LibByte": { + "t(uint256,bytes1)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestByte": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibUint": { + "t(uint256,uint8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUint": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibInt": { + "t(uint256,int8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUintWithVariableiAndConversion": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/library_implicit_conversion-0.8.5-compact.json b/tests/ast-parsing/expected/library_implicit_conversion-0.8.5-compact.json new file mode 100644 index 000000000..81b56547c --- /dev/null +++ b/tests/ast-parsing/expected/library_implicit_conversion-0.8.5-compact.json @@ -0,0 +1,23 @@ +{ + "LibByte": { + "t(uint256,bytes1)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestByte": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibUint": { + "t(uint256,uint8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUint": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibInt": { + "t(uint256,int8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUintWithVariableiAndConversion": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/library_implicit_conversion-0.8.6-compact.json b/tests/ast-parsing/expected/library_implicit_conversion-0.8.6-compact.json new file mode 100644 index 000000000..81b56547c --- /dev/null +++ b/tests/ast-parsing/expected/library_implicit_conversion-0.8.6-compact.json @@ -0,0 +1,23 @@ +{ + "LibByte": { + "t(uint256,bytes1)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestByte": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibUint": { + "t(uint256,uint8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUint": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibInt": { + "t(uint256,int8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUintWithVariableiAndConversion": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/library_implicit_conversion-0.8.7-compact.json b/tests/ast-parsing/expected/library_implicit_conversion-0.8.7-compact.json new file mode 100644 index 000000000..81b56547c --- /dev/null +++ b/tests/ast-parsing/expected/library_implicit_conversion-0.8.7-compact.json @@ -0,0 +1,23 @@ +{ + "LibByte": { + "t(uint256,bytes1)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestByte": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibUint": { + "t(uint256,uint8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUint": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibInt": { + "t(uint256,int8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUintWithVariableiAndConversion": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/library_implicit_conversion-0.8.8-compact.json b/tests/ast-parsing/expected/library_implicit_conversion-0.8.8-compact.json new file mode 100644 index 000000000..81b56547c --- /dev/null +++ b/tests/ast-parsing/expected/library_implicit_conversion-0.8.8-compact.json @@ -0,0 +1,23 @@ +{ + "LibByte": { + "t(uint256,bytes1)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestByte": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibUint": { + "t(uint256,uint8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUint": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibInt": { + "t(uint256,int8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUintWithVariableiAndConversion": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/library_implicit_conversion-0.8.9-compact.json b/tests/ast-parsing/expected/library_implicit_conversion-0.8.9-compact.json new file mode 100644 index 000000000..81b56547c --- /dev/null +++ b/tests/ast-parsing/expected/library_implicit_conversion-0.8.9-compact.json @@ -0,0 +1,23 @@ +{ + "LibByte": { + "t(uint256,bytes1)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestByte": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibUint": { + "t(uint256,uint8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUint": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibInt": { + "t(uint256,int8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUintWithVariableiAndConversion": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/memberaccess-0.8.10-compact.json b/tests/ast-parsing/expected/memberaccess-0.8.10-compact.json new file mode 100644 index 000000000..b66694f7a --- /dev/null +++ b/tests/ast-parsing/expected/memberaccess-0.8.10-compact.json @@ -0,0 +1,7 @@ +{ + "I": {}, + "F": {}, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/memberaccess-0.8.5-compact.json b/tests/ast-parsing/expected/memberaccess-0.8.5-compact.json new file mode 100644 index 000000000..b66694f7a --- /dev/null +++ b/tests/ast-parsing/expected/memberaccess-0.8.5-compact.json @@ -0,0 +1,7 @@ +{ + "I": {}, + "F": {}, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/memberaccess-0.8.6-compact.json b/tests/ast-parsing/expected/memberaccess-0.8.6-compact.json new file mode 100644 index 000000000..b66694f7a --- /dev/null +++ b/tests/ast-parsing/expected/memberaccess-0.8.6-compact.json @@ -0,0 +1,7 @@ +{ + "I": {}, + "F": {}, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/memberaccess-0.8.7-compact.json b/tests/ast-parsing/expected/memberaccess-0.8.7-compact.json new file mode 100644 index 000000000..b66694f7a --- /dev/null +++ b/tests/ast-parsing/expected/memberaccess-0.8.7-compact.json @@ -0,0 +1,7 @@ +{ + "I": {}, + "F": {}, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/memberaccess-0.8.8-compact.json b/tests/ast-parsing/expected/memberaccess-0.8.8-compact.json new file mode 100644 index 000000000..b66694f7a --- /dev/null +++ b/tests/ast-parsing/expected/memberaccess-0.8.8-compact.json @@ -0,0 +1,7 @@ +{ + "I": {}, + "F": {}, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/memberaccess-0.8.9-compact.json b/tests/ast-parsing/expected/memberaccess-0.8.9-compact.json new file mode 100644 index 000000000..b66694f7a --- /dev/null +++ b/tests/ast-parsing/expected/memberaccess-0.8.9-compact.json @@ -0,0 +1,7 @@ +{ + "I": {}, + "F": {}, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/minmax-0.8.10-compact.json b/tests/ast-parsing/expected/minmax-0.8.10-compact.json new file mode 100644 index 000000000..228af371a --- /dev/null +++ b/tests/ast-parsing/expected/minmax-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/minmax-0.8.5-compact.json b/tests/ast-parsing/expected/minmax-0.8.5-compact.json new file mode 100644 index 000000000..228af371a --- /dev/null +++ b/tests/ast-parsing/expected/minmax-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/minmax-0.8.6-compact.json b/tests/ast-parsing/expected/minmax-0.8.6-compact.json new file mode 100644 index 000000000..228af371a --- /dev/null +++ b/tests/ast-parsing/expected/minmax-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/minmax-0.8.7-compact.json b/tests/ast-parsing/expected/minmax-0.8.7-compact.json new file mode 100644 index 000000000..228af371a --- /dev/null +++ b/tests/ast-parsing/expected/minmax-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/minmax-0.8.8-compact.json b/tests/ast-parsing/expected/minmax-0.8.8-compact.json new file mode 100644 index 000000000..228af371a --- /dev/null +++ b/tests/ast-parsing/expected/minmax-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/minmax-0.8.9-compact.json b/tests/ast-parsing/expected/minmax-0.8.9-compact.json new file mode 100644 index 000000000..228af371a --- /dev/null +++ b/tests/ast-parsing/expected/minmax-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/modifier-0.8.10-compact.json b/tests/ast-parsing/expected/modifier-0.8.10-compact.json new file mode 100644 index 000000000..34aad8ef1 --- /dev/null +++ b/tests/ast-parsing/expected/modifier-0.8.10-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", + "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/modifier-0.8.5-compact.json b/tests/ast-parsing/expected/modifier-0.8.5-compact.json new file mode 100644 index 000000000..34aad8ef1 --- /dev/null +++ b/tests/ast-parsing/expected/modifier-0.8.5-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", + "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/modifier-0.8.6-compact.json b/tests/ast-parsing/expected/modifier-0.8.6-compact.json new file mode 100644 index 000000000..34aad8ef1 --- /dev/null +++ b/tests/ast-parsing/expected/modifier-0.8.6-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", + "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/modifier-0.8.7-compact.json b/tests/ast-parsing/expected/modifier-0.8.7-compact.json new file mode 100644 index 000000000..34aad8ef1 --- /dev/null +++ b/tests/ast-parsing/expected/modifier-0.8.7-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", + "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/modifier-0.8.8-compact.json b/tests/ast-parsing/expected/modifier-0.8.8-compact.json new file mode 100644 index 000000000..34aad8ef1 --- /dev/null +++ b/tests/ast-parsing/expected/modifier-0.8.8-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", + "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/modifier-0.8.9-compact.json b/tests/ast-parsing/expected/modifier-0.8.9-compact.json new file mode 100644 index 000000000..34aad8ef1 --- /dev/null +++ b/tests/ast-parsing/expected/modifier-0.8.9-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", + "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/newexpression-0.8.10-compact.json b/tests/ast-parsing/expected/newexpression-0.8.10-compact.json new file mode 100644 index 000000000..e46dafe75 --- /dev/null +++ b/tests/ast-parsing/expected/newexpression-0.8.10-compact.json @@ -0,0 +1,8 @@ +{ + "B": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/newexpression-0.8.5-compact.json b/tests/ast-parsing/expected/newexpression-0.8.5-compact.json new file mode 100644 index 000000000..e46dafe75 --- /dev/null +++ b/tests/ast-parsing/expected/newexpression-0.8.5-compact.json @@ -0,0 +1,8 @@ +{ + "B": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/newexpression-0.8.6-compact.json b/tests/ast-parsing/expected/newexpression-0.8.6-compact.json new file mode 100644 index 000000000..e46dafe75 --- /dev/null +++ b/tests/ast-parsing/expected/newexpression-0.8.6-compact.json @@ -0,0 +1,8 @@ +{ + "B": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/newexpression-0.8.7-compact.json b/tests/ast-parsing/expected/newexpression-0.8.7-compact.json new file mode 100644 index 000000000..e46dafe75 --- /dev/null +++ b/tests/ast-parsing/expected/newexpression-0.8.7-compact.json @@ -0,0 +1,8 @@ +{ + "B": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/newexpression-0.8.8-compact.json b/tests/ast-parsing/expected/newexpression-0.8.8-compact.json new file mode 100644 index 000000000..e46dafe75 --- /dev/null +++ b/tests/ast-parsing/expected/newexpression-0.8.8-compact.json @@ -0,0 +1,8 @@ +{ + "B": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/newexpression-0.8.9-compact.json b/tests/ast-parsing/expected/newexpression-0.8.9-compact.json new file mode 100644 index 000000000..e46dafe75 --- /dev/null +++ b/tests/ast-parsing/expected/newexpression-0.8.9-compact.json @@ -0,0 +1,8 @@ +{ + "B": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/pragma-0.8.10-compact.json b/tests/ast-parsing/expected/pragma-0.8.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/pragma-0.8.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/pragma-0.8.5-compact.json b/tests/ast-parsing/expected/pragma-0.8.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/pragma-0.8.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/pragma-0.8.6-compact.json b/tests/ast-parsing/expected/pragma-0.8.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/pragma-0.8.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/pragma-0.8.7-compact.json b/tests/ast-parsing/expected/pragma-0.8.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/pragma-0.8.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/pragma-0.8.8-compact.json b/tests/ast-parsing/expected/pragma-0.8.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/pragma-0.8.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/pragma-0.8.9-compact.json b/tests/ast-parsing/expected/pragma-0.8.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/pragma-0.8.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/push-0.8.10-compact.json b/tests/ast-parsing/expected/push-0.8.10-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/push-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/push-0.8.5-compact.json b/tests/ast-parsing/expected/push-0.8.5-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/push-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/push-0.8.6-compact.json b/tests/ast-parsing/expected/push-0.8.6-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/push-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/push-0.8.7-compact.json b/tests/ast-parsing/expected/push-0.8.7-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/push-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/push-0.8.8-compact.json b/tests/ast-parsing/expected/push-0.8.8-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/push-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/push-0.8.9-compact.json b/tests/ast-parsing/expected/push-0.8.9-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/push-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/return-0.8.10-compact.json b/tests/ast-parsing/expected/return-0.8.10-compact.json new file mode 100644 index 000000000..7eddd38f6 --- /dev/null +++ b/tests/ast-parsing/expected/return-0.8.10-compact.json @@ -0,0 +1,9 @@ +{ + "C": { + "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", + "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/return-0.8.5-compact.json b/tests/ast-parsing/expected/return-0.8.5-compact.json new file mode 100644 index 000000000..7eddd38f6 --- /dev/null +++ b/tests/ast-parsing/expected/return-0.8.5-compact.json @@ -0,0 +1,9 @@ +{ + "C": { + "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", + "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/return-0.8.6-compact.json b/tests/ast-parsing/expected/return-0.8.6-compact.json new file mode 100644 index 000000000..7eddd38f6 --- /dev/null +++ b/tests/ast-parsing/expected/return-0.8.6-compact.json @@ -0,0 +1,9 @@ +{ + "C": { + "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", + "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/return-0.8.7-compact.json b/tests/ast-parsing/expected/return-0.8.7-compact.json new file mode 100644 index 000000000..7eddd38f6 --- /dev/null +++ b/tests/ast-parsing/expected/return-0.8.7-compact.json @@ -0,0 +1,9 @@ +{ + "C": { + "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", + "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/return-0.8.8-compact.json b/tests/ast-parsing/expected/return-0.8.8-compact.json new file mode 100644 index 000000000..7eddd38f6 --- /dev/null +++ b/tests/ast-parsing/expected/return-0.8.8-compact.json @@ -0,0 +1,9 @@ +{ + "C": { + "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", + "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/return-0.8.9-compact.json b/tests/ast-parsing/expected/return-0.8.9-compact.json new file mode 100644 index 000000000..7eddd38f6 --- /dev/null +++ b/tests/ast-parsing/expected/return-0.8.9-compact.json @@ -0,0 +1,9 @@ +{ + "C": { + "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", + "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.0-legacy.json b/tests/ast-parsing/expected/scope-0.4.0-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.0-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.1-legacy.json b/tests/ast-parsing/expected/scope-0.4.1-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.1-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.10-legacy.json b/tests/ast-parsing/expected/scope-0.4.10-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.10-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.11-legacy.json b/tests/ast-parsing/expected/scope-0.4.11-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.11-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.12-compact.json b/tests/ast-parsing/expected/scope-0.4.12-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.12-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.12-legacy.json b/tests/ast-parsing/expected/scope-0.4.12-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.12-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.13-compact.json b/tests/ast-parsing/expected/scope-0.4.13-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.13-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.13-legacy.json b/tests/ast-parsing/expected/scope-0.4.13-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.13-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.14-compact.json b/tests/ast-parsing/expected/scope-0.4.14-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.14-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.14-legacy.json b/tests/ast-parsing/expected/scope-0.4.14-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.14-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.15-compact.json b/tests/ast-parsing/expected/scope-0.4.15-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.15-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.15-legacy.json b/tests/ast-parsing/expected/scope-0.4.15-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.15-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.16-compact.json b/tests/ast-parsing/expected/scope-0.4.16-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.16-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.16-legacy.json b/tests/ast-parsing/expected/scope-0.4.16-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.16-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.17-compact.json b/tests/ast-parsing/expected/scope-0.4.17-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.17-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.17-legacy.json b/tests/ast-parsing/expected/scope-0.4.17-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.17-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.18-compact.json b/tests/ast-parsing/expected/scope-0.4.18-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.18-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.18-legacy.json b/tests/ast-parsing/expected/scope-0.4.18-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.18-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.19-compact.json b/tests/ast-parsing/expected/scope-0.4.19-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.19-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.19-legacy.json b/tests/ast-parsing/expected/scope-0.4.19-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.19-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.2-legacy.json b/tests/ast-parsing/expected/scope-0.4.2-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.2-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.20-compact.json b/tests/ast-parsing/expected/scope-0.4.20-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.20-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.20-legacy.json b/tests/ast-parsing/expected/scope-0.4.20-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.20-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.21-compact.json b/tests/ast-parsing/expected/scope-0.4.21-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.21-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.21-legacy.json b/tests/ast-parsing/expected/scope-0.4.21-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.21-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.22-compact.json b/tests/ast-parsing/expected/scope-0.4.22-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.22-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.22-legacy.json b/tests/ast-parsing/expected/scope-0.4.22-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.22-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.23-compact.json b/tests/ast-parsing/expected/scope-0.4.23-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.23-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.23-legacy.json b/tests/ast-parsing/expected/scope-0.4.23-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.23-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.24-compact.json b/tests/ast-parsing/expected/scope-0.4.24-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.24-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.24-legacy.json b/tests/ast-parsing/expected/scope-0.4.24-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.24-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.25-compact.json b/tests/ast-parsing/expected/scope-0.4.25-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.25-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.25-legacy.json b/tests/ast-parsing/expected/scope-0.4.25-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.25-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.26-compact.json b/tests/ast-parsing/expected/scope-0.4.26-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.26-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.26-legacy.json b/tests/ast-parsing/expected/scope-0.4.26-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.26-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.3-legacy.json b/tests/ast-parsing/expected/scope-0.4.3-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.3-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.4-legacy.json b/tests/ast-parsing/expected/scope-0.4.4-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.4-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.5-legacy.json b/tests/ast-parsing/expected/scope-0.4.5-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.5-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.6-legacy.json b/tests/ast-parsing/expected/scope-0.4.6-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.6-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.7-legacy.json b/tests/ast-parsing/expected/scope-0.4.7-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.7-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.8-legacy.json b/tests/ast-parsing/expected/scope-0.4.8-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.8-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.4.9-legacy.json b/tests/ast-parsing/expected/scope-0.4.9-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.4.9-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.0-compact.json b/tests/ast-parsing/expected/scope-0.5.0-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.0-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.0-legacy.json b/tests/ast-parsing/expected/scope-0.5.0-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.0-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.1-compact.json b/tests/ast-parsing/expected/scope-0.5.1-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.1-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.1-legacy.json b/tests/ast-parsing/expected/scope-0.5.1-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.1-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.10-compact.json b/tests/ast-parsing/expected/scope-0.5.10-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.10-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.10-legacy.json b/tests/ast-parsing/expected/scope-0.5.10-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.10-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.11-compact.json b/tests/ast-parsing/expected/scope-0.5.11-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.11-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.11-legacy.json b/tests/ast-parsing/expected/scope-0.5.11-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.11-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.12-compact.json b/tests/ast-parsing/expected/scope-0.5.12-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.12-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.12-legacy.json b/tests/ast-parsing/expected/scope-0.5.12-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.12-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.13-compact.json b/tests/ast-parsing/expected/scope-0.5.13-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.13-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.13-legacy.json b/tests/ast-parsing/expected/scope-0.5.13-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.13-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.14-compact.json b/tests/ast-parsing/expected/scope-0.5.14-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.14-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.14-legacy.json b/tests/ast-parsing/expected/scope-0.5.14-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.14-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.15-compact.json b/tests/ast-parsing/expected/scope-0.5.15-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.15-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.15-legacy.json b/tests/ast-parsing/expected/scope-0.5.15-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.15-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.16-compact.json b/tests/ast-parsing/expected/scope-0.5.16-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.16-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.16-legacy.json b/tests/ast-parsing/expected/scope-0.5.16-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.16-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.17-compact.json b/tests/ast-parsing/expected/scope-0.5.17-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.17-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.17-legacy.json b/tests/ast-parsing/expected/scope-0.5.17-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.17-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.2-compact.json b/tests/ast-parsing/expected/scope-0.5.2-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.2-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.2-legacy.json b/tests/ast-parsing/expected/scope-0.5.2-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.2-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.3-compact.json b/tests/ast-parsing/expected/scope-0.5.3-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.3-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.3-legacy.json b/tests/ast-parsing/expected/scope-0.5.3-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.3-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.4-compact.json b/tests/ast-parsing/expected/scope-0.5.4-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.4-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.4-legacy.json b/tests/ast-parsing/expected/scope-0.5.4-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.4-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.5-compact.json b/tests/ast-parsing/expected/scope-0.5.5-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.5-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.5-legacy.json b/tests/ast-parsing/expected/scope-0.5.5-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.5-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.6-compact.json b/tests/ast-parsing/expected/scope-0.5.6-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.6-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.6-legacy.json b/tests/ast-parsing/expected/scope-0.5.6-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.6-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.7-compact.json b/tests/ast-parsing/expected/scope-0.5.7-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.7-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.7-legacy.json b/tests/ast-parsing/expected/scope-0.5.7-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.7-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.8-compact.json b/tests/ast-parsing/expected/scope-0.5.8-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.8-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.8-legacy.json b/tests/ast-parsing/expected/scope-0.5.8-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.8-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.9-compact.json b/tests/ast-parsing/expected/scope-0.5.9-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.9-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.5.9-legacy.json b/tests/ast-parsing/expected/scope-0.5.9-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.5.9-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.0-compact.json b/tests/ast-parsing/expected/scope-0.6.0-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.0-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.0-legacy.json b/tests/ast-parsing/expected/scope-0.6.0-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.0-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.1-compact.json b/tests/ast-parsing/expected/scope-0.6.1-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.1-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.1-legacy.json b/tests/ast-parsing/expected/scope-0.6.1-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.1-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.10-compact.json b/tests/ast-parsing/expected/scope-0.6.10-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.10-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.10-legacy.json b/tests/ast-parsing/expected/scope-0.6.10-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.10-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.11-compact.json b/tests/ast-parsing/expected/scope-0.6.11-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.11-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.11-legacy.json b/tests/ast-parsing/expected/scope-0.6.11-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.11-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.12-compact.json b/tests/ast-parsing/expected/scope-0.6.12-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.12-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.12-legacy.json b/tests/ast-parsing/expected/scope-0.6.12-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.12-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.2-compact.json b/tests/ast-parsing/expected/scope-0.6.2-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.2-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.2-legacy.json b/tests/ast-parsing/expected/scope-0.6.2-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.2-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.3-compact.json b/tests/ast-parsing/expected/scope-0.6.3-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.3-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.3-legacy.json b/tests/ast-parsing/expected/scope-0.6.3-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.3-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.4-compact.json b/tests/ast-parsing/expected/scope-0.6.4-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.4-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.4-legacy.json b/tests/ast-parsing/expected/scope-0.6.4-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.4-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.5-compact.json b/tests/ast-parsing/expected/scope-0.6.5-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.5-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.5-legacy.json b/tests/ast-parsing/expected/scope-0.6.5-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.5-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.6-compact.json b/tests/ast-parsing/expected/scope-0.6.6-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.6-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.6-legacy.json b/tests/ast-parsing/expected/scope-0.6.6-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.6-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.7-compact.json b/tests/ast-parsing/expected/scope-0.6.7-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.7-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.7-legacy.json b/tests/ast-parsing/expected/scope-0.6.7-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.7-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.8-compact.json b/tests/ast-parsing/expected/scope-0.6.8-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.8-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.8-legacy.json b/tests/ast-parsing/expected/scope-0.6.8-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.8-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.9-compact.json b/tests/ast-parsing/expected/scope-0.6.9-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.9-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.6.9-legacy.json b/tests/ast-parsing/expected/scope-0.6.9-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.6.9-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.0-compact.json b/tests/ast-parsing/expected/scope-0.7.0-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.0-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.0-legacy.json b/tests/ast-parsing/expected/scope-0.7.0-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.0-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.1-compact.json b/tests/ast-parsing/expected/scope-0.7.1-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.1-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.1-legacy.json b/tests/ast-parsing/expected/scope-0.7.1-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.1-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.2-compact.json b/tests/ast-parsing/expected/scope-0.7.2-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.2-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.2-legacy.json b/tests/ast-parsing/expected/scope-0.7.2-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.2-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.3-compact.json b/tests/ast-parsing/expected/scope-0.7.3-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.3-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.3-legacy.json b/tests/ast-parsing/expected/scope-0.7.3-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.3-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.4-compact.json b/tests/ast-parsing/expected/scope-0.7.4-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.4-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.4-legacy.json b/tests/ast-parsing/expected/scope-0.7.4-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.4-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.5-compact.json b/tests/ast-parsing/expected/scope-0.7.5-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.5-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.5-legacy.json b/tests/ast-parsing/expected/scope-0.7.5-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.5-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.6-compact.json b/tests/ast-parsing/expected/scope-0.7.6-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.6-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.7.6-legacy.json b/tests/ast-parsing/expected/scope-0.7.6-legacy.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.7.6-legacy.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.0-compact.json b/tests/ast-parsing/expected/scope-0.8.0-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.0-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.1-compact.json b/tests/ast-parsing/expected/scope-0.8.1-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.1-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.10-compact.json b/tests/ast-parsing/expected/scope-0.8.10-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.10-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.2-compact.json b/tests/ast-parsing/expected/scope-0.8.2-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.2-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.3-compact.json b/tests/ast-parsing/expected/scope-0.8.3-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.3-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.4-compact.json b/tests/ast-parsing/expected/scope-0.8.4-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.4-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.5-compact.json b/tests/ast-parsing/expected/scope-0.8.5-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.5-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.6-compact.json b/tests/ast-parsing/expected/scope-0.8.6-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.6-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.7-compact.json b/tests/ast-parsing/expected/scope-0.8.7-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.7-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.8-compact.json b/tests/ast-parsing/expected/scope-0.8.8-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.8-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.9-compact.json b/tests/ast-parsing/expected/scope-0.8.9-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.9-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/struct-0.8.10-compact.json b/tests/ast-parsing/expected/struct-0.8.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/struct-0.8.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/struct-0.8.5-compact.json b/tests/ast-parsing/expected/struct-0.8.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/struct-0.8.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/struct-0.8.6-compact.json b/tests/ast-parsing/expected/struct-0.8.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/struct-0.8.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/struct-0.8.7-compact.json b/tests/ast-parsing/expected/struct-0.8.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/struct-0.8.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/struct-0.8.8-compact.json b/tests/ast-parsing/expected/struct-0.8.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/struct-0.8.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/struct-0.8.9-compact.json b/tests/ast-parsing/expected/struct-0.8.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/struct-0.8.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/throw-0.8.10-compact.json b/tests/ast-parsing/expected/throw-0.8.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/throw-0.8.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/throw-0.8.5-compact.json b/tests/ast-parsing/expected/throw-0.8.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/throw-0.8.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/throw-0.8.6-compact.json b/tests/ast-parsing/expected/throw-0.8.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/throw-0.8.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/throw-0.8.7-compact.json b/tests/ast-parsing/expected/throw-0.8.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/throw-0.8.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/throw-0.8.8-compact.json b/tests/ast-parsing/expected/throw-0.8.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/throw-0.8.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/throw-0.8.9-compact.json b/tests/ast-parsing/expected/throw-0.8.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/throw-0.8.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-0.8.10-compact.json b/tests/ast-parsing/expected/top-level-0.8.10-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/top-level-0.8.10-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-0.8.5-compact.json b/tests/ast-parsing/expected/top-level-0.8.5-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/top-level-0.8.5-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-0.8.6-compact.json b/tests/ast-parsing/expected/top-level-0.8.6-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/top-level-0.8.6-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-0.8.7-compact.json b/tests/ast-parsing/expected/top-level-0.8.7-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/top-level-0.8.7-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-0.8.8-compact.json b/tests/ast-parsing/expected/top-level-0.8.8-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/top-level-0.8.8-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-0.8.9-compact.json b/tests/ast-parsing/expected/top-level-0.8.9-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/top-level-0.8.9-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.7.1-legacy.json b/tests/ast-parsing/expected/top-level-import-0.7.1-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.7.1-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.7.2-legacy.json b/tests/ast-parsing/expected/top-level-import-0.7.2-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.7.2-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.7.3-legacy.json b/tests/ast-parsing/expected/top-level-import-0.7.3-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.7.3-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.7.4-legacy.json b/tests/ast-parsing/expected/top-level-import-0.7.4-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.7.4-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.7.5-legacy.json b/tests/ast-parsing/expected/top-level-import-0.7.5-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.7.5-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.7.6-compact.json b/tests/ast-parsing/expected/top-level-import-0.7.6-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.7.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.7.6-legacy.json b/tests/ast-parsing/expected/top-level-import-0.7.6-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.7.6-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.0-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.0-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.0-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.1-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.1-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.1-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.10-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.10-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.2-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.2-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.2-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.3-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.3-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.3-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.4-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.4-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.4-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.5-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.5-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.6-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.6-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.7-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.7-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.8-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.8-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.9-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.9-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.0-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.0-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.0-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.1-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.1-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.1-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.10-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.10-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.10-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.11-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.11-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.11-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.12-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.12-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.12-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.12-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.13-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.13-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.13-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.13-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.13-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.13-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.14-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.14-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.14-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.14-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.14-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.14-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.15-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.15-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.15-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.15-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.15-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.15-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.16-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.16-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.16-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.16-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.16-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.16-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.17-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.17-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.17-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.17-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.17-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.17-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.18-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.18-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.18-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.18-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.18-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.18-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.19-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.19-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.19-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.19-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.19-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.19-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.2-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.2-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.2-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.20-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.20-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.20-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.20-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.20-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.20-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.21-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.21-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.21-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.21-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.21-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.21-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.22-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.22-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.22-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.22-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.22-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.22-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.23-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.23-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.23-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.23-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.23-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.23-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.24-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.24-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.24-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.24-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.24-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.24-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.25-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.25-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.25-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.25-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.25-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.25-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.26-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.26-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.26-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.26-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.26-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.26-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.3-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.3-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.3-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.4-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.4-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.4-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.5-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.5-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.5-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.6-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.6-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.6-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.7-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.7-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.7-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.8-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.8-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.8-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.4.9-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.4.9-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.4.9-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.0-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.0-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.0-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.0-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.0-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.0-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.1-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.1-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.1-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.1-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.1-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.1-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.10-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.10-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.10-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.10-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.11-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.11-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.11-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.11-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.11-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.11-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.12-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.12-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.12-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.12-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.13-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.13-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.13-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.13-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.13-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.13-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.14-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.14-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.14-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.14-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.14-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.14-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.15-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.15-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.15-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.15-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.15-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.15-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.16-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.16-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.16-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.16-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.16-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.16-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.17-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.17-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.17-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.17-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.17-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.17-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.2-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.2-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.2-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.2-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.2-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.2-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.3-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.3-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.3-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.3-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.3-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.3-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.4-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.4-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.4-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.4-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.4-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.4-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.5-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.5-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.5-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.5-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.6-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.6-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.6-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.6-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.7-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.7-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.7-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.7-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.8-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.8-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.8-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.8-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.9-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.5.9-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.5.9-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.5.9-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.0-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.0-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.0-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.0-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.0-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.0-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.1-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.1-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.1-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.1-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.1-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.1-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.10-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.10-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.10-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.10-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.11-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.11-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.11-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.11-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.11-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.11-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.12-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.12-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.12-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.12-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.2-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.2-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.2-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.2-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.2-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.2-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.3-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.3-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.3-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.3-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.3-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.3-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.4-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.4-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.4-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.4-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.4-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.4-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.5-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.5-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.5-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.5-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.6-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.6-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.6-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.6-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.7-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.7-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.7-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.7-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.8-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.8-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.8-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.8-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.9-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.6.9-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.6.9-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.6.9-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.0-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.0-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.0-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.0-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.0-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.0-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.1-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.1-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.1-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.1-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.1-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.1-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.2-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.2-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.2-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.2-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.2-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.2-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.3-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.3-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.3-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.3-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.3-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.3-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.4-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.4-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.4-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.4-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.4-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.4-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.5-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.5-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.5-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.5-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.5-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.6-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.6-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.7.6-legacy.json b/tests/ast-parsing/expected/top-level-import-bis-0.7.6-legacy.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.7.6-legacy.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.0-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.0-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.0-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.1-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.1-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.1-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.10-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.10-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.2-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.2-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.2-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.3-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.3-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.3-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.4-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.4-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.4-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.5-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.5-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.6-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.6-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.7-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.7-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.8-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.8-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.9-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.9-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/trycatch-0.8.10-compact.json b/tests/ast-parsing/expected/trycatch-0.8.10-compact.json new file mode 100644 index 000000000..6099f6be4 --- /dev/null +++ b/tests/ast-parsing/expected/trycatch-0.8.10-compact.json @@ -0,0 +1,9 @@ +{ + "ERC20": { + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": { + "tryCatchFunctionCall()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: TRY 2\n\"];\n2->3;\n2->5;\n2->7;\n3[label=\"Node Type: CATCH 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->7;\n5[label=\"Node Type: CATCH 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: TRY 7\n\"];\n7->8;\n7->10;\n7->12;\n8[label=\"Node Type: CATCH 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->12;\n10[label=\"Node Type: CATCH 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: TRY 12\n\"];\n12->13;\n12->15;\n12->17;\n12->19;\n13[label=\"Node Type: CATCH 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->19;\n15[label=\"Node Type: CATCH 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->19;\n17[label=\"Node Type: CATCH 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: TRY 19\n\"];\n19->20;\n19->21;\n20[label=\"Node Type: CATCH 20\n\"];\n21[label=\"Node Type: CATCH 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n}\n", + "tryCatchContractDeployment()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: TRY 1\n\"];\n1->2;\n1->6;\n2[label=\"Node Type: CATCH 2\n\"];\n2->3;\n3[label=\"Node Type: TRY 3\n\"];\n3->4;\n3->5;\n4[label=\"Node Type: CATCH 4\n\"];\n5[label=\"Node Type: CATCH 5\n\"];\n6[label=\"Node Type: CATCH 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/trycatch-0.8.5-compact.json b/tests/ast-parsing/expected/trycatch-0.8.5-compact.json new file mode 100644 index 000000000..6099f6be4 --- /dev/null +++ b/tests/ast-parsing/expected/trycatch-0.8.5-compact.json @@ -0,0 +1,9 @@ +{ + "ERC20": { + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": { + "tryCatchFunctionCall()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: TRY 2\n\"];\n2->3;\n2->5;\n2->7;\n3[label=\"Node Type: CATCH 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->7;\n5[label=\"Node Type: CATCH 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: TRY 7\n\"];\n7->8;\n7->10;\n7->12;\n8[label=\"Node Type: CATCH 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->12;\n10[label=\"Node Type: CATCH 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: TRY 12\n\"];\n12->13;\n12->15;\n12->17;\n12->19;\n13[label=\"Node Type: CATCH 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->19;\n15[label=\"Node Type: CATCH 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->19;\n17[label=\"Node Type: CATCH 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: TRY 19\n\"];\n19->20;\n19->21;\n20[label=\"Node Type: CATCH 20\n\"];\n21[label=\"Node Type: CATCH 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n}\n", + "tryCatchContractDeployment()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: TRY 1\n\"];\n1->2;\n1->6;\n2[label=\"Node Type: CATCH 2\n\"];\n2->3;\n3[label=\"Node Type: TRY 3\n\"];\n3->4;\n3->5;\n4[label=\"Node Type: CATCH 4\n\"];\n5[label=\"Node Type: CATCH 5\n\"];\n6[label=\"Node Type: CATCH 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/trycatch-0.8.6-compact.json b/tests/ast-parsing/expected/trycatch-0.8.6-compact.json new file mode 100644 index 000000000..6099f6be4 --- /dev/null +++ b/tests/ast-parsing/expected/trycatch-0.8.6-compact.json @@ -0,0 +1,9 @@ +{ + "ERC20": { + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": { + "tryCatchFunctionCall()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: TRY 2\n\"];\n2->3;\n2->5;\n2->7;\n3[label=\"Node Type: CATCH 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->7;\n5[label=\"Node Type: CATCH 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: TRY 7\n\"];\n7->8;\n7->10;\n7->12;\n8[label=\"Node Type: CATCH 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->12;\n10[label=\"Node Type: CATCH 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: TRY 12\n\"];\n12->13;\n12->15;\n12->17;\n12->19;\n13[label=\"Node Type: CATCH 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->19;\n15[label=\"Node Type: CATCH 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->19;\n17[label=\"Node Type: CATCH 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: TRY 19\n\"];\n19->20;\n19->21;\n20[label=\"Node Type: CATCH 20\n\"];\n21[label=\"Node Type: CATCH 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n}\n", + "tryCatchContractDeployment()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: TRY 1\n\"];\n1->2;\n1->6;\n2[label=\"Node Type: CATCH 2\n\"];\n2->3;\n3[label=\"Node Type: TRY 3\n\"];\n3->4;\n3->5;\n4[label=\"Node Type: CATCH 4\n\"];\n5[label=\"Node Type: CATCH 5\n\"];\n6[label=\"Node Type: CATCH 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/trycatch-0.8.7-compact.json b/tests/ast-parsing/expected/trycatch-0.8.7-compact.json new file mode 100644 index 000000000..6099f6be4 --- /dev/null +++ b/tests/ast-parsing/expected/trycatch-0.8.7-compact.json @@ -0,0 +1,9 @@ +{ + "ERC20": { + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": { + "tryCatchFunctionCall()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: TRY 2\n\"];\n2->3;\n2->5;\n2->7;\n3[label=\"Node Type: CATCH 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->7;\n5[label=\"Node Type: CATCH 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: TRY 7\n\"];\n7->8;\n7->10;\n7->12;\n8[label=\"Node Type: CATCH 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->12;\n10[label=\"Node Type: CATCH 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: TRY 12\n\"];\n12->13;\n12->15;\n12->17;\n12->19;\n13[label=\"Node Type: CATCH 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->19;\n15[label=\"Node Type: CATCH 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->19;\n17[label=\"Node Type: CATCH 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: TRY 19\n\"];\n19->20;\n19->21;\n20[label=\"Node Type: CATCH 20\n\"];\n21[label=\"Node Type: CATCH 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n}\n", + "tryCatchContractDeployment()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: TRY 1\n\"];\n1->2;\n1->6;\n2[label=\"Node Type: CATCH 2\n\"];\n2->3;\n3[label=\"Node Type: TRY 3\n\"];\n3->4;\n3->5;\n4[label=\"Node Type: CATCH 4\n\"];\n5[label=\"Node Type: CATCH 5\n\"];\n6[label=\"Node Type: CATCH 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/trycatch-0.8.8-compact.json b/tests/ast-parsing/expected/trycatch-0.8.8-compact.json new file mode 100644 index 000000000..6099f6be4 --- /dev/null +++ b/tests/ast-parsing/expected/trycatch-0.8.8-compact.json @@ -0,0 +1,9 @@ +{ + "ERC20": { + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": { + "tryCatchFunctionCall()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: TRY 2\n\"];\n2->3;\n2->5;\n2->7;\n3[label=\"Node Type: CATCH 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->7;\n5[label=\"Node Type: CATCH 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: TRY 7\n\"];\n7->8;\n7->10;\n7->12;\n8[label=\"Node Type: CATCH 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->12;\n10[label=\"Node Type: CATCH 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: TRY 12\n\"];\n12->13;\n12->15;\n12->17;\n12->19;\n13[label=\"Node Type: CATCH 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->19;\n15[label=\"Node Type: CATCH 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->19;\n17[label=\"Node Type: CATCH 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: TRY 19\n\"];\n19->20;\n19->21;\n20[label=\"Node Type: CATCH 20\n\"];\n21[label=\"Node Type: CATCH 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n}\n", + "tryCatchContractDeployment()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: TRY 1\n\"];\n1->2;\n1->6;\n2[label=\"Node Type: CATCH 2\n\"];\n2->3;\n3[label=\"Node Type: TRY 3\n\"];\n3->4;\n3->5;\n4[label=\"Node Type: CATCH 4\n\"];\n5[label=\"Node Type: CATCH 5\n\"];\n6[label=\"Node Type: CATCH 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/trycatch-0.8.9-compact.json b/tests/ast-parsing/expected/trycatch-0.8.9-compact.json new file mode 100644 index 000000000..6099f6be4 --- /dev/null +++ b/tests/ast-parsing/expected/trycatch-0.8.9-compact.json @@ -0,0 +1,9 @@ +{ + "ERC20": { + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": { + "tryCatchFunctionCall()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: TRY 2\n\"];\n2->3;\n2->5;\n2->7;\n3[label=\"Node Type: CATCH 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->7;\n5[label=\"Node Type: CATCH 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: TRY 7\n\"];\n7->8;\n7->10;\n7->12;\n8[label=\"Node Type: CATCH 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->12;\n10[label=\"Node Type: CATCH 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: TRY 12\n\"];\n12->13;\n12->15;\n12->17;\n12->19;\n13[label=\"Node Type: CATCH 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->19;\n15[label=\"Node Type: CATCH 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->19;\n17[label=\"Node Type: CATCH 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: TRY 19\n\"];\n19->20;\n19->21;\n20[label=\"Node Type: CATCH 20\n\"];\n21[label=\"Node Type: CATCH 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n}\n", + "tryCatchContractDeployment()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: TRY 1\n\"];\n1->2;\n1->6;\n2[label=\"Node Type: CATCH 2\n\"];\n2->3;\n3[label=\"Node Type: TRY 3\n\"];\n3->4;\n3->5;\n4[label=\"Node Type: CATCH 4\n\"];\n5[label=\"Node Type: CATCH 5\n\"];\n6[label=\"Node Type: CATCH 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/tupleexpression-0.8.10-compact.json b/tests/ast-parsing/expected/tupleexpression-0.8.10-compact.json new file mode 100644 index 000000000..b5912e6b8 --- /dev/null +++ b/tests/ast-parsing/expected/tupleexpression-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/tupleexpression-0.8.5-compact.json b/tests/ast-parsing/expected/tupleexpression-0.8.5-compact.json new file mode 100644 index 000000000..b5912e6b8 --- /dev/null +++ b/tests/ast-parsing/expected/tupleexpression-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/tupleexpression-0.8.6-compact.json b/tests/ast-parsing/expected/tupleexpression-0.8.6-compact.json new file mode 100644 index 000000000..b5912e6b8 --- /dev/null +++ b/tests/ast-parsing/expected/tupleexpression-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/tupleexpression-0.8.7-compact.json b/tests/ast-parsing/expected/tupleexpression-0.8.7-compact.json new file mode 100644 index 000000000..b5912e6b8 --- /dev/null +++ b/tests/ast-parsing/expected/tupleexpression-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/tupleexpression-0.8.8-compact.json b/tests/ast-parsing/expected/tupleexpression-0.8.8-compact.json new file mode 100644 index 000000000..b5912e6b8 --- /dev/null +++ b/tests/ast-parsing/expected/tupleexpression-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/tupleexpression-0.8.9-compact.json b/tests/ast-parsing/expected/tupleexpression-0.8.9-compact.json new file mode 100644 index 000000000..b5912e6b8 --- /dev/null +++ b/tests/ast-parsing/expected/tupleexpression-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unaryexpression-0.8.10-compact.json b/tests/ast-parsing/expected/unaryexpression-0.8.10-compact.json new file mode 100644 index 000000000..f7fcf9203 --- /dev/null +++ b/tests/ast-parsing/expected/unaryexpression-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unaryexpression-0.8.5-compact.json b/tests/ast-parsing/expected/unaryexpression-0.8.5-compact.json new file mode 100644 index 000000000..f7fcf9203 --- /dev/null +++ b/tests/ast-parsing/expected/unaryexpression-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unaryexpression-0.8.6-compact.json b/tests/ast-parsing/expected/unaryexpression-0.8.6-compact.json new file mode 100644 index 000000000..f7fcf9203 --- /dev/null +++ b/tests/ast-parsing/expected/unaryexpression-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unaryexpression-0.8.7-compact.json b/tests/ast-parsing/expected/unaryexpression-0.8.7-compact.json new file mode 100644 index 000000000..f7fcf9203 --- /dev/null +++ b/tests/ast-parsing/expected/unaryexpression-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unaryexpression-0.8.8-compact.json b/tests/ast-parsing/expected/unaryexpression-0.8.8-compact.json new file mode 100644 index 000000000..f7fcf9203 --- /dev/null +++ b/tests/ast-parsing/expected/unaryexpression-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unaryexpression-0.8.9-compact.json b/tests/ast-parsing/expected/unaryexpression-0.8.9-compact.json new file mode 100644 index 000000000..f7fcf9203 --- /dev/null +++ b/tests/ast-parsing/expected/unaryexpression-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.0-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.0-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.0-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.1-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.1-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.1-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.10-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.10-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.10-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.11-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.11-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.11-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.12-compact.json b/tests/ast-parsing/expected/unchecked-0.4.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.12-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.12-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.12-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.13-compact.json b/tests/ast-parsing/expected/unchecked-0.4.13-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.13-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.13-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.13-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.13-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.14-compact.json b/tests/ast-parsing/expected/unchecked-0.4.14-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.14-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.14-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.14-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.14-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.15-compact.json b/tests/ast-parsing/expected/unchecked-0.4.15-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.15-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.15-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.15-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.15-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.16-compact.json b/tests/ast-parsing/expected/unchecked-0.4.16-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.16-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.16-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.16-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.16-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.17-compact.json b/tests/ast-parsing/expected/unchecked-0.4.17-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.17-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.17-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.17-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.17-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.18-compact.json b/tests/ast-parsing/expected/unchecked-0.4.18-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.18-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.18-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.18-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.18-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.19-compact.json b/tests/ast-parsing/expected/unchecked-0.4.19-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.19-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.19-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.19-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.19-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.2-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.2-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.2-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.20-compact.json b/tests/ast-parsing/expected/unchecked-0.4.20-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.20-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.20-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.20-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.20-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.21-compact.json b/tests/ast-parsing/expected/unchecked-0.4.21-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.21-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.21-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.21-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.21-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.22-compact.json b/tests/ast-parsing/expected/unchecked-0.4.22-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.22-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.22-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.22-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.22-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.23-compact.json b/tests/ast-parsing/expected/unchecked-0.4.23-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.23-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.23-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.23-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.23-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.24-compact.json b/tests/ast-parsing/expected/unchecked-0.4.24-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.24-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.24-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.24-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.24-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.25-compact.json b/tests/ast-parsing/expected/unchecked-0.4.25-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.25-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.25-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.25-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.25-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.26-compact.json b/tests/ast-parsing/expected/unchecked-0.4.26-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.26-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.26-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.26-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.26-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.3-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.3-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.3-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.4-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.4-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.4-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.5-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.5-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.5-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.6-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.6-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.6-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.7-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.7-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.7-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.8-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.8-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.8-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.4.9-legacy.json b/tests/ast-parsing/expected/unchecked-0.4.9-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.4.9-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.0-compact.json b/tests/ast-parsing/expected/unchecked-0.5.0-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.0-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.0-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.0-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.0-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.1-compact.json b/tests/ast-parsing/expected/unchecked-0.5.1-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.1-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.1-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.1-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.1-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.10-compact.json b/tests/ast-parsing/expected/unchecked-0.5.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.10-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.10-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.10-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.11-compact.json b/tests/ast-parsing/expected/unchecked-0.5.11-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.11-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.11-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.11-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.11-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.12-compact.json b/tests/ast-parsing/expected/unchecked-0.5.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.12-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.12-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.12-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.13-compact.json b/tests/ast-parsing/expected/unchecked-0.5.13-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.13-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.13-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.13-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.13-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.14-compact.json b/tests/ast-parsing/expected/unchecked-0.5.14-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.14-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.14-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.14-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.14-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.15-compact.json b/tests/ast-parsing/expected/unchecked-0.5.15-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.15-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.15-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.15-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.15-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.16-compact.json b/tests/ast-parsing/expected/unchecked-0.5.16-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.16-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.16-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.16-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.16-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.17-compact.json b/tests/ast-parsing/expected/unchecked-0.5.17-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.17-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.17-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.17-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.17-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.2-compact.json b/tests/ast-parsing/expected/unchecked-0.5.2-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.2-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.2-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.2-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.2-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.3-compact.json b/tests/ast-parsing/expected/unchecked-0.5.3-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.3-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.3-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.3-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.3-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.4-compact.json b/tests/ast-parsing/expected/unchecked-0.5.4-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.4-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.4-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.4-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.4-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.5-compact.json b/tests/ast-parsing/expected/unchecked-0.5.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.5-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.5-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.5-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.6-compact.json b/tests/ast-parsing/expected/unchecked-0.5.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.6-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.6-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.6-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.7-compact.json b/tests/ast-parsing/expected/unchecked-0.5.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.7-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.7-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.7-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.8-compact.json b/tests/ast-parsing/expected/unchecked-0.5.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.8-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.8-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.8-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.9-compact.json b/tests/ast-parsing/expected/unchecked-0.5.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.5.9-legacy.json b/tests/ast-parsing/expected/unchecked-0.5.9-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.5.9-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.0-compact.json b/tests/ast-parsing/expected/unchecked-0.6.0-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.0-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.0-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.0-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.0-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.1-compact.json b/tests/ast-parsing/expected/unchecked-0.6.1-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.1-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.1-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.1-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.1-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.10-compact.json b/tests/ast-parsing/expected/unchecked-0.6.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.10-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.10-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.10-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.11-compact.json b/tests/ast-parsing/expected/unchecked-0.6.11-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.11-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.11-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.11-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.11-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.12-compact.json b/tests/ast-parsing/expected/unchecked-0.6.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.12-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.12-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.12-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.2-compact.json b/tests/ast-parsing/expected/unchecked-0.6.2-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.2-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.2-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.2-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.2-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.3-compact.json b/tests/ast-parsing/expected/unchecked-0.6.3-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.3-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.3-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.3-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.3-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.4-compact.json b/tests/ast-parsing/expected/unchecked-0.6.4-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.4-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.4-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.4-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.4-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.5-compact.json b/tests/ast-parsing/expected/unchecked-0.6.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.5-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.5-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.5-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.6-compact.json b/tests/ast-parsing/expected/unchecked-0.6.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.6-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.6-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.6-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.7-compact.json b/tests/ast-parsing/expected/unchecked-0.6.7-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.7-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.7-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.7-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.7-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.8-compact.json b/tests/ast-parsing/expected/unchecked-0.6.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.8-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.8-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.8-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.9-compact.json b/tests/ast-parsing/expected/unchecked-0.6.9-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.9-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.6.9-legacy.json b/tests/ast-parsing/expected/unchecked-0.6.9-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.6.9-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.0-compact.json b/tests/ast-parsing/expected/unchecked-0.7.0-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.0-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.0-legacy.json b/tests/ast-parsing/expected/unchecked-0.7.0-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.0-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.1-compact.json b/tests/ast-parsing/expected/unchecked-0.7.1-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.1-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.1-legacy.json b/tests/ast-parsing/expected/unchecked-0.7.1-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.1-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.2-compact.json b/tests/ast-parsing/expected/unchecked-0.7.2-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.2-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.2-legacy.json b/tests/ast-parsing/expected/unchecked-0.7.2-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.2-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.3-compact.json b/tests/ast-parsing/expected/unchecked-0.7.3-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.3-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.3-legacy.json b/tests/ast-parsing/expected/unchecked-0.7.3-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.3-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.4-compact.json b/tests/ast-parsing/expected/unchecked-0.7.4-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.4-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.4-legacy.json b/tests/ast-parsing/expected/unchecked-0.7.4-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.4-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.5-compact.json b/tests/ast-parsing/expected/unchecked-0.7.5-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.5-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.5-legacy.json b/tests/ast-parsing/expected/unchecked-0.7.5-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.5-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.6-compact.json b/tests/ast-parsing/expected/unchecked-0.7.6-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.6-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.7.6-legacy.json b/tests/ast-parsing/expected/unchecked-0.7.6-legacy.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.7.6-legacy.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.0-compact.json b/tests/ast-parsing/expected/unchecked-0.8.0-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.0-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.1-compact.json b/tests/ast-parsing/expected/unchecked-0.8.1-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.1-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.10-compact.json b/tests/ast-parsing/expected/unchecked-0.8.10-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.10-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.2-compact.json b/tests/ast-parsing/expected/unchecked-0.8.2-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.2-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.3-compact.json b/tests/ast-parsing/expected/unchecked-0.8.3-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.3-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.4-compact.json b/tests/ast-parsing/expected/unchecked-0.8.4-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.4-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.5-compact.json b/tests/ast-parsing/expected/unchecked-0.8.5-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.5-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.6-compact.json b/tests/ast-parsing/expected/unchecked-0.8.6-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.6-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.7-compact.json b/tests/ast-parsing/expected/unchecked-0.8.7-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.7-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.8-compact.json b/tests/ast-parsing/expected/unchecked-0.8.8-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.8-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.9-compact.json b/tests/ast-parsing/expected/unchecked-0.8.9-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.9-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/using-for-0.8.10-compact.json b/tests/ast-parsing/expected/using-for-0.8.10-compact.json new file mode 100644 index 000000000..27fa7c323 --- /dev/null +++ b/tests/ast-parsing/expected/using-for-0.8.10-compact.json @@ -0,0 +1,9 @@ +{ + "L1": { + "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "L2": { + "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/using-for-0.8.5-compact.json b/tests/ast-parsing/expected/using-for-0.8.5-compact.json new file mode 100644 index 000000000..27fa7c323 --- /dev/null +++ b/tests/ast-parsing/expected/using-for-0.8.5-compact.json @@ -0,0 +1,9 @@ +{ + "L1": { + "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "L2": { + "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/using-for-0.8.6-compact.json b/tests/ast-parsing/expected/using-for-0.8.6-compact.json new file mode 100644 index 000000000..27fa7c323 --- /dev/null +++ b/tests/ast-parsing/expected/using-for-0.8.6-compact.json @@ -0,0 +1,9 @@ +{ + "L1": { + "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "L2": { + "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/using-for-0.8.7-compact.json b/tests/ast-parsing/expected/using-for-0.8.7-compact.json new file mode 100644 index 000000000..27fa7c323 --- /dev/null +++ b/tests/ast-parsing/expected/using-for-0.8.7-compact.json @@ -0,0 +1,9 @@ +{ + "L1": { + "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "L2": { + "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/using-for-0.8.8-compact.json b/tests/ast-parsing/expected/using-for-0.8.8-compact.json new file mode 100644 index 000000000..27fa7c323 --- /dev/null +++ b/tests/ast-parsing/expected/using-for-0.8.8-compact.json @@ -0,0 +1,9 @@ +{ + "L1": { + "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "L2": { + "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/using-for-0.8.9-compact.json b/tests/ast-parsing/expected/using-for-0.8.9-compact.json new file mode 100644 index 000000000..27fa7c323 --- /dev/null +++ b/tests/ast-parsing/expected/using-for-0.8.9-compact.json @@ -0,0 +1,9 @@ +{ + "L1": { + "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "L2": { + "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variable-0.8.10-compact.json b/tests/ast-parsing/expected/variable-0.8.10-compact.json new file mode 100644 index 000000000..97689fda1 --- /dev/null +++ b/tests/ast-parsing/expected/variable-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: NEW VARIABLE 24\n\"];\n24->25;\n25[label=\"Node Type: NEW VARIABLE 25\n\"];\n25->26;\n26[label=\"Node Type: NEW VARIABLE 26\n\"];\n26->27;\n27[label=\"Node Type: NEW VARIABLE 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: NEW VARIABLE 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: NEW VARIABLE 31\n\"];\n31->32;\n32[label=\"Node Type: NEW VARIABLE 32\n\"];\n32->33;\n33[label=\"Node Type: NEW VARIABLE 33\n\"];\n33->34;\n34[label=\"Node Type: NEW VARIABLE 34\n\"];\n34->35;\n35[label=\"Node Type: NEW VARIABLE 35\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variable-0.8.5-compact.json b/tests/ast-parsing/expected/variable-0.8.5-compact.json new file mode 100644 index 000000000..97689fda1 --- /dev/null +++ b/tests/ast-parsing/expected/variable-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: NEW VARIABLE 24\n\"];\n24->25;\n25[label=\"Node Type: NEW VARIABLE 25\n\"];\n25->26;\n26[label=\"Node Type: NEW VARIABLE 26\n\"];\n26->27;\n27[label=\"Node Type: NEW VARIABLE 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: NEW VARIABLE 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: NEW VARIABLE 31\n\"];\n31->32;\n32[label=\"Node Type: NEW VARIABLE 32\n\"];\n32->33;\n33[label=\"Node Type: NEW VARIABLE 33\n\"];\n33->34;\n34[label=\"Node Type: NEW VARIABLE 34\n\"];\n34->35;\n35[label=\"Node Type: NEW VARIABLE 35\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variable-0.8.6-compact.json b/tests/ast-parsing/expected/variable-0.8.6-compact.json new file mode 100644 index 000000000..97689fda1 --- /dev/null +++ b/tests/ast-parsing/expected/variable-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: NEW VARIABLE 24\n\"];\n24->25;\n25[label=\"Node Type: NEW VARIABLE 25\n\"];\n25->26;\n26[label=\"Node Type: NEW VARIABLE 26\n\"];\n26->27;\n27[label=\"Node Type: NEW VARIABLE 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: NEW VARIABLE 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: NEW VARIABLE 31\n\"];\n31->32;\n32[label=\"Node Type: NEW VARIABLE 32\n\"];\n32->33;\n33[label=\"Node Type: NEW VARIABLE 33\n\"];\n33->34;\n34[label=\"Node Type: NEW VARIABLE 34\n\"];\n34->35;\n35[label=\"Node Type: NEW VARIABLE 35\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variable-0.8.7-compact.json b/tests/ast-parsing/expected/variable-0.8.7-compact.json new file mode 100644 index 000000000..97689fda1 --- /dev/null +++ b/tests/ast-parsing/expected/variable-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: NEW VARIABLE 24\n\"];\n24->25;\n25[label=\"Node Type: NEW VARIABLE 25\n\"];\n25->26;\n26[label=\"Node Type: NEW VARIABLE 26\n\"];\n26->27;\n27[label=\"Node Type: NEW VARIABLE 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: NEW VARIABLE 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: NEW VARIABLE 31\n\"];\n31->32;\n32[label=\"Node Type: NEW VARIABLE 32\n\"];\n32->33;\n33[label=\"Node Type: NEW VARIABLE 33\n\"];\n33->34;\n34[label=\"Node Type: NEW VARIABLE 34\n\"];\n34->35;\n35[label=\"Node Type: NEW VARIABLE 35\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variable-0.8.8-compact.json b/tests/ast-parsing/expected/variable-0.8.8-compact.json new file mode 100644 index 000000000..97689fda1 --- /dev/null +++ b/tests/ast-parsing/expected/variable-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: NEW VARIABLE 24\n\"];\n24->25;\n25[label=\"Node Type: NEW VARIABLE 25\n\"];\n25->26;\n26[label=\"Node Type: NEW VARIABLE 26\n\"];\n26->27;\n27[label=\"Node Type: NEW VARIABLE 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: NEW VARIABLE 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: NEW VARIABLE 31\n\"];\n31->32;\n32[label=\"Node Type: NEW VARIABLE 32\n\"];\n32->33;\n33[label=\"Node Type: NEW VARIABLE 33\n\"];\n33->34;\n34[label=\"Node Type: NEW VARIABLE 34\n\"];\n34->35;\n35[label=\"Node Type: NEW VARIABLE 35\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variable-0.8.9-compact.json b/tests/ast-parsing/expected/variable-0.8.9-compact.json new file mode 100644 index 000000000..97689fda1 --- /dev/null +++ b/tests/ast-parsing/expected/variable-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: NEW VARIABLE 24\n\"];\n24->25;\n25[label=\"Node Type: NEW VARIABLE 25\n\"];\n25->26;\n26[label=\"Node Type: NEW VARIABLE 26\n\"];\n26->27;\n27[label=\"Node Type: NEW VARIABLE 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: NEW VARIABLE 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: NEW VARIABLE 31\n\"];\n31->32;\n32[label=\"Node Type: NEW VARIABLE 32\n\"];\n32->33;\n33[label=\"Node Type: NEW VARIABLE 33\n\"];\n33->34;\n34[label=\"Node Type: NEW VARIABLE 34\n\"];\n34->35;\n35[label=\"Node Type: NEW VARIABLE 35\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variabledeclaration-0.8.10-compact.json b/tests/ast-parsing/expected/variabledeclaration-0.8.10-compact.json new file mode 100644 index 000000000..f9182c607 --- /dev/null +++ b/tests/ast-parsing/expected/variabledeclaration-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->12;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n12[label=\"Node Type: IF 12\n\"];\n12->13[label=\"True\"];\n12->14[label=\"False\"];\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->15;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: END_IF 15\n\"];\n15->10;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variabledeclaration-0.8.5-compact.json b/tests/ast-parsing/expected/variabledeclaration-0.8.5-compact.json new file mode 100644 index 000000000..f9182c607 --- /dev/null +++ b/tests/ast-parsing/expected/variabledeclaration-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->12;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n12[label=\"Node Type: IF 12\n\"];\n12->13[label=\"True\"];\n12->14[label=\"False\"];\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->15;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: END_IF 15\n\"];\n15->10;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variabledeclaration-0.8.6-compact.json b/tests/ast-parsing/expected/variabledeclaration-0.8.6-compact.json new file mode 100644 index 000000000..f9182c607 --- /dev/null +++ b/tests/ast-parsing/expected/variabledeclaration-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->12;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n12[label=\"Node Type: IF 12\n\"];\n12->13[label=\"True\"];\n12->14[label=\"False\"];\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->15;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: END_IF 15\n\"];\n15->10;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variabledeclaration-0.8.7-compact.json b/tests/ast-parsing/expected/variabledeclaration-0.8.7-compact.json new file mode 100644 index 000000000..f9182c607 --- /dev/null +++ b/tests/ast-parsing/expected/variabledeclaration-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->12;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n12[label=\"Node Type: IF 12\n\"];\n12->13[label=\"True\"];\n12->14[label=\"False\"];\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->15;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: END_IF 15\n\"];\n15->10;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variabledeclaration-0.8.8-compact.json b/tests/ast-parsing/expected/variabledeclaration-0.8.8-compact.json new file mode 100644 index 000000000..f9182c607 --- /dev/null +++ b/tests/ast-parsing/expected/variabledeclaration-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->12;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n12[label=\"Node Type: IF 12\n\"];\n12->13[label=\"True\"];\n12->14[label=\"False\"];\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->15;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: END_IF 15\n\"];\n15->10;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variabledeclaration-0.8.9-compact.json b/tests/ast-parsing/expected/variabledeclaration-0.8.9-compact.json new file mode 100644 index 000000000..f9182c607 --- /dev/null +++ b/tests/ast-parsing/expected/variabledeclaration-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->12;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n12[label=\"Node Type: IF 12\n\"];\n12->13[label=\"True\"];\n12->14[label=\"False\"];\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->15;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: END_IF 15\n\"];\n15->10;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/while-0.8.10-compact.json b/tests/ast-parsing/expected/while-0.8.10-compact.json new file mode 100644 index 000000000..4d9657391 --- /dev/null +++ b/tests/ast-parsing/expected/while-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/while-0.8.5-compact.json b/tests/ast-parsing/expected/while-0.8.5-compact.json new file mode 100644 index 000000000..4d9657391 --- /dev/null +++ b/tests/ast-parsing/expected/while-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/while-0.8.6-compact.json b/tests/ast-parsing/expected/while-0.8.6-compact.json new file mode 100644 index 000000000..4d9657391 --- /dev/null +++ b/tests/ast-parsing/expected/while-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/while-0.8.7-compact.json b/tests/ast-parsing/expected/while-0.8.7-compact.json new file mode 100644 index 000000000..4d9657391 --- /dev/null +++ b/tests/ast-parsing/expected/while-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/while-0.8.8-compact.json b/tests/ast-parsing/expected/while-0.8.8-compact.json new file mode 100644 index 000000000..4d9657391 --- /dev/null +++ b/tests/ast-parsing/expected/while-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/while-0.8.9-compact.json b/tests/ast-parsing/expected/while-0.8.9-compact.json new file mode 100644 index 000000000..4d9657391 --- /dev/null +++ b/tests/ast-parsing/expected/while-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.0-compact.json b/tests/ast-parsing/expected/yul-0.8.0-compact.json index 04cb49aa8..c7716d2db 100644 --- a/tests/ast-parsing/expected/yul-0.8.0-compact.json +++ b/tests/ast-parsing/expected/yul-0.8.0-compact.json @@ -1,6 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.1-compact.json b/tests/ast-parsing/expected/yul-0.8.1-compact.json index 04cb49aa8..c7716d2db 100644 --- a/tests/ast-parsing/expected/yul-0.8.1-compact.json +++ b/tests/ast-parsing/expected/yul-0.8.1-compact.json @@ -1,6 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.10-compact.json b/tests/ast-parsing/expected/yul-0.8.10-compact.json new file mode 100644 index 000000000..c7716d2db --- /dev/null +++ b/tests/ast-parsing/expected/yul-0.8.10-compact.json @@ -0,0 +1,7 @@ +{ + "L": {}, + "C": { + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.2-compact.json b/tests/ast-parsing/expected/yul-0.8.2-compact.json index 04cb49aa8..c7716d2db 100644 --- a/tests/ast-parsing/expected/yul-0.8.2-compact.json +++ b/tests/ast-parsing/expected/yul-0.8.2-compact.json @@ -1,6 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.3-compact.json b/tests/ast-parsing/expected/yul-0.8.3-compact.json index 04cb49aa8..c7716d2db 100644 --- a/tests/ast-parsing/expected/yul-0.8.3-compact.json +++ b/tests/ast-parsing/expected/yul-0.8.3-compact.json @@ -1,6 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.4-compact.json b/tests/ast-parsing/expected/yul-0.8.4-compact.json index 04cb49aa8..c7716d2db 100644 --- a/tests/ast-parsing/expected/yul-0.8.4-compact.json +++ b/tests/ast-parsing/expected/yul-0.8.4-compact.json @@ -1,6 +1,7 @@ { "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n" + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.5-compact.json b/tests/ast-parsing/expected/yul-0.8.5-compact.json new file mode 100644 index 000000000..c7716d2db --- /dev/null +++ b/tests/ast-parsing/expected/yul-0.8.5-compact.json @@ -0,0 +1,7 @@ +{ + "L": {}, + "C": { + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.6-compact.json b/tests/ast-parsing/expected/yul-0.8.6-compact.json new file mode 100644 index 000000000..c7716d2db --- /dev/null +++ b/tests/ast-parsing/expected/yul-0.8.6-compact.json @@ -0,0 +1,7 @@ +{ + "L": {}, + "C": { + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.7-compact.json b/tests/ast-parsing/expected/yul-0.8.7-compact.json new file mode 100644 index 000000000..c7716d2db --- /dev/null +++ b/tests/ast-parsing/expected/yul-0.8.7-compact.json @@ -0,0 +1,7 @@ +{ + "L": {}, + "C": { + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.8-compact.json b/tests/ast-parsing/expected/yul-0.8.8-compact.json new file mode 100644 index 000000000..c7716d2db --- /dev/null +++ b/tests/ast-parsing/expected/yul-0.8.8-compact.json @@ -0,0 +1,7 @@ +{ + "L": {}, + "C": { + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.9-compact.json b/tests/ast-parsing/expected/yul-0.8.9-compact.json new file mode 100644 index 000000000..c7716d2db --- /dev/null +++ b/tests/ast-parsing/expected/yul-0.8.9-compact.json @@ -0,0 +1,7 @@ +{ + "L": {}, + "C": { + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/yul-0.8.0.sol b/tests/ast-parsing/yul-0.8.0.sol new file mode 100644 index 000000000..38f7a7e09 --- /dev/null +++ b/tests/ast-parsing/yul-0.8.0.sol @@ -0,0 +1,69 @@ +library L { + +} + +contract C { + uint storA; + uint[] storB; + bool storC; + + function f(uint paramA, uint[] memory paramB) public returns (uint retA, uint[] memory retB) { + uint localA; + uint[] memory localB; + + assembly { + let aStorA := sload(storA.slot) + let aParamA := paramA + let aRetA := retA + let aLocalA := localA + + sstore(storA.slot, 0) + paramA := 0 + retA := 0 + localA := 0 + + let aStorB := sload(storB.slot) + let aParamB := mload(paramB) + let aRetB := mload(retB) + let aLocalB := mload(localB) + + sstore(storB.slot, 0) + mstore(paramB, 0) + mstore(retB, 0) + mstore(localB, 0) + + let aStoreC := mul(sload(storC.slot), storC.offset) + + // let libAddr := L // Not supported for now + } + } + + + struct St{ + uint a; + } + + function f() internal returns(St storage st){ + assembly{ + st.slot := 0x0000000000000000000000000000000000000000000000000000000000000000 + } + } + +} + +// function from https://docs.soliditylang.org/en/v0.8.0/assembly.html +function at(address _addr) view returns (bytes memory o_code) { + assembly { + // retrieve the size of the code, this needs assembly + let size := extcodesize(_addr) + // allocate output byte array - this could also be done without assembly + // by using o_code = new bytes(size) + o_code := mload(0x40) + // new "memory end" including padding + mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f)))) + // store length in memory + mstore(o_code, size) + // actually retrieve the code, this needs assembly + extcodecopy(_addr, add(o_code, 0x20), 0, size) + } +} diff --git a/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol b/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol index a2ab6ecff..6158b3a7e 100644 --- a/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol +++ b/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol @@ -1,8 +1,23 @@ -contract CallInLoop{ +contract CallInLoopBase { + + address[] destinations_base; + + constructor(address[] newDestinations) public { + destinations_base = newDestinations; + } + + function bad_base() external{ + for (uint i=0; i < destinations_base.length; i++){ + destinations_base[i].transfer(i); + } + } +} + +contract CallInLoop is CallInLoopBase{ address[] destinations; - constructor(address[] newDestinations) public{ + constructor(address[] newDestinations) CallInLoopBase(newDestinations) public{ destinations = newDestinations; } @@ -12,4 +27,23 @@ contract CallInLoop{ } } + function bad2() external { + for (uint i=0; i < destinations.length; i++){ + for (uint j=0; j < destinations.length; j++){ + // Do something + } + destinations[i].transfer(i); + } + } + + function bad3() external { + for (uint i=0; i < destinations.length; i++){ + bad3_internal(destinations[i], i); + } + } + + function bad3_internal(address a, uint i) internal { + a.transfer(i); + } + } diff --git a/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json index 24d076b50..65ca6e8cc 100644 --- a/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json @@ -4,10 +4,10 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 153, - "length": 135, + "start": 173, + "length": 150, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -26,10 +26,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { "start": 0, - "length": 291, + "length": 325, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -49,22 +49,21 @@ 11, 12, 13, - 14, - 15 + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } }, { "type": "node", - "name": "destinations[i].transfer(i)", + "name": "destinations_base[i].transfer(i)", "source_mapping": { - "start": 244, - "length": 27, + "start": 274, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -74,15 +73,15 @@ 11 ], "starting_column": 13, - "ending_column": 40 + "ending_column": 45 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 153, - "length": 135, + "start": 173, + "length": 150, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -101,10 +100,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { "start": 0, - "length": 291, + "length": 325, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -124,23 +123,573 @@ 11, 12, 13, - 14, - 15 + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } } } } ], - "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: destinations[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [destinations[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L11)\n", + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: destinations_base[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [destinations_base[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L11)\n", "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13", - "id": "997dd7de40b82c6ac8e98324329bd99f827ed067c22d5b508b2e56c87ad49c0a", + "id": "66e6cb3d36ce6385ebe80eb42e75cfcc0be03eee32eb49b287c75258de7433f6", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 530, + "length": 135, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 327, + "length": 831, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad()" + } + }, + { + "type": "node", + "name": "destinations[i].transfer(i)", + "source_mapping": { + "start": 621, + "length": 27, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 26 + ], + "starting_column": 13, + "ending_column": 40 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 530, + "length": 135, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 327, + "length": 831, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad()" + } + } + } + } + ], + "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: destinations[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#26)\n", + "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [destinations[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L26)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L24-L28", + "id": "257715445371826f92add7e2202ff42cb445394069844c805c9bd7c46d0e0c78", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 671, + "length": 245, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 327, + "length": 831, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "destinations[i].transfer(i)", + "source_mapping": { + "start": 872, + "length": 27, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 35 + ], + "starting_column": 13, + "ending_column": 40 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 671, + "length": 245, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 327, + "length": 831, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: destinations[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [destinations[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37", + "id": "bcf4888be2bdca9c6e3794ed50d3a0c4cbffe97f6cafdd8c9f6b2a940f92330d", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1074, + "length": 81, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 45, + 46, + 47 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 327, + "length": 831, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal(address,uint256)" + } + }, + { + "type": "node", + "name": "a.transfer(i)", + "source_mapping": { + "start": 1135, + "length": 13, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 46 + ], + "starting_column": 9, + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1074, + "length": 81, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 45, + 46, + 47 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 327, + "length": 831, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal(address,uint256)" + } + } + } + } + ], + "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: a.transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#46)\n", + "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [a.transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L46)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47", + "id": "29874ab93647beebd98e69e6e02bfb9e8d07d22d82990b77e1e33ea9d64caddc", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol b/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol index ba79a4e6a..293a6e048 100644 --- a/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol +++ b/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol @@ -1,8 +1,23 @@ -contract CallInLoop{ +contract CallInLoopBase { + + address[] destinations_base; + + constructor(address[] memory newDestinations) public { + destinations_base = newDestinations; + } + + function bad_base() external{ + for (uint i=0; i < destinations_base.length; i++){ + address(uint160(destinations_base[i])).transfer(i); + } + } +} + +contract CallInLoop is CallInLoopBase{ address[] destinations; - constructor(address[] memory newDestinations) public{ + constructor(address[] memory newDestinations) CallInLoopBase(newDestinations) public{ destinations = newDestinations; } @@ -12,4 +27,23 @@ contract CallInLoop{ } } + function bad2() external { + for (uint i=0; i < destinations.length; i++){ + for (uint j=0; j < destinations.length; j++){ + // Do something + } + address(uint160(destinations[i])).transfer(i); + } + } + + function bad3() external { + for (uint i=0; i < destinations.length; i++){ + bad3_internal(destinations[i], i); + } + } + + function bad3_internal(address a, uint i) internal { + address(uint160(a)).transfer(i); + } + } diff --git a/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json index 1fd0288f2..db0e5ff93 100644 --- a/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json @@ -4,10 +4,10 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 160, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -26,10 +26,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { "start": 0, - "length": 316, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -49,22 +49,21 @@ 11, 12, 13, - 14, - 15 + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } }, { "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", + "name": "address(uint160(destinations_base[i])).transfer(i)", "source_mapping": { - "start": 251, - "length": 45, + "start": 281, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -74,15 +73,15 @@ 11 ], "starting_column": 13, - "ending_column": 58 + "ending_column": 63 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 160, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -101,10 +100,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { "start": 0, - "length": 316, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -124,23 +123,573 @@ 11, 12, 13, - 14, - 15 + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } } } } ], - "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L11)\n", + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L11)\n", "first_markdown_element": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L9-L13", - "id": "47b82a76ee810d93f014f425eefea8adbb806036dfee401a9883b1aa3ca85c44", + "id": "5d659f8e891bf51f3542d3726e0d26bd7e5c23a48baba9356b6204fda561eb77", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 562, + "length": 153, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad()" + } + }, + { + "type": "node", + "name": "address(uint160(destinations[i])).transfer(i)", + "source_mapping": { + "start": 653, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 26 + ], + "starting_column": 13, + "ending_column": 58 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 562, + "length": 153, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad()" + } + } + } + } + ], + "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#26)\n", + "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L26)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L24-L28", + "id": "6cced5074b9c311682f603c75163ced753ba6a4ecca39cf4d565eef3f05b30f8", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "address(uint160(destinations[i])).transfer(i)", + "source_mapping": { + "start": 922, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 35 + ], + "starting_column": 13, + "ending_column": 58 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37", + "id": "25c86080b32e786ebc200a68d29ce99aac3f426760b120f9bd359930a78e1e31", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1142, + "length": 99, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 45, + 46, + 47 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal(address,uint256)" + } + }, + { + "type": "node", + "name": "address(uint160(a)).transfer(i)", + "source_mapping": { + "start": 1203, + "length": 31, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 46 + ], + "starting_column": 9, + "ending_column": 40 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1142, + "length": 99, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 45, + 46, + 47 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal(address,uint256)" + } + } + } + } + ], + "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: address(uint160(a)).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#46)\n", + "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [address(uint160(a)).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L46)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L45-L47", + "id": "a1df0d2cf47c14477c09214cc502b7706bf41258ef6f47452fa80dc24dea5647", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol b/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol index ba79a4e6a..293a6e048 100644 --- a/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol +++ b/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol @@ -1,8 +1,23 @@ -contract CallInLoop{ +contract CallInLoopBase { + + address[] destinations_base; + + constructor(address[] memory newDestinations) public { + destinations_base = newDestinations; + } + + function bad_base() external{ + for (uint i=0; i < destinations_base.length; i++){ + address(uint160(destinations_base[i])).transfer(i); + } + } +} + +contract CallInLoop is CallInLoopBase{ address[] destinations; - constructor(address[] memory newDestinations) public{ + constructor(address[] memory newDestinations) CallInLoopBase(newDestinations) public{ destinations = newDestinations; } @@ -12,4 +27,23 @@ contract CallInLoop{ } } + function bad2() external { + for (uint i=0; i < destinations.length; i++){ + for (uint j=0; j < destinations.length; j++){ + // Do something + } + address(uint160(destinations[i])).transfer(i); + } + } + + function bad3() external { + for (uint i=0; i < destinations.length; i++){ + bad3_internal(destinations[i], i); + } + } + + function bad3_internal(address a, uint i) internal { + address(uint160(a)).transfer(i); + } + } diff --git a/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json index 4e078cabd..adc2eed6c 100644 --- a/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json @@ -4,10 +4,10 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 160, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -26,10 +26,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { "start": 0, - "length": 316, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -49,22 +49,21 @@ 11, 12, 13, - 14, - 15 + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } }, { "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", + "name": "address(uint160(destinations_base[i])).transfer(i)", "source_mapping": { - "start": 251, - "length": 45, + "start": 281, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -74,15 +73,15 @@ 11 ], "starting_column": 13, - "ending_column": 58 + "ending_column": 63 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 160, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -101,10 +100,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { "start": 0, - "length": 316, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -124,23 +123,573 @@ 11, 12, 13, - 14, - 15 + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } } } } ], - "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L11)\n", + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L11)\n", "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13", - "id": "f7fa2b373fe4eb9207d3ed267d99d7ca34ec7d786898816bc113c3e20079a411", + "id": "676f5509699708442e5b513a2250f8e0e64781b139d2eafd86273c17528a16ce", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 562, + "length": 153, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad()" + } + }, + { + "type": "node", + "name": "address(uint160(destinations[i])).transfer(i)", + "source_mapping": { + "start": 653, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 26 + ], + "starting_column": 13, + "ending_column": 58 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 562, + "length": 153, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad()" + } + } + } + } + ], + "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#26)\n", + "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L26)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L24-L28", + "id": "5aef9fe610ef0caca726874226906ac1246d969d2d8ed6cde33e09601d0c7117", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "address(uint160(destinations[i])).transfer(i)", + "source_mapping": { + "start": 922, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 35 + ], + "starting_column": 13, + "ending_column": 58 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37", + "id": "3b1948778e97667e6e749205edf70beeac8b8db364e68da43900136e2e7f4c8b", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1142, + "length": 99, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 45, + 46, + 47 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal(address,uint256)" + } + }, + { + "type": "node", + "name": "address(uint160(a)).transfer(i)", + "source_mapping": { + "start": 1203, + "length": 31, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 46 + ], + "starting_column": 9, + "ending_column": 40 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1142, + "length": 99, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 45, + 46, + 47 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal(address,uint256)" + } + } + } + } + ], + "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: address(uint160(a)).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#46)\n", + "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [address(uint160(a)).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L46)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L45-L47", + "id": "cc16e95c30a63cb84d8ed1c59e3cc1fd338d861e8c8a2973764e017df3c2f38f", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol b/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol index ba79a4e6a..293a6e048 100644 --- a/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol +++ b/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol @@ -1,8 +1,23 @@ -contract CallInLoop{ +contract CallInLoopBase { + + address[] destinations_base; + + constructor(address[] memory newDestinations) public { + destinations_base = newDestinations; + } + + function bad_base() external{ + for (uint i=0; i < destinations_base.length; i++){ + address(uint160(destinations_base[i])).transfer(i); + } + } +} + +contract CallInLoop is CallInLoopBase{ address[] destinations; - constructor(address[] memory newDestinations) public{ + constructor(address[] memory newDestinations) CallInLoopBase(newDestinations) public{ destinations = newDestinations; } @@ -12,4 +27,23 @@ contract CallInLoop{ } } + function bad2() external { + for (uint i=0; i < destinations.length; i++){ + for (uint j=0; j < destinations.length; j++){ + // Do something + } + address(uint160(destinations[i])).transfer(i); + } + } + + function bad3() external { + for (uint i=0; i < destinations.length; i++){ + bad3_internal(destinations[i], i); + } + } + + function bad3_internal(address a, uint i) internal { + address(uint160(a)).transfer(i); + } + } diff --git a/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json index 67c6e36ac..ec02650f1 100644 --- a/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json @@ -4,10 +4,10 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 160, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -26,10 +26,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { "start": 0, - "length": 316, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -49,22 +49,21 @@ 11, 12, 13, - 14, - 15 + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } }, { "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", + "name": "address(uint160(destinations_base[i])).transfer(i)", "source_mapping": { - "start": 251, - "length": 45, + "start": 281, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -74,15 +73,15 @@ 11 ], "starting_column": 13, - "ending_column": 58 + "ending_column": 63 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 160, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -101,10 +100,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { "start": 0, - "length": 316, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", @@ -124,23 +123,573 @@ 11, 12, 13, - 14, - 15 + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } } } } ], - "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L11)\n", + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L11)\n", "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13", - "id": "c06ed4f7f79cddc5fbc2f828500766cab0a6d18b262a0f8e9c227cef7e6607df", + "id": "2cb70798cc39fa47453799bd93bf9275930f21bcbfb2746e57cf2b77700b8cd8", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 562, + "length": 153, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad()" + } + }, + { + "type": "node", + "name": "address(uint160(destinations[i])).transfer(i)", + "source_mapping": { + "start": 653, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 26 + ], + "starting_column": 13, + "ending_column": 58 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 562, + "length": 153, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad()" + } + } + } + } + ], + "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#26)\n", + "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L26)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28", + "id": "f11a3c532d51a71adce3b5df738ce354d0a70ea3be928459582028cb72b5fdbd", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "address(uint160(destinations[i])).transfer(i)", + "source_mapping": { + "start": 922, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 35 + ], + "starting_column": 13, + "ending_column": 58 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L30-L37", + "id": "3a39574e82d2f7f3b099bb034e0ff24b44e59a22109608d09a9ff3316409b1d2", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1142, + "length": 99, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 45, + 46, + 47 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal(address,uint256)" + } + }, + { + "type": "node", + "name": "address(uint160(a)).transfer(i)", + "source_mapping": { + "start": 1203, + "length": 31, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 46 + ], + "starting_column": 9, + "ending_column": 40 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1142, + "length": 99, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 45, + 46, + 47 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal(address,uint256)" + } + } + } + } + ], + "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: address(uint160(a)).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#46)\n", + "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [address(uint160(a)).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L46)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47", + "id": "2834a80b6dbcd04a8c58bd803038e5f03936c886067d1ee39d0a31d0bb9e88ae", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol b/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol index 64bc368e8..0b9eed158 100644 --- a/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol +++ b/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol @@ -1,9 +1,19 @@ -pragma solidity ^0.4.24; +contract CostlyOperationsInLoopBase{ + uint loop_count_base = 100; + uint state_variable_base = 0; -contract CostlyOperationsInLoop{ + function bad_base() external { + for (uint i=0; i < loop_count_base; i++){ + state_variable_base++; + } + } + +} + +contract CostlyOperationsInLoop is CostlyOperationsInLoopBase{ uint loop_count = 100; - uint state_variable=0; + uint state_variable = 0; mapping (uint=>uint) map; uint[100] arr; @@ -13,13 +23,32 @@ contract CostlyOperationsInLoop{ } } - function ignore_for_now1() external { + function bad2() external{ + for (uint i=0; i < loop_count; i++){ + for (uint j=0; j < loop_count; j++){ + // Do something + } + state_variable++; + } + } + + function bad3() external{ + for (uint i=0; i < loop_count; i++){ + bad3_internal(); + } + } + + function bad3_internal() internal{ + state_variable++; + } + + function ignore_for_now1() external{ for (uint i=0; i < 100; i++){ map[i] = i+1; } } - function ignore_for_now2() external { + function ignore_for_now2() external{ for (uint i=0; i < 100; i++){ arr[i] = i+1; } diff --git a/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json index caf160443..c7852dff3 100644 --- a/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json @@ -4,21 +4,21 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 252, - "length": 373, + "start": 102, + "length": 389, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 3, "ending_column": 4 @@ -26,16 +26,18 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CostlyOperationsInLoop", + "name": "CostlyOperationsInLoopBase", "source_mapping": { - "start": 26, - "length": 1081, + "start": 0, + "length": 494, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ + 1, + 2, 3, 4, 5, @@ -44,8 +46,133 @@ 8, 9, 10, - 11, - 12, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "a5134568bf722ac31d7c4d41595c23e1a5ff9b79902e9502f78ccfe9a430b87a", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 754, + "length": 373, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ 13, 14, 15, @@ -68,7 +195,36 @@ 32, 33, 34, - 35 + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 1, "ending_column": 2 @@ -81,7 +237,7 @@ "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 410, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", @@ -89,7 +245,7 @@ "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 12 + 22 ], "starting_column": 7, "ending_column": 23 @@ -99,7 +255,7 @@ "type": "function", "name": "bad", "source_mapping": { - "start": 252, + "start": 754, "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", @@ -107,11 +263,11 @@ "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -121,24 +277,14 @@ "type": "contract", "name": "CostlyOperationsInLoop", "source_mapping": { - "start": 26, - "length": 1081, + "start": 496, + "length": 1899, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, 13, 14, 15, @@ -161,7 +307,36 @@ 32, 33, 34, - 35 + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 1, "ending_column": 2 @@ -173,10 +348,450 @@ } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#10-14) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#12)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L10-L14) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L12)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L10-L14", - "id": "d00641f4d08f61911f58d8c73e60ce3f655d045c8f6207b7fdf91a029fd14962", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "92dbac16da1c357bad3a24661de0e92213ac3a701d80655fadb64359ff98d21d", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 1131, + "length": 343, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "state_variable ++", + "source_mapping": { + "start": 1363, + "length": 16, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 31 + ], + "starting_column": 7, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 1131, + "length": 343, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "0cde1ae7c1410e0eb0d07ff2c21adc20b1c7f7a654780c8d41069ad3a34e73b4", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1855, + "length": 60, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal()" + } + }, + { + "type": "node", + "name": "state_variable ++", + "source_mapping": { + "start": 1894, + "length": 16, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 42 + ], + "starting_column": 5, + "ending_column": 21 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1855, + "length": 60, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal()" + } + } + } + } + ], + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "d92f330b3f0aafe1dd0a8c4d79935664297b8d73741df8970e132423d20a1c08", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol b/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol index 514b60fb3..0b9eed158 100644 --- a/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol +++ b/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol @@ -1,9 +1,19 @@ -// pragma solidity ^0.4.24; +contract CostlyOperationsInLoopBase{ + uint loop_count_base = 100; + uint state_variable_base = 0; -contract CostlyOperationsInLoop{ + function bad_base() external { + for (uint i=0; i < loop_count_base; i++){ + state_variable_base++; + } + } + +} + +contract CostlyOperationsInLoop is CostlyOperationsInLoopBase{ uint loop_count = 100; - uint state_variable=0; + uint state_variable = 0; mapping (uint=>uint) map; uint[100] arr; @@ -13,13 +23,32 @@ contract CostlyOperationsInLoop{ } } - function ignore_for_now1() external { + function bad2() external{ + for (uint i=0; i < loop_count; i++){ + for (uint j=0; j < loop_count; j++){ + // Do something + } + state_variable++; + } + } + + function bad3() external{ + for (uint i=0; i < loop_count; i++){ + bad3_internal(); + } + } + + function bad3_internal() internal{ + state_variable++; + } + + function ignore_for_now1() external{ for (uint i=0; i < 100; i++){ map[i] = i+1; } } - function ignore_for_now2() external { + function ignore_for_now2() external{ for (uint i=0; i < 100; i++){ arr[i] = i+1; } diff --git a/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json index 952b023a4..43b104933 100644 --- a/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json @@ -4,21 +4,21 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 255, - "length": 373, + "start": 102, + "length": 389, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 3, "ending_column": 4 @@ -26,16 +26,18 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CostlyOperationsInLoop", + "name": "CostlyOperationsInLoopBase", "source_mapping": { - "start": 29, - "length": 1081, + "start": 0, + "length": 494, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ + 1, + 2, 3, 4, 5, @@ -44,8 +46,133 @@ 8, 9, 10, - 11, - 12, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "37bb0ca67ffcfb1625ffbea095bba93ea031ed6f483bb80a976c7c68309872dd", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 754, + "length": 373, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ 13, 14, 15, @@ -68,7 +195,36 @@ 32, 33, 34, - 35 + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 1, "ending_column": 2 @@ -81,7 +237,7 @@ "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 413, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", @@ -89,7 +245,7 @@ "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 12 + 22 ], "starting_column": 7, "ending_column": 23 @@ -99,7 +255,7 @@ "type": "function", "name": "bad", "source_mapping": { - "start": 255, + "start": 754, "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", @@ -107,11 +263,11 @@ "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -121,24 +277,14 @@ "type": "contract", "name": "CostlyOperationsInLoop", "source_mapping": { - "start": 29, - "length": 1081, + "start": 496, + "length": 1899, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, 13, 14, 15, @@ -161,7 +307,36 @@ 32, 33, 34, - 35 + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 1, "ending_column": 2 @@ -173,10 +348,450 @@ } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#10-14) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#12)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L10-L14) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L12)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L10-L14", - "id": "1496f0664c18be47e9b27df825eb148e11f5458abbe2c0b8758c0645a220d802", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "94a7ffd0d3ada78ae8ace1304b276d677415a08dcdff51fc05889122e14633da", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 1131, + "length": 343, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "state_variable ++", + "source_mapping": { + "start": 1363, + "length": 16, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 31 + ], + "starting_column": 7, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 1131, + "length": 343, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "c0c91898e5b5af12af49b6aefdc4790190101774bffad8e446ba9c857ff86525", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1855, + "length": 60, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal()" + } + }, + { + "type": "node", + "name": "state_variable ++", + "source_mapping": { + "start": 1894, + "length": 16, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 42 + ], + "starting_column": 5, + "ending_column": 21 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1855, + "length": 60, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal()" + } + } + } + } + ], + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "6ebf2ecedb330a477079a9b72f1ba6ffc5717e08017f700538ec42d3eeab355b", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol b/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol index 514b60fb3..0b9eed158 100644 --- a/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol +++ b/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol @@ -1,9 +1,19 @@ -// pragma solidity ^0.4.24; +contract CostlyOperationsInLoopBase{ + uint loop_count_base = 100; + uint state_variable_base = 0; -contract CostlyOperationsInLoop{ + function bad_base() external { + for (uint i=0; i < loop_count_base; i++){ + state_variable_base++; + } + } + +} + +contract CostlyOperationsInLoop is CostlyOperationsInLoopBase{ uint loop_count = 100; - uint state_variable=0; + uint state_variable = 0; mapping (uint=>uint) map; uint[100] arr; @@ -13,13 +23,32 @@ contract CostlyOperationsInLoop{ } } - function ignore_for_now1() external { + function bad2() external{ + for (uint i=0; i < loop_count; i++){ + for (uint j=0; j < loop_count; j++){ + // Do something + } + state_variable++; + } + } + + function bad3() external{ + for (uint i=0; i < loop_count; i++){ + bad3_internal(); + } + } + + function bad3_internal() internal{ + state_variable++; + } + + function ignore_for_now1() external{ for (uint i=0; i < 100; i++){ map[i] = i+1; } } - function ignore_for_now2() external { + function ignore_for_now2() external{ for (uint i=0; i < 100; i++){ arr[i] = i+1; } diff --git a/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json index 98c3f559a..a24d3b9c5 100644 --- a/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json @@ -4,21 +4,21 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 255, - "length": 373, + "start": 102, + "length": 389, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 3, "ending_column": 4 @@ -26,16 +26,18 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CostlyOperationsInLoop", + "name": "CostlyOperationsInLoopBase", "source_mapping": { - "start": 29, - "length": 1081, + "start": 0, + "length": 494, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ + 1, + 2, 3, 4, 5, @@ -44,8 +46,133 @@ 8, 9, 10, - 11, - 12, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "53602b905c8ae68d5325f0c11263f1c9b905406799ec70ca13638f4b1094c37f", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 754, + "length": 373, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ 13, 14, 15, @@ -68,7 +195,36 @@ 32, 33, 34, - 35 + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 1, "ending_column": 2 @@ -81,7 +237,7 @@ "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 413, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", @@ -89,7 +245,7 @@ "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 12 + 22 ], "starting_column": 7, "ending_column": 23 @@ -99,7 +255,7 @@ "type": "function", "name": "bad", "source_mapping": { - "start": 255, + "start": 754, "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", @@ -107,11 +263,11 @@ "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -121,24 +277,14 @@ "type": "contract", "name": "CostlyOperationsInLoop", "source_mapping": { - "start": 29, - "length": 1081, + "start": 496, + "length": 1899, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, 13, 14, 15, @@ -161,7 +307,36 @@ 32, 33, 34, - 35 + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 1, "ending_column": 2 @@ -173,10 +348,450 @@ } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#10-14) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#12)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L10-L14) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L12)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L10-L14", - "id": "aad1cf92bc7ec06342b0fa39a1affa4e06b09bdb3b0c8fae61aeb4221236041a", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "a4f559a14007167a13506a3c865345fb2c050b8d2c660804cc5e301db553822a", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 1131, + "length": 343, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "state_variable ++", + "source_mapping": { + "start": 1363, + "length": 16, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 31 + ], + "starting_column": 7, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 1131, + "length": 343, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "3a1b0ff0bee83dfad403a074eb81c6d845c5da8e99e98433004ba72c1b2c624c", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1855, + "length": 60, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal()" + } + }, + { + "type": "node", + "name": "state_variable ++", + "source_mapping": { + "start": 1894, + "length": 16, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 42 + ], + "starting_column": 5, + "ending_column": 21 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1855, + "length": 60, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal()" + } + } + } + } + ], + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "4bb89ccd252e2233f67cccaf8b40354da7edcb7c5b36df1edfeab0cafed05b74", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol b/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol index 514b60fb3..0b9eed158 100644 --- a/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol +++ b/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol @@ -1,9 +1,19 @@ -// pragma solidity ^0.4.24; +contract CostlyOperationsInLoopBase{ + uint loop_count_base = 100; + uint state_variable_base = 0; -contract CostlyOperationsInLoop{ + function bad_base() external { + for (uint i=0; i < loop_count_base; i++){ + state_variable_base++; + } + } + +} + +contract CostlyOperationsInLoop is CostlyOperationsInLoopBase{ uint loop_count = 100; - uint state_variable=0; + uint state_variable = 0; mapping (uint=>uint) map; uint[100] arr; @@ -13,13 +23,32 @@ contract CostlyOperationsInLoop{ } } - function ignore_for_now1() external { + function bad2() external{ + for (uint i=0; i < loop_count; i++){ + for (uint j=0; j < loop_count; j++){ + // Do something + } + state_variable++; + } + } + + function bad3() external{ + for (uint i=0; i < loop_count; i++){ + bad3_internal(); + } + } + + function bad3_internal() internal{ + state_variable++; + } + + function ignore_for_now1() external{ for (uint i=0; i < 100; i++){ map[i] = i+1; } } - function ignore_for_now2() external { + function ignore_for_now2() external{ for (uint i=0; i < 100; i++){ arr[i] = i+1; } diff --git a/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json index 26c75c493..265519ed2 100644 --- a/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json @@ -4,21 +4,21 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 255, - "length": 373, + "start": 102, + "length": 389, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 3, "ending_column": 4 @@ -26,16 +26,18 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CostlyOperationsInLoop", + "name": "CostlyOperationsInLoopBase", "source_mapping": { - "start": 29, - "length": 1081, + "start": 0, + "length": 494, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ + 1, + 2, 3, 4, 5, @@ -44,8 +46,133 @@ 8, 9, 10, - 11, - 12, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "a150cde3056e29877ab4fc8d64ce48a08db143bcb5dc2bcccae8f7848e666940", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 754, + "length": 373, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ 13, 14, 15, @@ -68,7 +195,36 @@ 32, 33, 34, - 35 + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 1, "ending_column": 2 @@ -81,7 +237,7 @@ "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 413, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", @@ -89,7 +245,7 @@ "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 12 + 22 ], "starting_column": 7, "ending_column": 23 @@ -99,7 +255,7 @@ "type": "function", "name": "bad", "source_mapping": { - "start": 255, + "start": 754, "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", @@ -107,11 +263,11 @@ "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -121,24 +277,14 @@ "type": "contract", "name": "CostlyOperationsInLoop", "source_mapping": { - "start": 29, - "length": 1081, + "start": 496, + "length": 1899, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, 13, 14, 15, @@ -161,7 +307,36 @@ 32, 33, 34, - 35 + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 1, "ending_column": 2 @@ -173,10 +348,450 @@ } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#10-14) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#12)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L10-L14) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L12)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L10-L14", - "id": "d6753ee3bfd5d2bb35baf5f9aa672d98eb00b2a771cbbfe37d5bac0d009f56ad", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "c92490750428b640ff46202b5fe9d0eb62ab98a70419cef5ca80530c15b14180", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 1131, + "length": 343, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "state_variable ++", + "source_mapping": { + "start": 1363, + "length": 16, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 31 + ], + "starting_column": 7, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 1131, + "length": 343, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "f7ebc0c37f31c1a68b8fbfe7530fd66f3c590e5631478cc88d03eeaa8c09f6a6", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1855, + "length": 60, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal()" + } + }, + { + "type": "node", + "name": "state_variable ++", + "source_mapping": { + "start": 1894, + "length": 16, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 42 + ], + "starting_column": 5, + "ending_column": 21 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3_internal", + "source_mapping": { + "start": 1855, + "length": 60, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoop", + "source_mapping": { + "start": 496, + "length": 1899, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad3_internal()" + } + } + } + } + ], + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "77bb0a1e0308312bb9696553d6384270c433fcbebd6311e053c6979d4bdc2128", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/test_ast_parsing.py b/tests/test_ast_parsing.py index f23757092..5543ef02f 100644 --- a/tests/test_ast_parsing.py +++ b/tests/test_ast_parsing.py @@ -26,7 +26,7 @@ ALL_04 = range(0, 27) ALL_05 = range(0, 18) ALL_06 = range(0, 13) ALL_07 = range(0, 7) -ALL_08 = range(0, 8) +ALL_08 = range(0, 11) # these are tests that are currently failing right now XFAIL = ( @@ -274,14 +274,16 @@ def _generate_test(test_item: Item, skip_existing=False): return # set_solc(test_item) try: + cc = load_from_zip(test_file)[0] sl = Slither( - test_file, + cc, solc_force_legacy_json=test_item.is_legacy, disallow_partial=True, skip_analyze=True, ) # pylint: disable=broad-except - except Exception: + except Exception as e: + print(e) print(test_item) print(f"{expected_file} failed") return