thanos icon indicating copy to clipboard operation
thanos copied to clipboard

Support class methods and class / class instance variables

Open redneckbeard opened this issue 2 years ago • 0 comments

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 avatar Mar 28 '22 10:03 redneckbeard