From 9c906f92c50d453822b12896d29b7883802ea567 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 28 Jan 2022 21:01:05 +0100 Subject: Parse `break`, `continue` and `return` expression --- tests/typ/code/break-continue.typ | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/typ/code/break-continue.typ (limited to 'tests/typ/code/break-continue.typ') diff --git a/tests/typ/code/break-continue.typ b/tests/typ/code/break-continue.typ new file mode 100644 index 00000000..2b38cf77 --- /dev/null +++ b/tests/typ/code/break-continue.typ @@ -0,0 +1,14 @@ +// Test break and continue in loops. +// Ref: false + +--- +#for i in range(10) { + if i > 5 { + // Error: 5-10 break is not yet implemented + break + } +} + +--- +// Error: 1-10 unexpected keyword `continue` +#continue -- cgit v1.2.3