mirror of
https://codeberg.org/ProgramSnail/tree-sitter-lang.git
synced 2025-12-05 22:28:43 +00:00
simple type annotations (fix), test fix
This commit is contained in:
parent
cbd923d0f1
commit
6a251945e6
2 changed files with 3 additions and 3 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue