Skip to content

Add name resolution and scopes#65

Merged
MarcellPerger1 merged 35 commits intomainfrom
add-typechecking
Dec 8, 2024
Merged

Add name resolution and scopes#65
MarcellPerger1 merged 35 commits intomainfrom
add-typechecking

Conversation

@MarcellPerger1
Copy link
Owner

@MarcellPerger1 MarcellPerger1 commented Nov 30, 2024

  • Add name resolution and scopes (part of Type checking #39)
  • Tests
  • Tests for the rather error-prone util/pformat.py
  • Refactor pformat (rather messy right now)

(Python automatically interns these strings - even ancient versions, since 2.1!)
There are now 2 hierarchies:
- NameInfo for info specific to a name (e.g. is it a param?, subscope for funcs). These have a reference to a TypeInfo that shows their type
- TypeInfo has information about a specific type e.g. BoolInfo (not specific to a single variable)

TODO: actually put param types into FuncInfo and figure out whether to store param types positionally (yes?) or by name (no??)
Textmate is SO ANNOYING! How do you debug it??!
@MarcellPerger1 MarcellPerger1 added the A-TypeChecking Area: Type checking/name resolution label Nov 30, 2024
@MarcellPerger1 MarcellPerger1 marked this pull request as ready for review December 8, 2024 22:27
@MarcellPerger1
Copy link
Owner Author

After type-checking is added (see #39), this should be in a different file, but for now this is good enough as we don't know how exactly it will be shared.

@MarcellPerger1 MarcellPerger1 merged commit 22f9ee4 into main Dec 8, 2024
3 checks passed
@MarcellPerger1
Copy link
Owner Author

Still don't delete that branch (type-checking is going on it too)

@MarcellPerger1
Copy link
Owner Author

#66 - Who approved this without testing the actual functionality??? Me, of course!
(But guess who did write tests for it failing and giving an error message... That's right, also me!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-TypeChecking Area: Type checking/name resolution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant