Skip to content

[Language] Track remaining parser/spec hardening follow-ups #250

@cssbruno

Description

@cssbruno

Source: closeout audit for #59.

This issue tracks language/parser/spec items intentionally deferred after the current diagnostics registry, gowdk explain, check --json, formatter hardening, language spec, and diagnostics documentation baseline.

Remaining follow-ups:

  • Add parser recovery so one syntax error does not hide the rest of the file, and split broad parse_error cases into specific stable parser diagnostics where useful.
  • Expand exact source spans and suggestions by surface: package declarations, imports, use, metadata declarations, routes, layouts, render modes, paths, build, load, view, style, client, go, go ssr, go client, go addon.*, actions, APIs, fragments, component props/state, and WASM declarations.
  • Add or broaden suggestions for missing config, missing SSR feature, duplicate routes, unsupported handler signatures, missing exported Go symbols, invalid route params, unsupported build functions, unsupported component props, and missing Tailwind command.
  • Move formatting toward parser-backed formatting so comments, nested markup, attributes, expressions, CSS, JS, and Go block bodies are preserved by syntax-aware logic instead of line-oriented brace counting.
  • Expand malformed syntax tests beyond the current parser/check fixtures as new recovery and exact-span surfaces are implemented.
  • Add fuzz coverage for the parser, route matcher, view parser, and form decoder once the desired invariants and corpus seeds are documented.
  • Continue expanding the formal .gwdk language spec, grammar examples, invalid syntax examples, diagnostics examples, and the GOWDK-native mental model guide as each syntax family stabilizes.

Acceptance criteria:

  • Remaining work is split into narrower implementation issues before broad parser recovery, fuzzing, or syntax-aware formatting changes land.
  • Each new diagnostic code is registered in internal/diagnostics/registry.go, documented in docs/reference/diagnostic-codes.md, and covered by focused tests.
  • Each syntax/spec change updates docs/language/ and relevant examples or fixtures in the same change.
  • Parser, formatter, diagnostics, LSP, and CLI JSON behavior remain covered by focused tests and the repository test script.

Related: #59.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LSPLanguage server and editor toolingcompilerCompiler internals, pipeline, and generated metadatadiagnosticsDiagnostic codes, spans, and messagesparser.gwdk parser and syntax handling

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions