1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00

Added C like /* */ comments.

git-svn-id: svn://svn.cc65.org/cc65/trunk@3888 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2008-08-19 21:26:23 +00:00
parent 53352d8a56
commit 9f7fc6f4c8

View File

@ -1061,7 +1061,25 @@ CharAgain:
case '/': case '/':
NextChar (); NextChar ();
Tok = TOK_DIV; if (C != '*') {
Tok = TOK_DIV;
} else {
/* Remember the position, then skip the '*' */
FilePos Pos = CurPos;
NextChar ();
do {
while (C != '*') {
if (C == EOF) {
PError (&Pos, "Unterminated comment");
goto Again;
}
NextChar ();
}
NextChar ();
} while (C != '/');
NextChar ();
goto Again;
}
return; return;
case '*': case '*':