Skip to content

Commit

Permalink
tests: Test a bunch of non-obvious multiline situations (will try to …
Browse files Browse the repository at this point in the history
…expand this as much as possible)
  • Loading branch information
obiwac committed Sep 30, 2024
1 parent 99a36b5 commit abd8f92
Showing 1 changed file with 109 additions and 0 deletions.
109 changes: 109 additions & 0 deletions test/corpus/mutliline.txt
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
(print
msg: (expression
(literal
(string)
)
)
)
)
)
(statement
(print
msg: (expression
(literal
(string)
)
)
)
)
(statement
(print
msg: (expression
(literal
(string)
)
)
)
)
(block
body: (statement
(print
msg: (expression
(literal
(string)
)
)
)
)
)
(statement
(return)
)
(statement
(return)
)
(function_declaration
qualifiers: (qualifier_list
(qualifier)
)
name: (identifier)
body: (block)
)
)

0 comments on commit abd8f92

Please sign in to comment.