You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Define one numeric literal contract across the frontend #479
enhancementA request for a new feature or improvement.refactorIssues that require code refactoring without changing functionality.technical debtIssues that represent potential future improvements or problems.
Wave does not currently have one numeric-literal contract across the lexer, parser, semantic constant evaluation, and LLVM lowering. The lexer recognizes binary, hexadecimal, decimal, and a limited decimal-float form, while later stages contain handling for spellings such as octal prefixes and digit separators that the lexer cannot consistently produce.
This mismatch already contributes to parser-only failures such as the default-parameter radix panic and makes it unclear whether 0o755, 1_000, exponent notation, and type suffixes are language features or dead implementation paths.
The grammar should be frozen before alpha instead of letting each compiler stage define a different subset.
Scope
Write the normative integer and floating-point literal grammar.
Decide the alpha contract for binary, octal, decimal, hexadecimal, digit separators, exponents, and suffixes.
Implement one shared parsing representation used by default values, constants, semantic validation, and lowering.
Reject invalid digits, separator placement, overflow, and unsupported suffixes with source diagnostics.
Add table-driven lexer/parser/semantic tests and end-to-end cases.
Acceptance criteria
Every documented literal spelling has matching positive tests through typed HIR.
Every downstream numeric parser accepts exactly the token spellings emitted by the lexer.
Invalid literals cannot panic or reach backend-only parsing errors.
The default-parameter crash issue can close by using this contract rather than duplicating it.
enhancementA request for a new feature or improvement.refactorIssues that require code refactoring without changing functionality.technical debtIssues that represent potential future improvements or problems.
Activity