core: reader_eat_whitespace: Prepare for M2-Planet.

* src/reader.c (reader_eat_whitespace): Prepare for M2-Planet.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2019-10-24 21:37:41 +02:00
parent 18c416f307
commit 70ed273469
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 8 additions and 4 deletions

View File

@ -162,11 +162,15 @@ reader_eat_whitespace (int c)
c = readchar ();
if (c == ';')
return reader_eat_whitespace (reader_read_line_comment (c));
if (c == '#' && (peekchar () == '!' || peekchar () == '|'))
if (c == '#')
{
c = readchar ();
reader_read_block_comment (c, readchar ());
return reader_eat_whitespace (readchar ());
int p = peekchar ();
if (p == '!' || p == '|')
{
c = readchar ();
reader_read_block_comment (c, readchar ());
return reader_eat_whitespace (readchar ());
}
}
return c;
}