Skip to content

Commit

Permalink
test: trigger workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Feb 13, 2024
1 parent e6f7dc3 commit 3c33761
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "tree-sitter-TCL"
name = "tree-sitter-tcl"
description = "TCL grammar for the tree-sitter parsing library"
version = "0.0.1"
version = "1.0.0"
keywords = ["incremental", "parsing", "TCL"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-TCL"
repository = "https://github.com/tree-sitter/tree-sitter-tcl"
edition = "2018"
license = "MIT"

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

[dependencies]
tree-sitter = "~0.20.3"
tree-sitter = "~0.20.8"

[build-dependencies]
cc = "1.0"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ src/parser.c: grammar.js
tree-sitter generate

test:
tree-sitter parse test.tcl
tree-sitter test
3 changes: 1 addition & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"targets": [
{
"target_name": "tree_sitter_TCL_binding",
"target_name": "tree_sitter_tcl_binding",
"include_dirs": [
"<!(node -e \"require('nan')\")",
"src"
],
"sources": [
"bindings/node/binding.cc",
"src/parser.c",
# If your language uses an external scanner, add it here.
],
"cflags_c": [
"-std=c99",
Expand Down
8 changes: 4 additions & 4 deletions bindings/node/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace v8;

extern "C" TSLanguage * tree_sitter_TCL();
extern "C" TSLanguage * tree_sitter_tcl();

namespace {

Expand All @@ -17,12 +17,12 @@ void Init(Local<Object> exports, Local<Object> module) {

Local<Function> constructor = Nan::GetFunction(tpl).ToLocalChecked();
Local<Object> instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked();
Nan::SetInternalFieldPointer(instance, 0, tree_sitter_TCL());
Nan::SetInternalFieldPointer(instance, 0, tree_sitter_tcl());

Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("TCL").ToLocalChecked());
Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("tcl").ToLocalChecked());
Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance);
}

NODE_MODULE(tree_sitter_TCL_binding, Init)
NODE_MODULE(tree_sitter_tcl_binding, Init)

} // namespace
4 changes: 2 additions & 2 deletions bindings/node/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
try {
module.exports = require("../../build/Release/tree_sitter_TCL_binding");
module.exports = require("../../build/Release/tree_sitter_tcl_binding");
} catch (error1) {
if (error1.code !== 'MODULE_NOT_FOUND') {
throw error1;
}
try {
module.exports = require("../../build/Debug/tree_sitter_TCL_binding");
module.exports = require("../../build/Debug/tree_sitter_tcl_binding");
} catch (error2) {
if (error2.code !== 'MODULE_NOT_FOUND') {
throw error2;
Expand Down
6 changes: 3 additions & 3 deletions bindings/rust/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! ```
//! let code = "";
//! let mut parser = tree_sitter::Parser::new();
//! parser.set_language(tree_sitter_TCL::language()).expect("Error loading TCL grammar");
//! parser.set_language(tree_sitter_tcl::language()).expect("Error loading TCL grammar");
//! let tree = parser.parse(code, None).unwrap();
//! ```
//!
Expand All @@ -18,14 +18,14 @@
use tree_sitter::Language;

extern "C" {
fn tree_sitter_TCL() -> Language;
fn tree_sitter_tcl() -> Language;
}

/// Get the tree-sitter [Language][] for this grammar.
///
/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html
pub fn language() -> Language {
unsafe { tree_sitter_TCL() }
unsafe { tree_sitter_tcl() }
}

/// The content of the [`node-types.json`][] file for this grammar.
Expand Down
1 change: 1 addition & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,5 @@ module.exports = grammar({

simple_word: _ => token(/[^!$\s\\\[\]{}();"]+/),
}

});
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Treesitter parser for TCL",
"main": "bindings/node",
"keywords": [
"tree-sitter",
"parser",
"lexer",
"tcl"
Expand All @@ -13,9 +14,10 @@
"url": "https://github.com/tree-sitter-grammars/tree-sitter-tcl.git"
},
"scripts": {
"generate": "tree-sitter generate",
"parse": "tree-sitter parse",
"lint": "eslint grammar.js",
"test": "tree-sitter test",
"test-windows": "tree-sitter test"
"test": "tree-sitter test"
},
"author": "Lewis Russell <[email protected]>",
"license": "MIT",
Expand Down
1 change: 0 additions & 1 deletion src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -1604,4 +1604,3 @@
],
"supertypes": []
}

0 comments on commit 3c33761

Please sign in to comment.