Add float support; Write tests
This commit is contained in:
parent
954ea0928c
commit
f57570f14b
@ -1 +1 @@
|
|||||||
Subproject commit c9c7eb31737fc3ce02bed5ce0069d8e04345f00b
|
Subproject commit 3182e7c860ac74d1d4e2846152eef45c4111bd63
|
@ -21,10 +21,10 @@ module.exports = grammar({
|
|||||||
open_statement: $ => prec.left(seq($.expression)),
|
open_statement: $ => prec.left(seq($.expression)),
|
||||||
|
|
||||||
expression: $ => choice(
|
expression: $ => choice(
|
||||||
prec(0, $.value),
|
prec(0, $.control_flow),
|
||||||
prec(1, $.identifier),
|
prec(1, $.value),
|
||||||
prec(2, $.operation),
|
prec(2, $.identifier),
|
||||||
prec(3, $.control_flow),
|
prec(3, $.operation),
|
||||||
),
|
),
|
||||||
|
|
||||||
close: $ => ";",
|
close: $ => ";",
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
"value": 0,
|
"value": 0,
|
||||||
"content": {
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "value"
|
"name": "control_flow"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -96,7 +96,7 @@
|
|||||||
"value": 1,
|
"value": 1,
|
||||||
"content": {
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "identifier"
|
"name": "value"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -104,7 +104,7 @@
|
|||||||
"value": 2,
|
"value": 2,
|
||||||
"content": {
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "operation"
|
"name": "identifier"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -112,7 +112,7 @@
|
|||||||
"value": 3,
|
"value": 3,
|
||||||
"content": {
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "control_flow"
|
"name": "operation"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user