1
0
Fork 0
mirror of https://github.com/pnx/tree-sitter-dotenv synced 2026-06-18 02:30:03 +02:00

make string_content optional instead of matching empty values.

This commit is contained in:
Henrik Hautakoski 2024-12-12 17:23:37 +01:00
parent 4d71a8548b
commit 8c66bd3605
5 changed files with 303 additions and 257 deletions

44
src/grammar.json generated
View file

@ -104,13 +104,21 @@
"value": "'"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[^']*"
},
"named": true,
"value": "string_content"
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[^']+"
},
"named": true,
"value": "string_content"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
@ -126,13 +134,21 @@
"value": "\""
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[^\"]*"
},
"named": true,
"value": "string_content"
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[^\"]+"
},
"named": true,
"value": "string_content"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",