Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Attempt to make a tree-sitter grammar for dart

License

Notifications You must be signed in to change notification settings

ast-grep/tree-sitter-dart

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

23e3921 · Jan 23, 2023
May 21, 2022
Jan 19, 2023
May 21, 2022
Jan 23, 2023
Jan 23, 2023
Nov 14, 2020
Jan 19, 2023
Jan 19, 2023
Jan 23, 2023
Apr 7, 2022
Jul 5, 2020
Mar 7, 2021
Jan 23, 2023
Jan 19, 2023
Jul 13, 2020
May 21, 2022
Jan 23, 2023

Repository files navigation

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

About

Attempt to make a tree-sitter grammar for dart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.6%
  • JavaScript 2.0%
  • HTML 0.1%
  • Scheme 0.1%
  • Rust 0.1%
  • Dart 0.1%