isl_stream_next_token_on_same_line: check if last token read was a newline
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 3 Mar 2010 13:08:36 +0000 (14:08 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 4 Mar 2010 09:03:47 +0000 (10:03 +0100)
isl_stream.c

index 344d1b8..f88727a 100644 (file)
@@ -158,6 +158,9 @@ static struct isl_token *next_token(struct isl_stream *s, int same_line)
                return s->tokens[--s->n_token];
        }
 
+       if (same_line && s->c == '\n')
+               return NULL;
+
        s->len = 0;
 
        /* skip spaces and comment lines */