Added new comment feature
git-svn-id: svn://svn.cc65.org/cc65/trunk@3388 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -153,7 +153,7 @@ void InfoNextTok (void)
|
||||
/* Read the next token from the input stream */
|
||||
{
|
||||
unsigned I;
|
||||
|
||||
int Esc;
|
||||
|
||||
Again:
|
||||
/* Skip whitespace */
|
||||
@@ -249,9 +249,20 @@ Again:
|
||||
NextChar ();
|
||||
I = 0;
|
||||
while (C != '\"') {
|
||||
Esc = (C == '\\');
|
||||
if (Esc) {
|
||||
NextChar ();
|
||||
}
|
||||
if (C == EOF || C == '\n') {
|
||||
InfoError ("Unterminated string");
|
||||
}
|
||||
if (Esc) {
|
||||
switch (C) {
|
||||
case '\"': C = '\"'; break;
|
||||
case '\'': C = '\''; break;
|
||||
default: InfoError ("Invalid escape char: %c", C);
|
||||
}
|
||||
}
|
||||
if (I < CFG_MAX_IDENT_LEN) {
|
||||
InfoSVal [I++] = C;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user