Implement scene file syntax checker (チェッカーの実装)#198
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: EndoHizumi <5486808+EndoHizumi@users.noreply.github.com>
Co-authored-by: EndoHizumi <5486808+EndoHizumi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement syntax checker for the scenarios
Implement scene file syntax checker (チェッカーの実装)
Mar 20, 2026
Owner
|
@copilot 他のタグのバリエーションもcore.jsを参照して、追加して |
Co-authored-by: EndoHizumi <5486808+EndoHizumi@users.noreply.github.com>
Contributor
Author
Added all tag variations from
A |
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.
Scene files had no parse-time validation — structural violations like
<item>outside<choice>or duplicate<scenario>sections were silently accepted, only failing at runtime.New:
parser/checker.jsRecursive validator that enforces parent-child constraints on the parsed scenario tree using a
TOP_LEVEL_COMMANDSconstant (derived fromCore.commandListincore/index.js) and anALLOWED_PARENTSmap:<item><choice><action><actions><then><if>or any top-level command (HTTP response context)<else><if><prompt>/<actions><dialog><color>/<ruby>/<b>/<i>/<br><text>or<say><header>/<data>/<error>/<progress>Inline text decoration tags (
color,ruby,b,i,br) are sourced fromdrawer.ts'screateDecoratedElementandtextHandler. HTTP sub-tags (header,data,error,progress) are sourced fromhttpHandlerand are valid inside any top-level command since HTTP is a global feature.Returns an array of
{ type, node, parent, message }error objects.Updated:
parser/parser.js<scenario>sections per fileerrorsin return valueUpdated:
parser/cli.jsstderrwith filename context; exits1on any errorNew:
parser/checker.test.ts24 unit tests covering valid structures (no false positives) and all enforced parent-child violations, including inline text decoration and HTTP sub-tag rules.
Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.