From bb783f8f31797597ca0349434e236e6df923e14b Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 7 Nov 2023 21:49:01 +0100 Subject: parser: implement switch statement A VM instruction `EqualSet` has been added to preserve the left operand on the stack in case of failure, to allow efficient multiple tests on the same value. Both the pattern 'if/else if' and the classical case clauses have been implemented. --- parser/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'parser/README.md') diff --git a/parser/README.md b/parser/README.md index c9ff440..0503e28 100644 --- a/parser/README.md +++ b/parser/README.md @@ -61,7 +61,8 @@ Go language support: - [ ] go statement - [x] if statement (including else and else if) - [x] for statement -- [ ] switch statement +- [x] switch statement +- [ ] type switch statement - [x] break statement - [x] continue statement - [ ] fallthrough statement -- cgit v1.2.3