diff options
Diffstat (limited to 'engines/director/lingo/lingo-gr.y')
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 407b1ea914..08af780465 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -292,6 +292,16 @@ ifstmt: if cond tTHENNL stmtlist end ENDCLAUSE { checkEnd($9, "if", true); g_lingo->processIf(0, $8 - $1); } + | if cond tTHENNL stmtlist end tNLELSE begin stmtoneliner end { + inst then = 0, else1 = 0, end = 0; + WRITE_UINT32(&then, $4 - $1); + WRITE_UINT32(&else1, $7 - $1); + WRITE_UINT32(&end, $9 - $1); + (*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */ + (*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */ + (*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */ + + g_lingo->processIf(0, $9 - $1); } | if cond tTHEN begin stmtoneliner end { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, $4 - $1); |