wavefnd / wavefnd/Wave

Parse named proto contract implementations

Open
#365 0 comments 0 reactions 0 assignees View on GitHub
enhancement feature request good first issue
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 22m
Merged PRs (30d)
46

Description

Tracked by #348.

## Scope

Extend the parser and source AST with the named contract form:

```wave
proto Printable : Buffer {
fun print(self) {
}
}
```

Keep this distinct from the existing inherent extension form:

```wave
proto Buffer {
fun clear(self: ptr) {
}
}
```

## AST requirements

Preserve the proto name, target type, target generic arguments, method bodies, visibility/source provenance, and whether the block is inherent or named.

## Completion criteria

- [ ] Both proto forms parse without ambiguity.
- [ ] Missing proto name, colon, target, braces, or method body has a structured diagnostic.
- [ ] Existing colon-free proto tests remain unchanged.
- [ ] Parser-only positive and negative tests are added.
- [ ] Contract coherence, constraints, and method resolution remain outside this parser task.

Contributor guide

Open the contributing guide

Research direction

Start by reading the parser and source AST handling for the existing colon-free proto form, then inspect its parser-only tests. Add coverage for named and inherent forms, including the listed malformed inputs; done means both forms preserve the required AST data and produce structured diagnostics without changing existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.