Implement addition

This commit is contained in:
Jeff 2023-10-01 02:43:42 -04:00
parent 8c05154e43
commit 24419e4fba
7 changed files with 4653 additions and 4665 deletions

@ -1 +1 @@
Subproject commit 1f829d930a8a5d4683ac41c6a2085c5f482868cd Subproject commit 3b0b9d044ee77c8d180bd482a9bae23e9ffadcd5

View File

@ -1,4 +1,4 @@
raw_data = download("https://api.sampleapis.com/futurama/cast"); raw_data = download <"https://api.sampleapis.com/futurama/cast">
data = from_json(raw_data); dust_data = from_json <raw_data>
assert_equal("Billy West", data.0.name); assert_equal <"Billy West", data.0.name>

View File

@ -1,12 +1,7 @@
# Lists are created by grouping items in partheses and separating them with numbers = [1, 2 3]
# commas.
numbers = (1, 2, 3); x = numbers.0
y = numbers.1
z = numbers.2
# To access the values in a list, use an integer as an index. assert_equal <x + y, z>
x = numbers.0;
y = numbers.1;
z = numbers.2;
assert_equal(x + y, z);

View File

@ -123,7 +123,7 @@ module.exports = grammar({
assignment: $ => prec.right(seq( assignment: $ => prec.right(seq(
$.identifier, $.identifier,
choice("=", "+=", "-="), choice("=", "+=", "-="),
$.expression, $.statement,
)), )),
select: $ => prec.right(seq( select: $ => prec.right(seq(

View File

@ -550,7 +550,7 @@
}, },
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "expression" "name": "statement"
} }
] ]
} }

View File

@ -8,11 +8,11 @@
"required": true, "required": true,
"types": [ "types": [
{ {
"type": "expression", "type": "identifier",
"named": true "named": true
}, },
{ {
"type": "identifier", "type": "statement",
"named": true "named": true
} }
] ]

File diff suppressed because it is too large Load Diff