Parser: Support Algebraic Data Types (Enum variants with data)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 14
- Forks
- 2
- Avg merge
- 13h 13m
- Merged PRs (30d)
- 70
Description
The docs show HardwareState::Available(pinned). The parser handles simple enum variants (Expr::EnumVariant("PadMode", "Trim")), but it does not support parsing or storing associated data in enum variants.
Tasks:
- Update
EnumVariantparsing to optionally accept a tuple or struct-like payload (e.g.,(pinned)). - Update AST to represent this payload.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the parser entry point for simple EnumVariant expressions and the AST definition for Expr::EnumVariant. Trace how tuple-like and struct-like payloads are represented, then update parsing and AST storage so examples such as HardwareState::Available(pinned) are accepted and represented consistently; add or update parser tests if the project has them.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100