From 93355b06a8270f02d345bdbe7b6a8c1bea9789bb Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Thu, 28 Sep 2023 14:34:11 +0200 Subject: Reduced the number of error messages --- lib/qsp_instruction.mly | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/qsp_instruction.mly') diff --git a/lib/qsp_instruction.mly b/lib/qsp_instruction.mly index cc0520f..91a5994 100644 --- a/lib/qsp_instruction.mly +++ b/lib/qsp_instruction.mly @@ -29,7 +29,17 @@ argument(X): ~elifs ~else_ } - + | a = onliner(IF) + else_= preceded(ELSE, inline_action) + { let loc, expression, statements, loc_s, _body = a in + let elifs = [] + and else_ = [ else_ ] in + Analyzer.Instruction.if_ + loc + (loc_s, expression, statements) + ~elifs + ~else_ + } single_instruction: | expr = expression { -- cgit v1.2.3