-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Test a bunch of non-obvious multiline situations (will try to …
…expand this as much as possible)
- Loading branch information
Showing
1 changed file
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
=== | ||
Multiline tests | ||
=== | ||
|
||
[ | ||
1, | ||
2, | ||
3, | ||
] | ||
|
||
fn params_over_multiple_lines( | ||
param1, | ||
param2, | ||
param3, | ||
) { | ||
} | ||
|
||
{ print "inside block" } print "outside block" | ||
print "outside block" { print "inside block" } | ||
|
||
return; return pure fn test {} | ||
|
||
--- | ||
|
||
(source_file | ||
(statement | ||
(expression | ||
(vec | ||
(expression | ||
(literal | ||
(number) | ||
) | ||
) | ||
(expression | ||
(literal | ||
(number) | ||
) | ||
) | ||
(expression | ||
(literal | ||
(number) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
(function_declaration | ||
name: (identifier) | ||
params: (param_list | ||
(param ident: (identifier)) | ||
(param ident: (identifier)) | ||
(param ident: (identifier)) | ||
) | ||
body: (block) | ||
) | ||
(block | ||
body: (statement | ||
msg: (expression | ||
(literal | ||
(string) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
(statement | ||
msg: (expression | ||
(literal | ||
(string) | ||
) | ||
) | ||
) | ||
) | ||
(statement | ||
msg: (expression | ||
(literal | ||
(string) | ||
) | ||
) | ||
) | ||
) | ||
(block | ||
body: (statement | ||
msg: (expression | ||
(literal | ||
(string) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
(statement | ||
(return) | ||
) | ||
(statement | ||
(return) | ||
) | ||
(function_declaration | ||
qualifiers: (qualifier_list | ||
(qualifier) | ||
) | ||
name: (identifier) | ||
body: (block) | ||
) | ||
) |