mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 17:57:14 +00:00
DIRECTOR: LINGO: Implement extened 'on' clause syntax
This commit is contained in:
parent
9084dcc70d
commit
c33a4f9d8d
File diff suppressed because it is too large
Load Diff
@ -646,7 +646,7 @@ defn: tMACRO ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); }
|
||||
g_lingo->code1(g_lingo->c_procret);
|
||||
g_lingo->define(*$2, $4, $5 + 1, &g_lingo->_currentFactory);
|
||||
g_lingo->_indef = false; }
|
||||
| on begin argdef nl argstore stmtlist ENDCLAUSE { // D3
|
||||
| on begin argdef nl argstore stmtlist ENDCLAUSE endargdef { // D3
|
||||
g_lingo->code1(g_lingo->c_procret);
|
||||
g_lingo->define(*$1, $2, $3);
|
||||
g_lingo->_indef = false;
|
||||
@ -667,6 +667,11 @@ argdef: /* nothing */ { $$ = 0; }
|
||||
| argdef nl ',' ID { g_lingo->codeArg($4); $$ = $1 + 1; }
|
||||
;
|
||||
|
||||
endargdef: /* nothing */
|
||||
| ID
|
||||
| endargdef ',' ID
|
||||
;
|
||||
|
||||
argstore: /* nothing */ { g_lingo->codeArgStore(); }
|
||||
;
|
||||
|
||||
|
@ -10,3 +10,8 @@ on annoy howMuch
|
||||
beep random(howMuch)
|
||||
alert "Aren't handlers fun?"
|
||||
end annoy
|
||||
|
||||
on annoy2 howMuch
|
||||
beep random(howMuch)
|
||||
alert "Aren't handlers fun?"
|
||||
end annoy2 howMuch
|
||||
|
Loading…
x
Reference in New Issue
Block a user