diff --git a/.editorconfig b/.editorconfig index b3102b7..d597f8b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -38,3 +38,9 @@ indent_size = 8 [Makefile] indent_style = tab indent_size = 8 + +[parser.c] +indent_size = 2 + +[{alloc,array,parser}.h] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes index fbcebd1..7fb9f4a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,37 @@ * text=auto eol=lf +# Generated source files **/src/*.json linguist-generated **/src/parser.c linguist-generated **/src/tree_sitter/* linguist-generated + +# C bindings +bindings/c/* linguist-generated +CMakeLists.txt linguist-generated +Makefile linguist-generated + +# Rust bindings +bindings/rust/* linguist-generated +Cargo.toml linguist-generated +Cargo.lock linguist-generated + +# Node.js bindings +bindings/node/* linguist-generated +binding.gyp linguist-generated +package.json linguist-generated +package-lock.json linguist-generated + +# Python bindings +bindings/python/** linguist-generated +setup.py linguist-generated +pyproject.toml linguist-generated + +# Go bindings +bindings/go/* linguist-generated +go.mod linguist-generated +go.sum linguist-generated + +# Swift bindings +bindings/swift/** linguist-generated +Package.swift linguist-generated +Package.resolved linguist-generated diff --git a/Cargo.lock b/Cargo.lock index aab823e..694e52a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aho-corasick" @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.30" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8" dependencies = [ "shlex", ] @@ -28,9 +28,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -69,9 +69,9 @@ checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" [[package]] name = "tree-sitter" -version = "0.24.3" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9871f16d6cf5c4757dcf30d5d2172a2df6987c510c017bbb7abfb7f9aa24d06" +checksum = "b67baf55e7e1b6806063b1e51041069c90afff16afcbbccd278d899f9d84bca4" dependencies = [ "cc", "regex", diff --git a/Cargo.toml b/Cargo.toml index 9a00cd8..4cafe71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["incremental", "parsing", "tree-sitter", "dtd", "xml"] categories = ["parsing", "text-editors"] authors = [ "ObserverOfTime ", - "Amaan Qureshi " + "Amaan Qureshi ", ] repository = "https://github.com/tree-sitter-grammars/tree-sitter-xml" edition = "2021" @@ -23,6 +23,7 @@ include = [ "xml/grammar.js", "xml/src/*", "queries/*", + "tree-sitter.json", ] [lib] @@ -32,7 +33,7 @@ path = "bindings/rust/lib.rs" tree-sitter-language = "0.1" [build-dependencies] -cc = "1.1.22" +cc = "1.1" [dev-dependencies] -tree-sitter = "0.24.3" +tree-sitter = "0.24" diff --git a/bindings/c/tree-sitter-dtd.pc.in b/bindings/c/tree-sitter-dtd.pc.in index a06510e..09ec118 100644 --- a/bindings/c/tree-sitter-dtd.pc.in +++ b/bindings/c/tree-sitter-dtd.pc.in @@ -6,6 +6,5 @@ Name: tree-sitter-dtd Description: @PROJECT_DESCRIPTION@ URL: @CMAKE_PROJECT_HOMEPAGE_URL@ Version: @CMAKE_PROJECT_VERSION@ -Requires: @TS_REQUIRES@ Libs: -L${libdir} -ltree-sitter-dtd Cflags: -I${includedir} diff --git a/bindings/c/tree-sitter-xml.pc.in b/bindings/c/tree-sitter-xml.pc.in index cec432b..f8ae071 100644 --- a/bindings/c/tree-sitter-xml.pc.in +++ b/bindings/c/tree-sitter-xml.pc.in @@ -6,6 +6,5 @@ Name: tree-sitter-xml Description: @PROJECT_DESCRIPTION@ URL: @CMAKE_PROJECT_HOMEPAGE_URL@ Version: @CMAKE_PROJECT_VERSION@ -Requires: @TS_REQUIRES@ Libs: -L${libdir} -ltree-sitter-xml Cflags: -I${includedir} diff --git a/common/common.mak b/common/common.mak index 2e87e8b..9c08676 100644 --- a/common/common.mak +++ b/common/common.mak @@ -62,8 +62,7 @@ $(LANGUAGE_NAME).pc: ../bindings/c/$(LANGUAGE_NAME).pc.in -e 's|@CMAKE_INSTALL_INCLUDEDIR@|$(INCLUDEDIR:$(PREFIX)/%=%)|' \ -e 's|@PROJECT_DESCRIPTION@|$(DESCRIPTION)|' \ -e 's|@CMAKE_PROJECT_HOMEPAGE_URL@|$(HOMEPAGE_URL)|' \ - -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' \ - -e 's|@TS_REQUIRES@|$(REQUIRES)|' $< > $@ + -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' $(PARSER): $(SRC_DIR)/grammar.json $(TS) generate $^ diff --git a/go.mod b/go.mod index 361167d..41b2322 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,7 @@ module github.com/tree-sitter-grammars/tree-sitter-xml -go 1.23 +go 1.22 -toolchain go1.23.0 - -require github.com/tree-sitter/go-tree-sitter v0.23.1 +require github.com/tree-sitter/go-tree-sitter v0.24.0 require github.com/mattn/go-pointer v0.0.1 // indirect diff --git a/go.sum b/go.sum index d775361..0a48bbe 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tree-sitter/go-tree-sitter v0.23.1 h1:HCfaE19sKfG7q190xfM1loUZf6wEHa4TDqDEW46s9Lg= -github.com/tree-sitter/go-tree-sitter v0.23.1/go.mod h1:EvIVhMvvPNvhu9x+ddSPxSnUEU5AnsSwi1LMqXIVE3A= +github.com/tree-sitter/go-tree-sitter v0.24.0 h1:kRZb6aBNfcI/u0Qh8XEt3zjNVnmxTisDBN+kXK0xRYQ= +github.com/tree-sitter/go-tree-sitter v0.24.0/go.mod h1:x681iFVoLMEwOSIHA1chaLkXlroXEN7WY+VHGFaoDbk= github.com/tree-sitter/tree-sitter-c v0.21.5-0.20240818205408-927da1f210eb h1:A8425heRM8mylnv4H58FPUiH+aYivyitre0PzxrfmWs= github.com/tree-sitter/tree-sitter-c v0.21.5-0.20240818205408-927da1f210eb/go.mod h1:dOF6gtQiF9UwNh995T5OphYmtIypkjsp3ap7r9AN/iA= github.com/tree-sitter/tree-sitter-cpp v0.22.4-0.20240818224355-b1a4e2b25148 h1:AfFPZwtwGN01BW1jDdqBVqscTwetvMpydqYZz57RSlc= diff --git a/package.json b/package.json index 4612d7a..44c50ef 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "queries/**", "xml/grammar.js", "dtd/grammar.js", + "tree-sitter.json", "xml/package.json", "dtd/package.json", "xml/src/**", @@ -42,12 +43,12 @@ "common/**" ], "dependencies": { - "node-addon-api": "^8.2.1", - "node-gyp-build": "^4.8.2" + "node-addon-api": "^8.2.2", + "node-gyp-build": "^4.8.3" }, "devDependencies": { "prebuildify": "^6.0.1", - "tree-sitter-cli": "^0.24.3" + "tree-sitter-cli": "^0.24.4" }, "peerDependencies": { "tree-sitter": "^0.21.1"