Skip to content

CodeAnt-AI/tree-sitter-dart

This branch is 3 commits ahead of, 2 commits behind UserNobody14/tree-sitter-dart:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 12, 2025
f335f32 · Feb 12, 2025
Mar 31, 2024
May 21, 2022
Sep 1, 2024
Nov 3, 2024
Sep 1, 2024
Nov 3, 2024
Jun 9, 2023
Apr 6, 2024
Aug 10, 2024
Aug 10, 2024
Apr 6, 2024
Nov 3, 2023
Aug 10, 2024
Aug 10, 2024
May 4, 2023
May 4, 2023
Aug 10, 2024
Nov 17, 2024
May 4, 2023
Aug 10, 2024
Sep 1, 2024
Apr 27, 2024
Feb 12, 2025
May 14, 2023
Aug 10, 2024
Aug 10, 2024
Mar 31, 2024
Jul 13, 2020
May 21, 2022
Aug 10, 2024

Repository files navigation

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

About

Attempt to make a tree-sitter grammar for dart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 43.3%
  • JavaScript 36.0%
  • GAP 15.7%
  • Scheme 2.1%
  • HTML 1.5%
  • C 1.3%
  • Shell 0.1%