diff --git a/.github/workflows/tree-sitter.yaml b/.github/workflows/tree-sitter.yaml index 7931a39..fc78226 100644 --- a/.github/workflows/tree-sitter.yaml +++ b/.github/workflows/tree-sitter.yaml @@ -4,6 +4,7 @@ on: push: branches: [master] paths: + - .github/workflows/** - grammar.js - src/** - test/** @@ -11,6 +12,7 @@ on: - binding.gyp pull_request: paths: + - .github/workflows/** - grammar.js - src/** - test/** @@ -41,4 +43,9 @@ jobs: test-node: true test-python: true test-go: true - test-swift: true + test-swift: false + - name: Parse examples + uses: tree-sitter/parse-action@v4 + with: + files: | + examples/**/*.bff diff --git a/Package.swift b/Package.swift index 5bbeff6..9e05170 100644 --- a/Package.swift +++ b/Package.swift @@ -35,7 +35,7 @@ let package = Package( ], sources: [ "src/parser.c", - // NOTE: if your language has an external scanner, add it here. + "src/scanner.c", ], resources: [ .copy("queries") diff --git a/bindings/go/binding.go b/bindings/go/binding.go index eb648e9..14c2e58 100644 --- a/bindings/go/binding.go +++ b/bindings/go/binding.go @@ -2,7 +2,7 @@ package tree_sitter_fastbuild // #cgo CFLAGS: -std=c11 -fPIC // #include "../../src/parser.c" -// // NOTE: if your language has an external scanner, add it here. +// #include "../../src/scanner.c" import "C" import "unsafe" diff --git a/setup.py b/setup.py index c22bc0c..f2d6fbf 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ def get_tag(self): sources=[ "bindings/python/tree_sitter_fastbuild/binding.c", "src/parser.c", - # NOTE: if your language uses an external scanner, add it here. + "src/scanner.c", ], extra_compile_args=[ "-std=c11", diff --git a/src/scanner.c b/src/scanner.c index d4ea4de..86b5bda 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1,4 +1,4 @@ -#include +#include "tree_sitter/parser.h" #include enum TokenType {