Added new comment feature

git-svn-id: svn://svn.cc65.org/cc65/trunk@3388 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2005-02-16 23:30:05 +00:00
parent 00b644ad18
commit e814c484c3
11 changed files with 200 additions and 53 deletions

View File

@@ -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;
}