Add test cases for panic/todo 'as' with expressions

This is newly allowed in v0.33.0 but happened to be allowed in
tree-sitter-gleam anyways.
pull/844/head
Michael Davis 2023-12-06 18:33:49 +07:00
parent 11db86c2a0
commit d90c00d7dd
No known key found for this signature in database
1 changed files with 25 additions and 0 deletions

@ -120,3 +120,28 @@ case "12345" {
(case_clause_pattern
(discard)))
(string)))))
================================================================================
Todo and panic 'as' with string expressions
================================================================================
todo as { "Hello, " <> "world!" }
panic as { "Hello, " <> "world!" }
--------------------------------------------------------------------------------
(source_file
(todo
(block
(binary_expression
(string
(quoted_content))
(string
(quoted_content)))))
(panic
(block
(binary_expression
(string
(quoted_content))
(string
(quoted_content))))))