From e912b39021937d1ccfa1186be5bd127c2589772e Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 3 Mar 2010 14:08:36 +0100 Subject: [PATCH] isl_stream_next_token_on_same_line: check if last token read was a newline --- isl_stream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isl_stream.c b/isl_stream.c index 344d1b85..f88727a2 100644 --- a/isl_stream.c +++ b/isl_stream.c @@ -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 */ -- 2.11.4.GIT