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

Class methods implementation #6

Open
wizard-lgtm opened this issue Mar 14, 2025 · 0 comments
Open

Class methods implementation #6

wizard-lgtm opened this issue Mar 14, 2025 · 0 comments
Assignees
Milestone

Comments

@wizard-lgtm
Copy link
Owner

This feature is not in the original spec.
But this is holy holy c, not holy c

syntax:

class Person {
    U8* name;
    I64 age;
};

impl Person {
    U0 say_name(Person* p) {
        printf("%s\n", p.name);
    }
}

new impl keyword required

@wizard-lgtm wizard-lgtm added this to the AST Parser milestone Mar 14, 2025
@wizard-lgtm wizard-lgtm self-assigned this Mar 14, 2025
@wizard-lgtm wizard-lgtm modified the milestones: AST Parser, 0.2.0 Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant