Skip to content

fix(common): parse static resource functions as the WIT spec writes them - #75

Merged
walterjgsp merged 1 commit into
mainfrom
fix/common-wit-static
Oct 4, 2026
Merged

walterjgsp merged 1 commit into
mainfrom
fix/common-wit-static

Conversation

@walterjgsp

Copy link
Copy Markdown
Contributor

Found while moving the Kotlin wasm rules onto the shared parser (#66, item 3).

The parser accepted static reset-all: func();, which is not WIT. The spec writes reset-all: static func();, and that failed with expected 'func', got "static". The existing tests only used the non-standard form.

  • name: static func(...) now parses and lands in Resource.Static.
  • The old spelling still parses, so nothing that worked stops working.
  • Function.Static marks both.

31 tests (1 new, covering both spellings in one resource).

🤖 Generated with Claude Code

The parser only accepted the non-standard 'static name: func()'. WIT spells it 'name: static func()', which failed with: expected 'func', got "static". Both spellings now parse, and Function.Static marks them. Found while moving the Kotlin wasm WIT parsing onto the AST (item 3 of #66).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@walterjgsp
walterjgsp merged commit 8298627 into main Oct 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant