Add float support; Write tests

This commit is contained in:
Jeff 2023-09-29 08:22:00 -04:00
parent 954ea0928c
commit f57570f14b
3 changed files with 9 additions and 9 deletions

@ -1 +1 @@
Subproject commit c9c7eb31737fc3ce02bed5ce0069d8e04345f00b Subproject commit 3182e7c860ac74d1d4e2846152eef45c4111bd63

View File

@ -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: $ => ";",

View File

@ -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"
} }
} }
] ]