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
Migrate local const and static parser failures to structured diagnostics #394
enhancementA request for a new feature or improvement.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.
Local const and static declarations are intentionally rejected, but front/parser/src/parser/stmt.rs and the for-loop initializer path still print ad-hoc text and return None. That loses the stable diagnostic contract used by the rest of the compiler.
Scope
Replace only the local const and static failure paths with ParseError/structured diagnostic data.
Cover ordinary blocks and for initializers.
Point at the qualifier token.
Explain that both forms are top-level only and suggest var for local storage where appropriate.
Do not change storage-class semantics.
Completion criteria
No direct println! is used for these failures.
Human diagnostics include context and a useful help message.
JSON error output remains valid.
Positive top-level const and static cases remain accepted.
Parser or CLI regression tests cover all changed paths.
enhancementA request for a new feature or improvement.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.
Activity
Fix frontend contracts and native regression tests (#723)