Skip to content

Commit

Permalink
chore: fix manifests, remove tabs in highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Feb 11, 2023
1 parent 63a5c2c commit f161cfe
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-c"
description = "c grammar for the tree-sitter parsing library"
version = "0.0.1"
name = "tree-sitter-func"
description = "FunC grammar for tree-sitter"
version = "0.2.0"
authors = [
"akifoq <[email protected]>",
"Amaan Qureshi <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"eslint": "^8.33.0",
"eslint-config-google": "^0.14.0",
"tree-sitter-cli": "^0.19.5"
"tree-sitter-cli": "^0.20.0"
},
"repository": "https://github.com/akifoq/tree-sitter-func",
"scripts": {
Expand Down
23 changes: 13 additions & 10 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

[
"#pragma"
]@preproc
] @preproc

(pragma_directive [
"version"
"not-version"
"test-version-set"
] @preproc)
(pragma_directive
[
"version"
"not-version"
"test-version-set"
] @preproc)

; Functions/Methods

Expand All @@ -29,22 +30,24 @@
; Parameters

(parameter) @parameter

(function_application
arguments: [(identifier) (underscore)] @parameter)
(function_application
arguments: (tensor_expression
(identifier) @parameter))
(identifier) @parameter))
(function_application
arguments: (parenthesized_expression
(identifier) @parameter))
(identifier) @parameter))

(method_call
arguments: [(identifier) (underscore)] @parameter)
(method_call
arguments: (tensor_expression
(identifier) @parameter))
(identifier) @parameter))
(method_call
arguments: (parenthesized_expression
(identifier) @parameter))
(identifier) @parameter))

; Constants

Expand Down
1 change: 0 additions & 1 deletion script/parse-examples
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ success_percent=$(bc -l <<< "100*${success_count}/${example_count}")
printf \
"Successfully parsed %d of %d example files (%.1f%%)\n" \
$success_count "$example_count" "$success_percent"

0 comments on commit f161cfe

Please sign in to comment.