native test framework

This commit is contained in:
2026-07-17 22:36:17 +02:00
parent cedc63b28b
commit b09787029d
23 changed files with 141197 additions and 139688 deletions
+16
View File
@@ -40,7 +40,9 @@ module.exports = grammar({
_top_level_declaration: $ => choice(
$.import_declaration,
$.test_import_declaration,
$.function_declaration,
$.test_declaration,
$.type_declaration,
$.global_constant_declaration,
$.global_variable_declaration,
@@ -53,6 +55,20 @@ module.exports = grammar({
field('path', $.string),
),
test_import_declaration: $ => seq(
'test',
'import',
repeat($._newline),
field('path', $.string),
),
test_declaration: $ => seq(
field('name', $.identifier),
'test',
repeat($._newline),
field('body', $.block),
),
function_declaration: $ => seq(
optional('hide'),
field('name', $.identifier),