Skip to content

Update docs for postfix as cast syntax Closes #32#33

Merged
binaek merged 2 commits into
v0.0.5from
32-update-docs-to-reflect-postfix-as-cast-syntax-replaces-cast-keyword
Jun 9, 2026
Merged

Update docs for postfix as cast syntax Closes #32#33
binaek merged 2 commits into
v0.0.5from
32-update-docs-to-reflect-postfix-as-cast-syntax-replaces-cast-keyword

Conversation

@binaek

@binaek binaek commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Documentation and syntax highlighting now describe postfix expr as Type casts instead of the removed cast keyword, in line with sentrie-sh/sentrie#85.

What this PR does

  • Rewrites the converting-types sections on the reference pages to use postfix as, adds a short precedence note with commented examples, and updates the keyword summary on the reference index.
  • Removes cast from the TextMate-style keyword list used for higher-order-related highlighting so cast is not styled as a reserved word.

Changes by area

Reference documentation

  • src/content/docs/reference/types-and-values.md: coercion prose, examples, and precedence note.
  • src/content/docs/reference/constraints.md: type conversion with constraints examples.
  • src/content/docs/reference/index.md: casting subsection and example.

Tooling

  • src/sentrie-grammar.ts: keyword regex for builtins no longer includes cast.

Review notes

  • Merge or release order: ship after the compiler change (sentrie#85) so live snippets match the implementation.

Testing notes

  • No automated doc tests; spot-check rendered pages if the site is built locally.

Dependency changes

  • None.

@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

A preview of this PR has been deployed to:

🔗 View Preview

This preview will be automatically removed when the PR is merged or closed.

🚀 Preview Deployment

✅ ** Preview removed (PR merged) **

The preview deployment for this PR has been automatically removed.

@binaek binaek changed the base branch from main to v0.0.5 June 9, 2026 03:01
@binaek binaek merged commit 4d2d4a2 into v0.0.5 Jun 9, 2026
1 check passed
@binaek binaek deleted the 32-update-docs-to-reflect-postfix-as-cast-syntax-replaces-cast-keyword branch June 9, 2026 03:01
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.

Update docs to reflect postfix 'as' cast syntax (replaces 'cast' keyword)

1 participant