projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08cfd39
)
isl_stream_next_token: skip comment lines
author
Sven Verdoolaege
<skimo@kotnet.org>
Sun, 24 Jan 2010 13:36:02 +0000
(14:36 +0100)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Sun, 24 Jan 2010 17:13:11 +0000
(18:13 +0100)
isl_stream.c
patch
|
blob
|
history
diff --git
a/isl_stream.c
b/isl_stream.c
index
be5eee2
..
d22d3fa
100644
(file)
--- a/
isl_stream.c
+++ b/
isl_stream.c
@@
-157,10
+157,17
@@
struct isl_token *isl_stream_next_token(struct isl_stream *s)
s->len = 0;
- /* skip spaces */
- while ((c = isl_stream_getc(s)) != -1 && isspace(c))
- /* nothing */
- ;
+ /* skip spaces and comment lines */
+ while ((c = isl_stream_getc(s)) != -1) {
+ if (c == '#') {
+ while ((c = isl_stream_getc(s)) != -1 && c != '\n')
+ /* nothing */
+ ;
+ if (c == -1)
+ break;
+ } else if (!isspace(c))
+ break;
+ }
line = s->line;
col = s->col;