Repository navigation
Merged
Conversation
Summary by t27-beesThis PR adds a new Worth a look
Read: 9 files, +131 -1, the whole diff. Head |
…or foreign syntax The compiler front end runs as wasm (explorer.wasm, gHashTag/t27 bindings/wasm-explorer, unchanged); each message gets a hint code and a line number from wasm/check_hints.wasm, generated from gHashTag/t27 specs/t27mcp/check_hints.t27 (PR gHashTag/t27#10080). check.mjs is 26 lines of glue and holds no rule. Closes gHashTag/t27#10073 Refs gHashTag/t27#10066 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t27#8087) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes gHashTag/t27#10073
Part of the epic gHashTag/t27#10066 (learnability: parser hints for foreign syntax). The rule table is gHashTag/t27#10080. (Replaces #5, which GitHub closed when its base branch was deleted after #4 merged; same commit, rebased onto master.)
What
A new tool,
t27_check: give it.t27source, get back whether it parses and typechecks and, for eachdiagnostic, the line, the source line and a short "write this instead" hint for foreign syntax. It runs offline.
wasm/explorer.wasm: the bootstrap parser and typechecker (gHashTag/t27bindings/wasm-explorer), copiedunchanged, 774 KB. It decides ok or not; the server adds no verdict.
wasm/check_hints.wasm+wasm/check_hints.mjs: generated fromspecs/t27mcp/check_hints.t27byt27c gen-c+zig ccandt27c gen-js(thestringparameters of the spec arrive asconst char*, so nohand export glue is needed). Built on the Railway lab; commands and sha256 in
wasm/BUILD.check.mjs(26 lines) is glue: it moves bytes between the two wasm modules. A message the spec does not knowgets no hint, and the compiler's words stand alone.
Hand-written JavaScript added:
check.mjs26,server.mjs11,smoke.mjs11 = 48 lines (cap: 40 per file, 80per PR).
Evidence
npm run smoke: the four newt27_checkchecks pass (clean source,as u3with its line and source,inas aname, and a negative control: an arity error gets no hint). The run's one failure,
backendFailures tally matches the specs blaming a backend(737 counted vs 113 blaming), is in the live atlasdata and in code this PR does not touch; it is the kind of tally logic the epic's last item moves into
.t27.🤖 Generated with Claude Code