From 1ea75d151ec18f933816040c8df6c24d529cda48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=B6=E5=A1=9A=E5=A4=AA=E6=99=BA?= Date: Sat, 27 Jul 2024 14:26:18 +0900 Subject: [PATCH] Implement function of `next` and `break` --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 873e2b2..3026bf7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,6 +71,10 @@ fn parse_program(source: String) -> Block { program.push(Instruction::Comment(code[2..code.len()].trim().to_string())) } else if code.starts_with("import") { program.push(Instruction::Import(code[6..code.len()].trim().to_string())) + } else if code == "next" { + program.push(Instruction::Continue) + } else if code == "break" { + program.push(Instruction::Break) } } program