aboutsummaryrefslogtreecommitdiff
path: root/lib/qsp_instruction.mly
diff options
context:
space:
mode:
Diffstat (limited to 'lib/qsp_instruction.mly')
-rw-r--r--lib/qsp_instruction.mly12
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
{