Skip to content

Support class methods and class / class instance variables #34

@redneckbeard

Description

@redneckbeard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1Aremaining features to implement from lexer to compiler

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions