summaryrefslogtreecommitdiff
path: root/ast_expr.y
diff options
context:
space:
mode:
Diffstat (limited to 'ast_expr.y')
-rwxr-xr-xast_expr.y15
1 files changed, 12 insertions, 3 deletions
diff --git a/ast_expr.y b/ast_expr.y
index 4f4bc2375..17ac1e9f9 100755
--- a/ast_expr.y
+++ b/ast_expr.y
@@ -341,9 +341,18 @@ ast_yylex (YYSTYPE *lvalp, YYLTYPE *yylloc, struct parser_control *karoto)
}
else if( *t1 == 0 )
{
- /* we are done. That was quick */
- p = karoto->ptrptr;
- yylloc->last_column = t1 - karoto->argv;
+ if( t1 != karoto->ptrptr )
+ {
+ /* this is the last token */
+ p = karoto->ptrptr;
+ karoto->ptrptr = t1;
+ }
+ else
+ {
+ /* we are done. That was quick */
+ p = karoto->ptrptr;
+ yylloc->last_column = t1 - karoto->argv;
+ }
}
if( *p == 0 )
p = 0;