Migrate inline assembly parser failures to structured diagnostics
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 46
Description
Tracked by #346.
## Why
`front/parser/src/parser/asm.rs` and the asm-expression parser still report malformed blocks and operands with direct prints. Inline assembly is error-prone, so consistent source-located diagnostics are especially important.
## Scope
- Convert parser failures for missing braces/parentheses, malformed `in`/`out`, malformed `clobber`, and invalid operand syntax.
- Keep backend constraint validation and target-specific assembly behavior out of scope.
- Add compact negative parser tests for each converted family.
- Preserve the current inline assembly grammar.
## Completion criteria
- [ ] Converted paths return structured errors without printing.
- [ ] Diagnostics name the asm construct being parsed.
- [ ] Tests cover statement and expression asm forms.
- [ ] Valid existing inline-asm cases remain unchanged.
Contributor guide
Research direction
Start in front/parser/src/parser/asm.rs and trace the asm-expression parser paths that directly print failures. Convert the listed malformed-brace, operand, in/out, clobber, and invalid-syntax cases to source-located structured errors while leaving grammar and backend validation unchanged. Add compact negative coverage for statement and expression forms, then verify valid inline-asm cases remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100