这是indexloc提供的服务,不要输入任何密码
Skip to content

samwdp/tree-sitter-go

 
 

Repository files navigation

tree-sitter-go

Build/test

A tree-sitter grammar for Go.

Run tree-sitter generate to create a new parser after editing grammar.js. This step will report any ambiguities.

Run npm test to test your changes to the grammar or tests.

The corpus/*.txt files contain input/output pairs, where the input is Go source and the output is the expected parse tree in S-expression form. Run tree-sitter test --update to update the expectations to match the current behavior.

The examples/ tree contains valid Go source files that are expected to parse without error.

About

Go grammar for tree-sitter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 62.1%
  • Scheme 13.1%
  • Makefile 10.9%
  • Rust 8.0%
  • Shell 2.8%
  • C++ 2.3%
  • Python 0.8%