Skip to content

Add audited Nix and XML grammars and highlighting - #33

Merged
simonbs merged 4 commits into
mainfrom
add-requested-languages
Oct 25, 2026
Merged

simonbs merged 4 commits into
mainfrom
add-requested-languages

Conversation

@simonbs

@simonbs simonbs commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Adds Nix and XML parser, query-resource, and Runestone wrapper products. Neither overlaps the ten languages in #34. App integration is in simonbs/RunestoneEditor#12.

Nix highlighting now preserves function and property styling when themes also color ordinary variables. XML queries adapt entity predicates and markup captures to Runestone. LANGUAGE_SOURCES.md records exact source pins, licenses, adaptations, audit evidence, and limitations.

The quality audit removed Clojure, Fortran, Kotlin, Org, and PowerShell: incomplete core highlighting, ordinary fixed-form Fortran failures, hidden missing-semicolon errors in valid Kotlin interfaces, missing Org inline semantics, and PowerShell range/attribute parsing defects. Their products, sources, and notices are absent from the final diff; detailed examples are recorded in LANGUAGE_SOURCES.md.

Validation:

  • Nix: 45 valid corpus tree checks and nine expected-error cases; four real upstream files.
  • XML: ten valid corpus tree checks and six expected-error cases; 17 real app XML files.
  • Four persistent fixtures pass on Tree-sitter 0.20.9 and 0.27.1, asserting 46 positive and five excluded captures. The existing compatibility CI runner executes these fixtures.
  • Native iOS tests pass for Nix capture precedence and XML entity/Unicode highlighting, using Runestone's actual Swift predicates and attributed-string highlighter. These tests are local-only; CI currently builds the package and runs the C/Python compatibility checks.
  • Native compilation/testing used the existing build-only iOS 16 deployment override for Runestone 0.4.1's availability issue with the installed SDK. Package deployment requirements are unchanged.

Known limits: Nix builtin shadowing has no scope analysis. Compact internal XML DTD declarations without separating whitespace produce missing-whitespace nodes, but tested downstream highlighting recovers. No full conformance, incremental-edit, or UI appearance guarantee is claimed.

@simonbs simonbs changed the title Add Clojure, Fortran, Kotlin, Nix, Org, PowerShell, and XML Add audited Nix and XML grammars and highlighting Oct 25, 2026
@simonbs
simonbs merged commit 737ceb8 into main Oct 25, 2026
2 checks passed
@simonbs
simonbs deleted the add-requested-languages branch October 25, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant