Implement addition
This commit is contained in:
parent
8c05154e43
commit
24419e4fba
@ -1 +1 @@
|
||||
Subproject commit 1f829d930a8a5d4683ac41c6a2085c5f482868cd
|
||||
Subproject commit 3b0b9d044ee77c8d180bd482a9bae23e9ffadcd5
|
@ -1,4 +1,4 @@
|
||||
raw_data = download("https://api.sampleapis.com/futurama/cast");
|
||||
data = from_json(raw_data);
|
||||
raw_data = download <"https://api.sampleapis.com/futurama/cast">
|
||||
dust_data = from_json <raw_data>
|
||||
|
||||
assert_equal("Billy West", data.0.name);
|
||||
assert_equal <"Billy West", data.0.name>
|
||||
|
@ -1,12 +1,7 @@
|
||||
# Lists are created by grouping items in partheses and separating them with
|
||||
# commas.
|
||||
numbers = [1, 2 3]
|
||||
|
||||
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.
|
||||
|
||||
x = numbers.0;
|
||||
y = numbers.1;
|
||||
z = numbers.2;
|
||||
|
||||
assert_equal(x + y, z);
|
||||
assert_equal <x + y, z>
|
||||
|
@ -123,7 +123,7 @@ module.exports = grammar({
|
||||
assignment: $ => prec.right(seq(
|
||||
$.identifier,
|
||||
choice("=", "+=", "-="),
|
||||
$.expression,
|
||||
$.statement,
|
||||
)),
|
||||
|
||||
select: $ => prec.right(seq(
|
||||
|
@ -550,7 +550,7 @@
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
"name": "statement"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -8,11 +8,11 @@
|
||||
"required": true,
|
||||
"types": [
|
||||
{
|
||||
"type": "expression",
|
||||
"type": "identifier",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "identifier",
|
||||
"type": "statement",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
|
9287
src/parser.c
9287
src/parser.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user