NethermindEth / warp

Warp - Bringing Solidity to Starknet at warp speed. Warp is a Solidity to Cairo Compiler, this allows teams to write/migrate Solidity to Cairo for easy onboarding into the StarkNet ecosystem.
https://nethermind.io/warp/
Apache License 2.0
754 stars 70 forks source link

Use CairoBlockFunctionDefinition node for Cairo Blocks #1087

Open cicr99 opened 1 year ago

cicr99 commented 1 year ago

There is an implementation for CairoBlockFunctionDefinition nodes in src/ast/cairoNodes/cairoBlockFunctionDefinition.ts that is not being used at the moment. Cairo blocks are currently being handled using the documentation of FunctionDefinition nodes. Using an instance of the class CairoBlockFunctionDefinition to represent the block will make it easier to handle Some places that will need updating when doing the refactor:

Refer to the documentation for further details on Cairo Blocks