Improve name resolution for top-level scope, structs and enums #47
Labels
🔧 compiler
Issue concerns the compiler
✨ enhancement
New feature or request
👌 good first issue
Good for newcomers
👪 help wanted
Extra attention is needed
Right now, name resolution is done in two passes (in file
src/catala/catala_surface/name_resolution.ml
):This is nice but lacks flexibility for scope, structs and enums. Especially, we want users to be able to declare their scope anywhere in the code, and not following a dependency order. For instance, if scope
A
has a subscope of typeB
, we don't want to force the user to declareB
beforeA
.This problem can be solved by doing a three-pass name resolution with the following passes:
The text was updated successfully, but these errors were encountered: