diff options
Diffstat (limited to 'LuaSL/src/LuaSL_lexer.l')
-rw-r--r-- | LuaSL/src/LuaSL_lexer.l | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_lexer.l b/LuaSL/src/LuaSL_lexer.l index b4a1444..93df410 100644 --- a/LuaSL/src/LuaSL_lexer.l +++ b/LuaSL/src/LuaSL_lexer.l | |||
@@ -151,6 +151,11 @@ int common(YYSTYPE *lval, char *text, LuaSL_yyparseExtra *extra, boolean checkIg | |||
151 | 151 | ||
152 | int yywrap(yyscan_t yyscanner) | 152 | int yywrap(yyscan_t yyscanner) |
153 | { | 153 | { |
154 | #ifdef LUASL_FILES | ||
155 | LuaSL_yyparseExtra *extra = yyget_extra(yyscanner); | ||
156 | #endif | ||
157 | int result = 1; | ||
158 | |||
154 | #ifdef FLEX_SCANNER | 159 | #ifdef FLEX_SCANNER |
155 | #ifndef LL_WINDOWS | 160 | #ifndef LL_WINDOWS |
156 | // Get gcc to stop complaining about lack of use of yyunput and input. | 161 | // Get gcc to stop complaining about lack of use of yyunput and input. |
@@ -158,7 +163,12 @@ int yywrap(yyscan_t yyscanner) | |||
158 | (void) input; | 163 | (void) input; |
159 | #endif | 164 | #endif |
160 | #endif | 165 | #endif |
161 | // TODO - If we are getting files from stdin, or multiple -f arguments, we should loop through them and return 0. Return 1 when there are no more files. | 166 | |
162 | return(1); | 167 | #ifdef LUASL_FILES |
168 | result = nextFile(extra); | ||
169 | if (0 == result) | ||
170 | yyset_in(extra->file, yyscanner); | ||
171 | #endif | ||
172 | return result; | ||
163 | } | 173 | } |
164 | 174 | ||