Add delimiter node (#147)

Signed-off-by: Jonas Dujava <jonas.dujava@gmail.com>
pull/813/head
Jonáš Dujava 2024-07-20 21:37:17 +07:00 committed by GitHub
parent 107435ada4
commit d018f2e662
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 23 additions and 4 deletions

@ -375,6 +375,7 @@ module.exports = grammar({
$.operator, $.operator,
$.word, $.word,
$.placeholder, $.placeholder,
$.delimiter,
$.block_comment, $.block_comment,
$._command, $._command,
$.superscript, $.superscript,
@ -384,10 +385,12 @@ module.exports = grammar({
), ),
), ),
word: $ => /[^\s\\%\{\},\$\[\]\(\)=\#_\^\-\+\/\*]+/, word: $ => /[^\s\\%\{\},\$\[\]\(\)=\#&_\^\-\+\/\*]+/,
placeholder: $ => /#\d/, placeholder: $ => /#\d/,
delimiter: $ => /&/,
path: $ => /[^\*\"\[\]:;,\|\{\}<>]+/, path: $ => /[^\*\"\[\]:;,\|\{\}<>]+/,
uri: $ => /[^\[\]\{\}]+/, uri: $ => /[^\[\]\{\}]+/,

@ -1641,6 +1641,10 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "placeholder" "name": "placeholder"
}, },
{
"type": "SYMBOL",
"name": "delimiter"
},
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "block_comment" "name": "block_comment"
@ -1664,12 +1668,16 @@
}, },
"word": { "word": {
"type": "PATTERN", "type": "PATTERN",
"value": "[^\\s\\\\%\\{\\},\\$\\[\\]\\(\\)=\\#_\\^\\-\\+\\/\\*]+" "value": "[^\\s\\\\%\\{\\},\\$\\[\\]\\(\\)=\\#&_\\^\\-\\+\\/\\*]+"
}, },
"placeholder": { "placeholder": {
"type": "PATTERN", "type": "PATTERN",
"value": "#\\d" "value": "#\\d"
}, },
"delimiter": {
"type": "PATTERN",
"value": "&"
},
"path": { "path": {
"type": "PATTERN", "type": "PATTERN",
"value": "[^\\*\\\"\\[\\]:;,\\|\\{\\}<>]+" "value": "[^\\*\\\"\\[\\]:;,\\|\\{\\}<>]+"

@ -7513,6 +7513,10 @@
"type": "color_set_definition", "type": "color_set_definition",
"named": true "named": true
}, },
{
"type": "delimiter",
"named": true
},
{ {
"type": "environment_definition", "type": "environment_definition",
"named": true "named": true
@ -9262,6 +9266,10 @@
"type": "comment", "type": "comment",
"named": true "named": true
}, },
{
"type": "delimiter",
"named": true
},
{ {
"type": "letter", "type": "letter",
"named": true "named": true

@ -477,7 +477,7 @@ Let
(word)))) (word))))
(text (text
(word) (word)
(word)) (delimiter))
(text (text
(word) (word)
(superscript (superscript
@ -493,7 +493,7 @@ Let
(word)))) (word))))
(text (text
(word) (word)
(word)) (delimiter))
(text (text
(word) (word)
(superscript (superscript