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
|
: 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)))
|
||||||
|
|
|
||||||
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue