a structural diff that understands syntax 🟥🟩
 
 
 
 
 
Go to file
Benjamin Sobel e674ad71d8 mult operator fixes 2022-05-21 14:39:44 +07:00
assets fixes and tests 2022-05-21 12:33:29 +07:00
bindings fix highlights and regenerate 2021-05-14 07:32:45 +07:00
queries fixes and tests 2022-05-21 12:33:29 +07:00
src mult operator fixes 2022-05-21 14:39:44 +07:00
test even more fixes 2022-05-21 14:15:24 +07:00
tester update test 2020-11-14 13:00:30 +07:00
.gitignore add in tester script that will test all dart files recursively in a directory and print out the first 100 errors, as well as report percentage of lines of tree-sitter parse output that contain errors 2020-07-12 21:53:08 +07:00
Cargo.toml fix highlights and regenerate 2021-05-14 07:32:45 +07:00
LICENSE Create LICENSE 2022-04-06 21:17:21 +07:00
README.md start highlighting and add to documentation 2020-07-04 19:23:28 +07:00
binding.gyp Update parser to 0.19.2 (ABI break!) 2021-03-07 16:39:34 +07:00
grammar.js mult operator fixes 2022-05-21 14:39:44 +07:00
index.js add argument 2021-06-04 09:33:29 +07:00
package.json fixes and tests 2022-05-21 12:33:29 +07:00
test_all.sh add in tester script that will test all dart files recursively in a directory and print out the first 100 errors, as well as report percentage of lines of tree-sitter parse output that contain errors 2020-07-12 21:53:08 +07:00
testitem.html fixes and tests 2022-05-21 12:33:29 +07:00
tree-sitter-dart.wasm mult operator fixes 2022-05-21 14:39:44 +07:00

README.md

tree-sitter-dart

This is a tree-sitter grammar written for the dart programming language. I attempted to adhere as closely as possible to the dart language spec. Initially I started with a copy of the tree-sitter Java grammar which is why there may be a few relics included in here. For the sake of simplifying the syntax tree, many items were made inlined with tree-sitter's "underscore" method of writing rules.

Getting Started

  • Go to the project directory
  • run npm install (first time)
  • run npm run build_init (first time) npm run build (subsequent times)
  • run npm run test

To test a single highlight file

  • run tree-sitter highlight test/highlight/types.dart

To test a single test file

  • run tree-sitter test -f 'testcasefilter'
  • for example tree-sitter test -f 'dart string literals'

To show the output of a parse for a sample file (for example while debugging highlight issues)

  • run tree-sitter parse path/to/file.dart