]> git.sur5r.net Git - cc65/blobdiff - src/da65/scanner.c
Allow to set the ProDOS type and auxtype on creating new files in a similiar way...
[cc65] / src / da65 / scanner.c
index 9b58981df0420da48ed452a8a8b6015f3e382163..176a6869ea3d2d15ac4de38c00521182a2033646 100644 (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;
                }