diff options
author | Chimrod <> | 2023-09-28 14:34:11 +0200 |
---|---|---|
committer | Chimrod <> | 2023-09-29 10:00:21 +0200 |
commit | 93355b06a8270f02d345bdbe7b6a8c1bea9789bb (patch) | |
tree | 486b89672215278d7ff1a25a853ab25e1c8d2a38 /lib/qsp_instruction.mly | |
parent | 4efc1d21441c5e9ad7f24a3e473bbbd8025de124 (diff) |
Reduced the number of error messages
Diffstat (limited to 'lib/qsp_instruction.mly')
-rw-r--r-- | lib/qsp_instruction.mly | 12 |
1 files changed, 11 insertions, 1 deletions
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 { |