Context
PR #147 introduced two new targets (TokenVisitor, SyntaxParser) that form the parsing infrastructure used by the skit executable. Currently, SyntaxKitTests only depends on SyntaxKit — there is no test coverage for the new modules.
Proposed Work
Add a SyntaxParserTests test target to Package.swift that covers at minimum:
SyntaxParser.parse(code:) with a simple Swift snippet
- Basic
TreeNode structure validation (id, parent, text, type)
TokenVisitor traversal produces expected node count for a known input
This ensures regressions in the parsing pipeline are caught before they reach skit users.
Context
PR #147 introduced two new targets (
TokenVisitor,SyntaxParser) that form the parsing infrastructure used by theskitexecutable. Currently,SyntaxKitTestsonly depends onSyntaxKit— there is no test coverage for the new modules.Proposed Work
Add a
SyntaxParserTeststest target toPackage.swiftthat covers at minimum:SyntaxParser.parse(code:)with a simple Swift snippetTreeNodestructure validation (id, parent, text, type)TokenVisitortraversal produces expected node count for a known inputThis ensures regressions in the parsing pipeline are caught before they reach
skitusers.