Open jonathangjertsen opened 1 month ago
Golang does not perform fall-through in switch statements. See https://go.dev/tour/flowcontrol/9
Golang does not perform fall-through in switch statements. See https://go.dev/tour/flowcontrol/9
Unless you use the fallthrough
keyword. 🙂
Thanks for the report.
This should be fairly straightforward to sort out. Need to add a parser and node type for it, and a validator to make sure it only appears as a child of the case statement, and that there there are no nodes between the fallthrough and the next case node.
Describe the bug
Fallthrough statements in switch statements do not exist in the generated go file, instead it just outputs the string "fallthrough".
To Reproduce
Expected behavior
@example(0)
should generate the output<p>hey</p>
templ info
output