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 : function that takes array reference argument
bubble_sort 'arr : <> Array['A] { bubble_sort 'arr : <> Array['A] {
swap_occured := true; $ swap_occured := true;
@ swap_occured => { @ swap_occured => {
swap_occured = false; swap_occured = false;
@ %i : 0 .. 'arr.size => (?? 'arr[i] > 'arr[i + 1] => swap 'arr[i] 'arr[i + 1], swap_occured = true); @ %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 (block
(empty_lines) (empty_lines)
(match (match
(name_expression (name_definition
(simple_name_identifier)) (simple_name_identifier))
(case (case
(bool_literal))) (bool_literal)))

View file

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