⬆️ tree-sitter-cli
This commit is contained in:
parent
521103931f
commit
10dafb5f94
|
@ -13,7 +13,7 @@ install:
|
||||||
- npm install
|
- npm install
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- npm test
|
- npm run test-windows
|
||||||
|
|
||||||
build: off
|
build: off
|
||||||
|
|
||||||
|
|
15
package.json
15
package.json
|
@ -13,9 +13,18 @@
|
||||||
"nan": "^2.11.1"
|
"nan": "^2.11.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tree-sitter-cli": "^0.13.10"
|
"tree-sitter-cli": "^0.14.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tree-sitter test && tree-sitter parse examples --quiet --time"
|
"test": "tree-sitter test && tree-sitter parse examples/*.css --quiet --time",
|
||||||
}
|
"test-windows": "tree-sitter test"
|
||||||
|
},
|
||||||
|
"tree-sitter": [
|
||||||
|
{
|
||||||
|
"scope": "source.css",
|
||||||
|
"file-types": ["css"],
|
||||||
|
"injection-regex": "^css$",
|
||||||
|
"highlights": "src/highlights.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,19 +10,19 @@ universal_selector {
|
||||||
scope: 'tag';
|
scope: 'tag';
|
||||||
}
|
}
|
||||||
|
|
||||||
sibling_selector > "~",
|
sibling_selector > [token="~"],
|
||||||
child_selector > ">",
|
child_selector > [token=">"],
|
||||||
adjacent_sibling_selector > "+" {
|
adjacent_sibling_selector > [token="+"] {
|
||||||
scope: 'operator';
|
scope: 'operator';
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute_selector > {
|
attribute_selector > {
|
||||||
& > "=",
|
& > [token="="],
|
||||||
& > "^=",
|
& > [token="^="],
|
||||||
& > "|=",
|
& > [token="|="],
|
||||||
& > "~=",
|
& > [token="~="],
|
||||||
& > "$=",
|
& > [token="$="],
|
||||||
& > "*=" {
|
& > [token="*="] {
|
||||||
scope: 'operator';
|
scope: 'operator';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ function_name {
|
||||||
|
|
||||||
property_name,
|
property_name,
|
||||||
plain_value {
|
plain_value {
|
||||||
&:text('^--') {
|
&[text='^--'] {
|
||||||
scope: 'variable';
|
scope: 'variable';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,12 +67,12 @@ attribute_name {
|
||||||
scope: 'attribute';
|
scope: 'attribute';
|
||||||
}
|
}
|
||||||
|
|
||||||
"@media",
|
[token="@media"],
|
||||||
"@import",
|
[token="@import"],
|
||||||
"@charset",
|
[token="@charset"],
|
||||||
"@namespace",
|
[token="@namespace"],
|
||||||
"@supports",
|
[token="@supports"],
|
||||||
"@keyframes",
|
[token="@keyframes"],
|
||||||
at_keyword,
|
at_keyword,
|
||||||
to,
|
to,
|
||||||
from,
|
from,
|
||||||
|
@ -121,20 +121,20 @@ feature_name {
|
||||||
scope: 'property';
|
scope: 'property';
|
||||||
}
|
}
|
||||||
|
|
||||||
color_value > "#",
|
color_value > [token="#"],
|
||||||
id_selector > "#",
|
id_selector > [token="#"],
|
||||||
selectors > "," {
|
selectors > [token=","] {
|
||||||
scope: 'punctuation.delimiter';
|
scope: 'punctuation.delimiter';
|
||||||
}
|
}
|
||||||
|
|
||||||
"and",
|
[token="and"],
|
||||||
"or",
|
[token="or"],
|
||||||
"not",
|
[token="not"],
|
||||||
"only",
|
[token="only"],
|
||||||
keyword_query,
|
keyword_query,
|
||||||
binary_expression > "+",
|
binary_expression > [token="+"],
|
||||||
binary_expression > "-",
|
binary_expression > [token="-"],
|
||||||
binary_expression > "/",
|
binary_expression > [token="/"],
|
||||||
binary_expression > "*" {
|
binary_expression > [token="*"] {
|
||||||
scope: 'operator';
|
scope: 'operator';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1740,3 +1740,4 @@
|
||||||
"_block_item"
|
"_block_item"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -13,7 +13,7 @@ extern "C" {
|
||||||
#define ts_builtin_sym_end 0
|
#define ts_builtin_sym_end 0
|
||||||
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
|
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
|
||||||
|
|
||||||
#ifndef TREE_SITTER_RUNTIME_H_
|
#ifndef TREE_SITTER_API_H_
|
||||||
typedef uint16_t TSSymbol;
|
typedef uint16_t TSSymbol;
|
||||||
typedef struct TSLanguage TSLanguage;
|
typedef struct TSLanguage TSLanguage;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue