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

make no distinction between single quoted and double quoted string tokens.

This commit is contained in:
Henrik Hautakoski 2024-12-12 17:05:31 +01:00
parent dabedec847
commit 4d71a8548b
6 changed files with 105 additions and 102 deletions

40
src/grammar.json generated
View file

@ -69,10 +69,6 @@
"type": "SYMBOL",
"name": "string"
},
{
"type": "SYMBOL",
"name": "string_interpolation"
},
{
"type": "SYMBOL",
"name": "number"
@ -88,6 +84,19 @@
]
},
"string": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_string"
},
{
"type": "SYMBOL",
"name": "_literal_string"
}
]
},
"_literal_string": {
"type": "SEQ",
"members": [
{
@ -95,8 +104,13 @@
"value": "'"
},
{
"type": "SYMBOL",
"name": "string_content"
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[^']*"
},
"named": true,
"value": "string_content"
},
{
"type": "STRING",
@ -104,7 +118,7 @@
}
]
},
"string_interpolation": {
"_string": {
"type": "SEQ",
"members": [
{
@ -114,8 +128,8 @@
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "string_interpolation_content"
"type": "PATTERN",
"value": "[^\"]*"
},
"named": true,
"value": "string_content"
@ -126,14 +140,6 @@
}
]
},
"string_content": {
"type": "PATTERN",
"value": "[^']*"
},
"string_interpolation_content": {
"type": "PATTERN",
"value": "[^\"]*"
},
"number": {
"type": "CHOICE",
"members": [