Skip to content

Commit

Permalink
feat: update bindings and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Mar 17, 2024
1 parent e3a0a7f commit 94219a5
Show file tree
Hide file tree
Showing 34 changed files with 432,260 additions and 419,923 deletions.
34 changes: 29 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,37 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[grammar.js]
quote_type = single
[*.{json,toml,yml,gyp}]
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.ino]
[*.rs]
indent_style = space
indent_size = 4

[*.{c,cc,h,ino}]
indent_style = space
indent_size = 4

[*.{py,pyi}]
indent_style = space
indent_size = 4

[*.swift]
indent_style = space
indent_size = 4

[*.go]
indent_style = tab
indent_size = 8

[Makefile]
indent_style = tab
indent_size = 8
9 changes: 7 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
* text eol=lf

src/** linguist-generated
src/*.json linguist-generated
src/parser.c linguist-generated
src/tree_sitter/* linguist-generated

bindings/** linguist-generated
binding.gyp linguist-generated
Cargo.toml linguist-generated
setup.py linguist-generated
Makefile linguist-generated
Package.swift linguist-generated
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: ["*"]
branches: [master]
paths:
- grammar.js
- src/**
Expand Down Expand Up @@ -31,15 +31,15 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up the repo
uses: tree-sitter/parser-setup-action@v1.1
uses: tree-sitter/parser-setup-action@v1.2
with:
submodules: true
node-version: ${{vars.NODE_VERSION}}
- name: Run tests
uses: tree-sitter/parser-test-action@v1.1
uses: tree-sitter/parser-test-action@v1.2
with:
test-library: ${{runner.os == 'Linux'}}
examples: examples/examples/**/*.ino
corpus-files: examples/examples/**/*.ino
fuzz:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ jobs:
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
secrets:
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
pypi:
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
secrets:
PYPI_API_TOKEN: ${{secrets.PYPI_TOKEN}}
33 changes: 30 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
node_modules/
yarn.lock
# Rust artifacts
Cargo.lock
target/

# Node artifacts
build/
target/
prebuilds/
node_modules/
*.tgz

# Swift artifacts
.build/

# Go artifacts
go.sum
_obj/

# Python artifacts
.venv/
dist/
*.egg-info
*.whl

# C artifacts
*.a
*.so
*.so.*
*.dylib
*.dll
*.pc

# Grammar volatiles
*.wasm
*.obj
*.o
15 changes: 9 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
[package]
name = "tree-sitter-arduino"
description = "arduino grammar for the tree-sitter parsing library"
version = "0.20.3"
keywords = ["incremental", "parsing", "arduino"]
description = "Arduino grammar for the tree-sitter parsing library"
version = "0.21.0"
license = "MIT"
readme = "README.md"
keywords = ["incremental", "parsing", "tree-sitter", "arduino"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter-grammars/tree-sitter-arduino"
authors = ["ObserverOfTime <[email protected]>"]
edition = "2021"
license = "MIT"
autoexamples = false

build = "bindings/rust/build.rs"
include = [
Expand All @@ -20,7 +23,7 @@ include = [
path = "bindings/rust/lib.rs"

[dependencies]
tree-sitter = "~0.20.10"
tree-sitter = "^0.22.2"

[build-dependencies]
cc = "^1.0"
cc = "^1.0.90"
109 changes: 109 additions & 0 deletions Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions Package.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-arduino)
[![crates][crates]](https://crates.io/crates/tree-sitter-arduino)
[![pypi][pypi]](https://pypi.org/project/tree-sitter-arduino/)

An extension of [tree-sitter-cpp](https://github.com/tree-sitter/tree-sitter-cpp) to support Arduino files.

Expand All @@ -24,3 +25,4 @@ An extension of [tree-sitter-cpp](https://github.com/tree-sitter/tree-sitter-cpp
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
[npm]: https://img.shields.io/npm/v/tree-sitter-arduino?logo=npm
[crates]: https://img.shields.io/crates/v/tree-sitter-arduino?logo=rust
[pypi]: https://img.shields.io/pypi/v/tree-sitter-arduino?logo=pypi&logoColor=ffd242
14 changes: 6 additions & 8 deletions binding.gyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions bindings/c/tree-sitter-arduino.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions bindings/c/tree-sitter-arduino.pc.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 94219a5

Please sign in to comment.