aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-lex.l
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-20 16:21:01 +0100
committerEugene Sandulenko2019-12-20 19:40:53 +0100
commite972d5109f4512d31f44e372d07028ff4def20b6 (patch)
treed3b7476928a073250cbddc1e116f2f7f4646cc2b /engines/director/lingo/lingo-lex.l
parentbd1c0add82be392ee63fdc2cc0d37b13a4d66c3c (diff)
downloadscummvm-rg350-e972d5109f4512d31f44e372d07028ff4def20b6.tar.gz
scummvm-rg350-e972d5109f4512d31f44e372d07028ff4def20b6.tar.bz2
scummvm-rg350-e972d5109f4512d31f44e372d07028ff4def20b6.zip
DIRECTOR: LINGO: Match local arguments during parsing
Diffstat (limited to 'engines/director/lingo/lingo-lex.l')
-rw-r--r--engines/director/lingo/lingo-lex.l9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 30b3908b06..22347e28e7 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -295,6 +295,15 @@ whitespace [\t ]
if (g_lingo->_ignoreMe && yylval.s->equalsIgnoreCase("me"))
return ID;
+ // When we are defining arguments, allow any string
+ if (g_lingo->_indef == kStateInArgs)
+ return ID;
+
+ // First of all, match against argument list
+ if (g_lingo->_indef == kStateInDef)
+ if (g_lingo->isInArgStack(yylval.s))
+ return ID;
+
if (g_lingo->_twoWordBuiltins.contains(yytext))
return TWOWORDBUILTIN;