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 Simple Map
================== ==================
map { {
answer = 42 answer = 42
} }
@ -22,7 +22,7 @@ map {
Map Assignment Map Assignment
================== ==================
x = map { {
answer = 42 answer = 42
} }
@ -32,15 +32,11 @@ x = map {
(item (item
(statement (statement
(expression (expression
(assignment (value
(identifier) (map
(statement (identifier)
(expression (value
(value (integer))))))))
(map
(identifier)
(value
(integer)))))))))))
================== ==================
Map Access Map Access

View File

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

View File

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

View File

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

View File

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

19454
src/parser.c

File diff suppressed because it is too large Load Diff