Skip to content

Highlight event declarations (1.6.0) - #2

Merged
matthewp merged 3 commits into
mainfrom
typed-events
Nov 14, 2026
Merged

matthewp merged 3 commits into
mainfrom
typed-events

Conversation

@matthewp

@matthewp matthewp commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

For the event declarations in lucydsl/liblucy#80, released in liblucy 0.6.0:

machine session {
  event login(User)
  event logout
}
  • event is a keyword when a name follows it. An event called event (event => idle) is not highlighted, since event is only a keyword in a declaration.
  • The type in event name(Type) is a class-name.
  • test/index.html has a couple of declarations added to the demo.
  • Bumps the version to 1.6.0. Once this merges, pushing the v1.6.0 tag on the merge commit publishes it.

main is merged in, which brings in the CI and release workflows.

Testing

  • npm test (main's smoke test) passes.
  • Tokenizing a typed machine with Prism 1.25.0 (the version the website pins) gives keyword for each declaration's event, class-name for User and string, and leaves event => idle alone.
  • Every liblucy snapshot input tokenizes the same before and after this change.
  • I built Document typed events in the language guide website#10 against this branch and checked the rendered typed-events example: event is highlighted like machine and state, and the types like state names.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HeTMVE8SQskLfaHRjAiAFJ

`event` is a keyword when a name follows it, as in `event login(User)`,
and the type in the parentheses is a class name. An event called event,
`event => idle`, is left alone. For lucydsl/liblucy#80.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeTMVE8SQskLfaHRjAiAFJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeTMVE8SQskLfaHRjAiAFJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeTMVE8SQskLfaHRjAiAFJ
@matthewp matthewp changed the title Highlight event declarations Highlight event declarations (1.6.0) Nov 14, 2026
@matthewp
matthewp merged commit 7dec578 into main Nov 14, 2026
2 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.

2 participants