Fix errors; Remove map keyword

This commit is contained in:
Jeff 2023-10-05 08:42:52 -04:00
parent 0797a60677
commit e6d83563ec
7 changed files with 9705 additions and 9801 deletions

@ -1 +1 @@
Subproject commit 7fa5dd0f54e389052274affd8237040af545b938
Subproject commit f30dfe64313e6d056241a18860f76653a8dd11e3

View File

@ -2,7 +2,7 @@
Simple Map
==================
map {
{
answer = 42
}
@ -22,7 +22,7 @@ map {
Map Assignment
==================
x = map {
{
answer = 42
}
@ -30,17 +30,13 @@ x = map {
(root
(item
(statement
(expression
(assignment
(identifier)
(statement
(expression
(value
(map
(identifier)
(value
(integer)))))))))))
(integer))))))))
==================
Map Access

View File

@ -1,13 +1,10 @@
# Dust is data-oriented, so variables are declared with minimal syntax. A
# single character, the assignment operator (`=`), sets a variable.
x = 1;
y = "hello dust!";
z = 42.0;
list = (3, 2, x);
big_list = (x, y, z, list);
map.x = "foobar";
function = '
message = "I am a function!";
output message;
';
x = 1
y = "hello dust!"
z = 42.0
list = (3, 2, x)
big_list = (x, y, z, list)
foo = {
x = "bar"
y = 42
z = 0
}

View File

@ -93,7 +93,6 @@ module.exports = grammar({
),
map: $ => seq(
'map',
'{',
repeat(seq($.identifier, "=", $.value)),
'}',

View File

@ -411,10 +411,6 @@
"map": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "map"
},
{
"type": "STRING",
"value": "{"

View File

@ -611,10 +611,6 @@
"type": "loop",
"named": false
},
{
"type": "map",
"named": false
},
{
"type": "match",
"named": false

19454
src/parser.c

File diff suppressed because it is too large Load Diff