ignore unknown escape sequences
authorMatthias Kramm <kramm@quiss.org>
Sat, 14 Mar 2009 20:20:11 +0000 (21:20 +0100)
committerMatthias Kramm <kramm@quiss.org>
Sat, 14 Mar 2009 20:20:11 +0000 (21:20 +0100)
lib/as3/tokenizer.lex

index bc4f012..e103b25 100644 (file)
@@ -259,8 +259,15 @@ static int do_unescape(const char*s, const char*end, char*n)
                 }
                break;
            }
-            default:
-                syntaxerror("unknown escape sequence: \"\\%c\"", *s);
+            default: {
+               if(o) {
+                    o[len+0] = '\\';
+                    o[len+1] = *s;
+                }
+                s++;
+                len+=2;
+                break;
+            }
         }
     }
     if(o) o[len]=0;