Add async syntax

This commit is contained in:
Jeff 2023-10-16 16:47:43 -04:00
parent 69778781ee
commit 0f58ea5a7a
4 changed files with 4373 additions and 4420 deletions

View File

@ -2,7 +2,7 @@
Simple Async Statements
==================
async (output 'Whaddup')
async { (output 'Whaddup') }
---
@ -20,16 +20,18 @@ async (output 'Whaddup')
(string)))))))))))
==================
Complex Run Statements
Complex Async Statements
==================
async if 1 % 2 == 0 {
async {
if 1 % 2 == 0 {
(output 'true')
} else {
(output 'false')
}
} else {
(output 'false')
}
async (output 'foobar')
(output 'foobar')
}
---
@ -70,15 +72,11 @@ async (output 'foobar')
(tool)
(expression
(value
(string)))))))))))))
(item
(statement
(async
(item
(string)))))))))
(statement
(expression
(function_call
(tool)
(expression
(value
(string)))))))))))
(string)))))))))))

View File

@ -236,6 +236,6 @@ module.exports = grammar({
),
)),
async: $ => seq('async', $.item),
async: $ => seq('async', '{', $.item, '}'),
}
});

View File

@ -954,9 +954,17 @@
"type": "STRING",
"value": "async"
},
{
"type": "STRING",
"value": "{"
},
{
"type": "SYMBOL",
"name": "item"
},
{
"type": "STRING",
"value": "}"
}
]
}

File diff suppressed because it is too large Load Diff