Skip to content

Add shared Stack language assets package - #6

Merged
konojunya merged 1 commit into
mainfrom
jj/stack-language-package
Sep 3, 2026
Merged

Add shared Stack language assets package#6
konojunya merged 1 commit into
mainfrom
jj/stack-language-package

Conversation

@konojunya

Copy link
Copy Markdown
Member

背景

Stack source now has multiple editor-facing consumers: the Web playground, future documentation, and future editor integrations. They need one versioned lexical grammar without moving language ownership into a product or future LSP repository.

実装方法

  • add ADR-0004 to keep shared editor language assets in the specification repository
  • add the dependency-free @stack-sh/language package with a TextMate grammar, language configuration, JavaScript entry point, and TypeScript declarations
  • cover every Stack 1.0 contextual keyword and verify tokenization with Shiki's pure JavaScript regex engine
  • add package-content auditing, CI gates, and a language-v* release workflow for future npm Trusted Publishing

テスト方法

  • npm ci
  • npm run test:language
  • npm run typecheck:language
  • npm run pack:check
  • all existing JSON Schema and fixture validation commands
  • oxfmt --check and oxlint for package sources

Review 視点 / 懸念点

  • The normative EBNF remains authoritative; TextMate scopes are presentation-only.
  • Contextual keyword-shaped identifiers are intentionally highlighted lexically as keywords.
  • The first public npm publish is not performed by this PR. It remains a separate explicit release step.

@konojunya
konojunya merged commit 45e86d9 into main Sep 3, 2026
2 checks passed
@konojunya
konojunya deleted the jj/stack-language-package branch September 3, 2026 12:17
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