tree-sitter-gitattributes
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -166,3 +166,6 @@ /** | ||
attribute: $ => choice( | ||
$._attr_with_value, | ||
seq( | ||
choice($.attr_name, $.builtin_attr), | ||
$._attr_value | ||
), | ||
$._prefixed_attr | ||
@@ -177,6 +180,8 @@ ), | ||
choice($.attr_name, $.builtin_attr), | ||
prec(-1, optional( | ||
alias($._attr_value, $.ignored_value) | ||
)) | ||
), | ||
_attr_with_value: $ => seq( | ||
choice($.attr_name, $.builtin_attr), | ||
_attr_value: $ => seq( | ||
alias('=', $.attr_set), | ||
@@ -183,0 +188,0 @@ choice( |
{ | ||
"name": "tree-sitter-gitattributes", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"license": "MIT", | ||
@@ -12,10 +12,14 @@ "description": "gitattributes grammar for tree-sitter", | ||
}, | ||
"funding": { | ||
"url": "https://github.com/sponsors/ObserverOfTime", | ||
"type": "github" | ||
}, | ||
"keywords": [ | ||
"tree-sitter", | ||
"parser", | ||
"lexer" | ||
"lexer", | ||
"gitattributes" | ||
], | ||
"scripts": { | ||
"generate": "tree-sitter generate", | ||
"highlight": "tree-sitter highlight", | ||
"build": "tree-sitter generate --no-bindings", | ||
"parse": "tree-sitter parse", | ||
@@ -29,3 +33,3 @@ "test": "tree-sitter test" | ||
"devDependencies": { | ||
"tree-sitter-cli": "~0.20.8" | ||
"tree-sitter-cli": "~0.21.0" | ||
}, | ||
@@ -35,2 +39,3 @@ "tree-sitter": [ | ||
"scope": "source.gitattributes", | ||
"highlights": "queries/highlights.scm", | ||
"file-types": [ | ||
@@ -37,0 +42,0 @@ ".gitattributes", |
@@ -6,2 +6,4 @@ # tree-sitter-gitattributes | ||
[![matrix][matrix]](https://matrix.to/#/#nvim-treesitter:matrix.org) | ||
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-gitattributes) | ||
[![crates][crates]](https://crates.io/crates/tree-sitter-gitattributes) | ||
@@ -29,1 +31,3 @@ A tree-sitter parser for `.gitattributes` files. | ||
[matrix]: https://img.shields.io/matrix/nvim-treesitter%3Amatrix.org?logo=matrix&label=nvim-treesitter | ||
[npm]: https://img.shields.io/npm/v/tree-sitter-gitattributes?logo=npm | ||
[crates]: https://img.shields.io/crates/v/tree-sitter-gitattributes?logo=rust |
@@ -709,4 +709,22 @@ { | ||
{ | ||
"type": "SYMBOL", | ||
"name": "_attr_with_value" | ||
"type": "SEQ", | ||
"members": [ | ||
{ | ||
"type": "CHOICE", | ||
"members": [ | ||
{ | ||
"type": "SYMBOL", | ||
"name": "attr_name" | ||
}, | ||
{ | ||
"type": "SYMBOL", | ||
"name": "builtin_attr" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "SYMBOL", | ||
"name": "_attr_value" | ||
} | ||
] | ||
}, | ||
@@ -765,22 +783,30 @@ { | ||
] | ||
}, | ||
{ | ||
"type": "PREC", | ||
"value": -1, | ||
"content": { | ||
"type": "CHOICE", | ||
"members": [ | ||
{ | ||
"type": "ALIAS", | ||
"content": { | ||
"type": "SYMBOL", | ||
"name": "_attr_value" | ||
}, | ||
"named": true, | ||
"value": "ignored_value" | ||
}, | ||
{ | ||
"type": "BLANK" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"_attr_with_value": { | ||
"_attr_value": { | ||
"type": "SEQ", | ||
"members": [ | ||
{ | ||
"type": "CHOICE", | ||
"members": [ | ||
{ | ||
"type": "SYMBOL", | ||
"name": "attr_name" | ||
}, | ||
{ | ||
"type": "SYMBOL", | ||
"name": "builtin_attr" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "ALIAS", | ||
@@ -994,2 +1020,1 @@ "content": { | ||
} | ||
@@ -40,2 +40,6 @@ [ | ||
{ | ||
"type": "ignored_value", | ||
"named": true | ||
}, | ||
{ | ||
"type": "string_value", | ||
@@ -94,2 +98,25 @@ "named": true | ||
{ | ||
"type": "ignored_value", | ||
"named": true, | ||
"fields": {}, | ||
"children": { | ||
"multiple": true, | ||
"required": true, | ||
"types": [ | ||
{ | ||
"type": "attr_set", | ||
"named": true | ||
}, | ||
{ | ||
"type": "boolean_value", | ||
"named": true | ||
}, | ||
{ | ||
"type": "string_value", | ||
"named": true | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "macro_def", | ||
@@ -96,0 +123,0 @@ "named": true, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
159600
24
1646
32