Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/usernobody14/tree-sitter-dart
Attempt to make a tree-sitter grammar for dart
https://github.com/usernobody14/tree-sitter-dart
Last synced: 4 days ago
JSON representation
Attempt to make a tree-sitter grammar for dart
- Host: GitHub
- URL: https://github.com/usernobody14/tree-sitter-dart
- Owner: UserNobody14
- License: mit
- Created: 2020-04-20T18:27:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-17T04:53:35.000Z (about 2 months ago)
- Last Synced: 2024-12-31T11:19:57.630Z (11 days ago)
- Language: Dart
- Size: 15 MB
- Stars: 67
- Watchers: 7
- Forks: 39
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tree-sitter-dart
This is a tree-sitter grammar written for the dart programming language. We attempt to adhere as closely as possible to the dart language spec. Initially it was 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`