mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-06-16 14:04:57 +02:00
Update grammar to correctly produce value token
Problem was before that for example the input [0x000KKK] would produce a hexadecimal and a value token (for the respective parts) However, the more correct way is to have the whole input identified as a value token. basicly if the whole input between "=" and a special "end-of-assignment" token can't be identified as a string,bool,integer whatever. it should be identified as a value token.
This commit is contained in:
parent
e7a97e884a
commit
d0b54d61aa
8 changed files with 427 additions and 539 deletions
50
src/node-types.json
generated
50
src/node-types.json
generated
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"value": {
|
||||
"multiple": false,
|
||||
"required": true,
|
||||
"required": false,
|
||||
"types": [
|
||||
{
|
||||
"type": "boolean",
|
||||
|
|
@ -41,11 +41,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"named": true,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"type": "document",
|
||||
"named": true,
|
||||
|
|
@ -65,21 +60,6 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"named": true,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"type": "hexadecimal",
|
||||
"named": true,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"named": true,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"named": true,
|
||||
|
|
@ -137,22 +117,10 @@
|
|||
"type": "\"",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "#",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "'",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": ".",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "0x",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "=",
|
||||
"named": false
|
||||
|
|
@ -161,10 +129,26 @@
|
|||
"type": "boolean",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "hexadecimal",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "identifier",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "string_content",
|
||||
"named": true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue