-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!(deps): Update tree-sitter bindings to v0.23.0
Update to tree-sitter v0.23.0. The change contains breaking changes, which are explained in the links below. What the update does is: it removes the dependency on tree-sitter from the bindings. Now clients can chose their own tree-sitter version to use the bindings with. Most changes are form the auto-updated bindings. This commit also fixes the Go build. See - alex-pinkus/tree-sitter-swift#435 - tree-sitter/tree-sitter#3069
- Loading branch information
Showing
25 changed files
with
316 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ log.html | |
target/ | ||
|
||
*.so | ||
|
||
# via Python bindings | ||
tree_sitter_cds.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "tree-sitter-cds" | ||
description = "CAP CDS grammar for the tree-sitter parsing library" | ||
version = "1.0.0" | ||
version = "2.0.0" | ||
authors = [ "Andre Meyering <[email protected]>" ] | ||
license = "Apache-2.0" | ||
keywords = ["incremental", "parsing", "cds"] | ||
|
@@ -23,7 +23,10 @@ include = [ | |
path = "bindings/rust/lib.rs" | ||
|
||
[dependencies] | ||
tree-sitter = "~0.22.5" | ||
tree-sitter-language = "0.1.0" | ||
|
||
[dev-dependencies] | ||
tree-sitter = "0.23.0" | ||
|
||
[build-dependencies] | ||
cc = "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VERSION := 1.0.0 | ||
VERSION := 2.0.0 | ||
|
||
LANGUAGE_NAME := tree-sitter-cds | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/// <reference types="node" /> | ||
|
||
const assert = require("node:assert"); | ||
const { test } = require("node:test"); | ||
|
||
test("can load grammar", () => { | ||
const parser = new (require("tree-sitter"))(); | ||
assert.doesNotThrow(() => parser.setLanguage(require("."))); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from unittest import TestCase | ||
|
||
import tree_sitter, tree_sitter_cds | ||
|
||
|
||
class TestLanguage(TestCase): | ||
def test_can_load_grammar(self): | ||
try: | ||
tree_sitter.Language(tree_sitter_cds.language()) | ||
except Exception: | ||
self.fail("Error loading CDS grammar") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
bindings/swift/TreeSitterCdsTests/TreeSitterCdsTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import XCTest | ||
import SwiftTreeSitter | ||
import TreeSitterCds | ||
|
||
final class TreeSitterCdsTests: XCTestCase { | ||
func testCanLoadGrammar() throws { | ||
let parser = Parser() | ||
let language = Language(language: tree_sitter_cds()) | ||
XCTAssertNoThrow(try parser.setLanguage(language), | ||
"Error loading CDS grammar") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module github.com/cap-js-community/tree-sitter-cds | ||
|
||
go 1.23 | ||
|
||
require github.com/tree-sitter/go-tree-sitter v0.23.1 | ||
|
||
require github.com/mattn/go-pointer v0.0.1 // indirect |
Oops, something went wrong.