Skip to content
Unverified: This page has not yet been anchored to automated code tests.

vox-language-surface API Reference (generated)

Crate: vox-language-surface · Version: 0.6.0 · Target: Library (lib.rs)

Single source of truth for Vox keyword/decorator/builtin surface strings. Has no logic dependencies (only the workspace-hack unifier), so vox-compiler and vox-grammar-export can share one SSOT without a cyclic dependency.

Single source of truth for keyword and decorator surface strings exposed to the lexer-introspection layer, LSP, MCP, and grammar docs.

This crate has zero logic dependencies so that both vox-compiler (which owns the lexer/parser) and vox-grammar-export (which renders GRAMMAR_SSOT.md) can depend on it without forming a cycle — vox-compiler depends on vox-grammar-export, so the surface SSOT cannot live in vox-compiler. vox-compiler::language_surface re-exports everything here.

Keep lexer-derived lists aligned with vox_compiler::lexer::token::Token.

ConstantDescription
LSP_KEYWORD_SNIPPETSLSP keyword completions: (label, snippet). Includes parser-level keywords that may still lex as identifiers until dedicated tokens exist.
LSP_DECORATOR_DOCSDecorators with dedicated lexer tokens — (spelling, LSP doc). The retired data-layer decorators (@server/@table/@index/@query/@mutation/ @tool/@resource) are intentionally absent: they live in [LEXER_DEPRECATED_DECORATORS], and LSP should steer users to the soft-keyword forms in [LSP_KEYWORD_SNIPPETS] instead.
LSP_DECORATOR_SNIPPETSLSP decorator snippets: (label, snippet). The retired data-layer decorators are omitted in favor of the soft-keyword snippets in [LSP_KEYWORD_SNIPPETS].
CONTROL_FLOW_KEYWORDSControl-flow and binding keywords.
DECLARATION_KEYWORDSDeclaration / structural keywords.
WEB_REACTIVE_KEYWORDSWeb / reactive / operator keywords, HTTP verbs, and the soft (contextual) data-layer keywords (table/index/query/mutation/server/tool/resource) — the latter have no logos #[token]; they remain Token::Ident and are recognized positionally at declaration-head position only.
LEXER_KEYWORDSKeywords that have dedicated single-word lexer tokens (speech / strict introspection). The concatenation of [CONTROL_FLOW_KEYWORDS], [DECLARATION_KEYWORDS], and [WEB_REACTIVE_KEYWORDS] — guarded by the categories_partition_lexer_keywords test (#[cfg(test)]-only, not linkable from this doc comment).
LEXER_DECORATORS@decorator spellings from the lexer (stable order).
LEXER_AT_DECORATORSEvery @ decorator with a dedicated lexer Token::At* variant (56 — mirrors vox_compiler::feature_matrix::DecoratorFeature::ALL).
LEXER_DEPRECATED_KEYWORDSKeywords that are deprecated and will be removed in a future version. LSP and introspection tools should avoid suggesting these.
LEXER_DEPRECATED_DECORATORSDecorators that are retired and produce hard compiler errors. LSP and introspection tools should avoid suggesting these.
SURFACE_BUILTIN_NAMESBuiltin names for LSP / MCP “surface” introspection (aligned with common runtime helpers).
LSP_BUILTIN_SNIPPETSLSP builtin snippets: (name, insertText).
SURFACE_TYPE_NAMESSurface type names shown in completions / introspection.