v0.34.0 Phase 4 Unicode-scalar Tooling Review
Result: complete with no open finding (2026-09-04). Compiler structural output, semantic tooling, runnable examples, and an installed-standard-library invocation now exercise the same Unicode-scalar product established by Phases 1 through 3.
Closed Product
Tokens and AST JSON preserve character_literal as a category distinct from byte and string literals and retain the exact authored spelling. The formatter treats the literal as one lossless token, normalizes only surrounding layout, and proves concrete-syntax equivalence after rewriting. Malformed scalar spellings remain E0117 source diagnostics in structural and language-server requests.
Semantic presentation renders character constants through the existing checked constant value and canonical source renderer. Hover on a checked scalar literal obtains its type through an explicit analysis capability over a BodyNode identity; the query layer neither inspects checker storage nor decodes quote text. Inferred bindings display char, the built-in type navigates to the selected standard declaration, and ordinary member completion exposes char instance methods.
Semantic highlighting merges exact source-index bindings with accepted syntax-owned character tokens in one sorted compiler result. The language-server adapter maps the protocol-independent CharacterLiteral category to the standard LSP string token kind and performs no literal parsing. The readonly modifier remains reserved for binding/place mutability and is not attached to the literal token.
Practical Integration
examples/unicode-text.nct distinguishes byte length from scalar count, traverses borrowed UTF-8, copies scalars into owned text, and constructs a scalar from a code point. The complete native single-file example gate accepts it. The CLI installed-toolchain gate copies the physical standard package into an isolated Nocter home, compiles and executes mixed-width scalar iteration through that installation, and therefore detects omitted standard sources or stale profile locations.
Authority Review
- source tooling consumes lexer/parser tokens and never decodes a character literal;
- analysis receives scalar-literal type facts through its semantic-evidence adapter rather than
exposing
CheckedBodyinternals to hover; - LSP owns only UTF-16 coordinate and protocol-token projection;
- completion and navigation use the ordinary declaration and instance indexes;
- no editor, example, or installed-home test introduces a second Unicode validity or UTF-8 table.
Phase 5 remains responsible for the complete qualification matrix, performance evidence, release candidate packaging, and final duplicate-authority review.