simple type annotations (fix), test fix

This commit is contained in:
ProgramSnail 2024-02-23 15:51:10 +03:00
parent cbd923d0f1
commit 6a251945e6
2 changed files with 3 additions and 3 deletions

View file

@ -133,7 +133,7 @@ Fruit = @apple Unit
: function that takes array reference argument
bubble_sort 'arr : <> Array['A] {
swap_occured := true;
$ swap_occured := true;
@ swap_occured => {
swap_occured = false;
@ %i : 0 .. 'arr.size => (?? 'arr[i] > 'arr[i + 1] => swap 'arr[i] 'arr[i + 1], swap_occured = true);
@ -799,7 +799,7 @@ array_function_test 'x : Int [[ 'x (do_something 'x) (T 'x)]]
(block
(empty_lines)
(match
(name_expression
(name_definition
(simple_name_identifier))
(case
(bool_literal)))

View file

@ -236,7 +236,7 @@ module.exports = grammar({
simple_type: $ => seq(
field('name', $._type_identifier),
optional(seq('[', repeat1($._scoped_type), ']'))
optional(seq('[', repeat1($._annotated_type), ']'))
),
_type: $ => choice(