Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support class methods and class / class instance variables #34

Open
redneckbeard opened this issue Mar 28, 2022 · 0 comments
Open

Support class methods and class / class instance variables #34

redneckbeard opened this issue Mar 28, 2022 · 0 comments
Labels
1A remaining features to implement from lexer to compiler

Comments

@redneckbeard
Copy link
Owner

Two key components to parsing and type inference on class methods: method storage/resolution and variable storage/resolution. This should be relatively straightforward if duplicative of the existing plumbing for instance methods/variables.

Compilation to handle class methods and class instance variables should probably target a separate struct type ClassFoo and is then embedded in struct type Foo with a field name of Self for simplicity.

Actual class/static variables should probably be package-level variables with a qualifying name, e.g. @@bar inside class Foo can compile to ClassVarFooBar.

@redneckbeard redneckbeard added the 1A remaining features to implement from lexer to compiler label Mar 28, 2022
@redneckbeard redneckbeard changed the title Support class methods Support class methods and class / class instance variables Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1A remaining features to implement from lexer to compiler
Projects
None yet
Development

No branches or pull requests

1 participant