-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Difficulty: Easy — Extend case label parsing to accept comma-separated values; small AST and codegen changes.
Summary
Occam CASE statements can have multiple comma-separated values on a single label. Currently only single-value labels are parsed.
Occam syntax
CASE ch
'*n', '*c'
SKIP
ELSE
out ! ch
Proposed Go mapping
switch ch {
case '\n', '\r':
// SKIP
default:
out <- ch
}Affected files
test_bell.occ(lines 39, 77)
Work required
- Parser: After parsing the first case value, check for comma and parse additional values
- AST: Change
CaseOption.Valuefrom single expression to a list - Codegen: Emit comma-separated values in Go
caseclause
Part of #43.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels