mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-06-18 02:30:03 +02:00
adding more number types
This commit is contained in:
parent
adc9052da5
commit
527ac2368f
5 changed files with 512 additions and 236 deletions
49
src/grammar.json
generated
49
src/grammar.json
generated
|
|
@ -75,7 +75,7 @@
|
|||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "integer"
|
||||
"name": "number"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
|
|
@ -149,6 +149,23 @@
|
|||
"value": "[^\"]*"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "integer"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "float"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "hexadecimal"
|
||||
}
|
||||
]
|
||||
},
|
||||
"integer": {
|
||||
"type": "TOKEN",
|
||||
"content": {
|
||||
|
|
@ -156,6 +173,36 @@
|
|||
"value": "(\\-)?\\d+"
|
||||
}
|
||||
},
|
||||
"float": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "(\\-)?\\d+"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "."
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "\\d+"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hexadecimal": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "0x"
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "[0-9a-fA-F]+"
|
||||
}
|
||||
]
|
||||
},
|
||||
"boolean": {
|
||||
"type": "TOKEN",
|
||||
"content": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue