mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-06-18 02:30:03 +02:00
adding hexadecimal and decimal as a subtoken for integer
This commit is contained in:
parent
d0b54d61aa
commit
dabedec847
5 changed files with 146 additions and 83 deletions
27
src/grammar.json
generated
27
src/grammar.json
generated
|
|
@ -144,6 +144,15 @@
|
|||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "float"
|
||||
}
|
||||
]
|
||||
},
|
||||
"integer": {
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "decimal"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
|
|
@ -151,7 +160,7 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"integer": {
|
||||
"decimal": {
|
||||
"type": "PATTERN",
|
||||
"value": "(\\-)?[1-9]\\d*"
|
||||
},
|
||||
|
|
@ -160,8 +169,20 @@
|
|||
"value": "0[xX][0-9a-fA-F]+"
|
||||
},
|
||||
"float": {
|
||||
"type": "PATTERN",
|
||||
"value": "(\\-)?[1-9]\\d*\\.\\d+"
|
||||
"type": "TOKEN",
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "(\\-)?[1-9]\\d*"
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "\\.\\d+"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"boolean": {
|
||||
"type": "TOKEN",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue