native test framework
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user