feat(properties): update parser & queries

This commit is contained in:
ObserverOfTime 2024-02-23 17:21:26 +02:00
parent e159a531e5
commit e105b5e67d
4 changed files with 15 additions and 9 deletions

View file

@ -340,7 +340,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [printf](https://github.com/ObserverOfTime/tree-sitter-printf) (maintained by @ObserverOfTime)
- [x] [prisma](https://github.com/victorhqc/tree-sitter-prisma) (maintained by @elianiva)
- [x] [promql](https://github.com/MichaHoffmann/tree-sitter-promql) (maintained by @MichaHoffmann)
- [x] [properties](https://github.com/ObserverOfTime/tree-sitter-properties) (maintained by @ObserverOfTime)
- [x] [properties](https://github.com/tree-sitter-grammars/tree-sitter-properties) (maintained by @ObserverOfTime)
- [x] [proto](https://github.com/treywood/tree-sitter-proto) (maintained by @treywood)
- [x] [prql](https://github.com/PRQL/tree-sitter-prql) (maintained by @matthias-Q)
- [x] [psv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq)

View file

@ -501,7 +501,7 @@
"revision": "77625d78eebc3ffc44d114a07b2f348dff3061b0"
},
"properties": {
"revision": "74e5d3c63d0da17c0800b3cf9090b24637ef6b59"
"revision": "189b3cc18d36871c27ebb0adcf0cddd123b0cbba"
},
"proto": {
"revision": "e9f6b43f6844bd2189b50a422d4e2094313f6aa3"

View file

@ -1484,8 +1484,8 @@ list.promql = {
list.properties = {
install_info = {
url = "https://github.com/ObserverOfTime/tree-sitter-properties",
files = { "src/parser.c" },
url = "https://github.com/tree-sitter-grammars/tree-sitter-properties",
files = { "src/parser.c", "src/scanner.c" },
},
filetype = "jproperties",
maintainers = { "@ObserverOfTime" },

View file

@ -13,7 +13,17 @@
((value) @number
(#lua-match? @number "^%d+$"))
(index) @number
((index) @number
(#lua-match? @number "^%d+$"))
((substitution
(key) @constant)
(#lua-match? @constant "^[A-Z_][A-Z0-9_]*$"))
(substitution
(key) @function
"::" @punctuation.special
(secret) @constant.macro)
(property
[
@ -38,7 +48,3 @@
"."
"\\"
] @punctuation.delimiter
((substitution
(key) @constant)
(#lua-match? @constant "^[A-Z_][A-Z0-9_]*$"))