Skip to content

fix(tree-sitter): simplify arco-kdl multiline strings#161

Merged
pesap merged 3 commits intomainfrom
fix/tree-sitter-simplify-main
Apr 13, 2026
Merged

fix(tree-sitter): simplify arco-kdl multiline strings#161
pesap merged 3 commits intomainfrom
fix/tree-sitter-simplify-main

Conversation

@pesap
Copy link
Copy Markdown
Collaborator

@pesap pesap commented Apr 13, 2026

Summary

This PR isolates the tree-sitter overlay cleanup on top of main.

It makes three focused parser changes:

  1. Replace the custom multiline-string scanner path with grammar-level triple-quoted string parsing.
  2. Simplify the overlay grammar by factoring shared node and math-body helpers.
  3. Allow quoted string literals inside algebra text, with corpus and fixture coverage.

Scope

  • tree-sitter overlay only
  • no runtime or compiler changes

Files touched

  • tools/tree-sitter-arco-kdl/grammar.js
  • tools/tree-sitter-arco-kdl/src/grammar.json
  • tools/tree-sitter-arco-kdl/src/node-types.json
  • tools/tree-sitter-arco-kdl/src/parser.c
  • tools/tree-sitter-arco-kdl/src/scanner.c
  • tools/tree-sitter-arco-kdl/test/corpus/arco_math.txt
  • tools/tree-sitter-arco-kdl/examples/highlight_demo.kdl

Validation

  • cd tools/tree-sitter-arco-kdl && tree-sitter test
  • just kdl-overlay-check

@github-actions github-actions bot added the kdl label Apr 13, 2026
@pesap pesap merged commit 8f2b527 into main Apr 13, 2026
7 checks passed
@pesap pesap deleted the fix/tree-sitter-simplify-main branch April 13, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant