This commit is contained in:
ProgramSnail 2023-08-14 10:15:58 +03:00
parent 754d207af5
commit ec4a2fc64b
3 changed files with 76 additions and 84 deletions

View file

@ -53,7 +53,7 @@ module.exports = grammar({
)),
optional(seq(
':',
choice($.function_type, $._annotated_type),
repeat1($._annotated_type),
)),
choice(seq('=', choice(prec(2, choice($.block, $.array)), seq($._super_expression, ';'))), ';'),
),
@ -223,8 +223,10 @@ module.exports = grammar({
),
function_type: $ => seq(
'((',
$._annotated_type,
repeat1($._annotated_type),
'))',
),
// add annotations to in all types ??
@ -263,7 +265,7 @@ module.exports = grammar({
$.tuple_type,
//$.function_type,
), ')'),
seq('((', $.function_type, '))'),
$.function_type,
),
// --- comments