thanos
thanos copied to clipboard
Support class methods and class / class instance variables
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
.