From a5c15aaf1ff08f2b3fa8c81f25240a2e1a72e15a Mon Sep 17 00:00:00 2001 From: Jay Pratt Date: Tue, 8 Oct 2024 21:10:17 +1100 Subject: [PATCH] Add separators to gadts test --- .../corpus/generic_abstract_data_types.tk | 248 +++++++++++++++++- 1 file changed, 245 insertions(+), 3 deletions(-) diff --git a/tree-sitter-tako/test/corpus/generic_abstract_data_types.tk b/tree-sitter-tako/test/corpus/generic_abstract_data_types.tk index 31d1c896..2c65b8a4 100755 --- a/tree-sitter-tako/test/corpus/generic_abstract_data_types.tk +++ b/tree-sitter-tako/test/corpus/generic_abstract_data_types.tk @@ -9,7 +9,7 @@ SExpr: Type = struct.new( func: (args: [Value; n]), args: [SExpr; n], forall n: Int, -) +); // A well typed, but little, language using GADTs. Expr( @@ -36,7 +36,249 @@ Expr( // Constants: integer(value: Integer): Expr(SubExpr, R=Integer), boolean(value: Boolean): Expr(SubExpr, R=Boolean), -) +); --- - +(source_file + (shebang) + (single_line_comment) + (single_line_comment) + (sequence + (assign + (has_type + (ident) + (ident)) + (field + (ident) + (call + (ident) + (has_type + (ident) + (parens + (has_type + (ident) + (container + (sequence + (ident) + (ident)))))) + (has_type + (ident) + (container + (sequence + (ident) + (ident)))) + (has_type + (binding + (forall) + (ident)) + (ident))))) + (single_line_comment) + (sequence + (assign + (call + (ident) + (assign + (has_type + (call + (ident) + (has_type + (ident) + (ident))) + (call + (ident) + (call + (ident) + (ident) + (ident)))) + (ident)) + (has_type + (ident) + (ident)) + (assign + (binding + (forall) + (ident)) + (bit_or + (ident) + (ident)))) + (field + (ident) + (call + (ident) + (single_line_comment) + (has_type + (call + (ident) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident)))) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident)))) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident)))) + (has_type + (binding + (forall) + (ident)) + (ident))) + (call + (ident) + (ident) + (assign + (ident) + (ident)))) + (single_line_comment) + (has_type + (call + (ident) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident)))) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident))))) + (call + (ident) + (ident) + (assign + (ident) + (ident)))) + (has_type + (call + (ident) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident)))) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident))))) + (call + (ident) + (ident) + (assign + (ident) + (ident)))) + (has_type + (call + (ident) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident)))) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident))))) + (call + (ident) + (ident) + (assign + (ident) + (ident)))) + (has_type + (call + (ident) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident)))) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident))))) + (call + (ident) + (ident) + (assign + (ident) + (ident)))) + (has_type + (call + (ident) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident)))) + (has_type + (ident) + (call + (ident) + (assign + (ident) + (ident))))) + (call + (ident) + (ident) + (assign + (ident) + (ident)))) + (single_line_comment) + (has_type + (call + (ident) + (has_type + (ident) + (ident))) + (call + (ident) + (ident) + (assign + (ident) + (ident)))) + (has_type + (call + (ident) + (has_type + (ident) + (ident))) + (call + (ident) + (ident) + (assign + (ident) + (ident))))))))))