Browse Source

pastojs: fixed escaping invalid UTF-16 i string literals

git-svn-id: trunk@40192 -
Mattias Gaertner 6 years ago
parent
commit
59414e3030
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/pastojs/src/fppas2js.pp

+ 3 - 3
packages/pastojs/src/fppas2js.pp

@@ -356,6 +356,7 @@ Works:
 
 
 ToDos:
 ToDos:
 - do not rename property Date
 - do not rename property Date
+- Result:=inherited;
 - bug: DoIt(typeinfo(i))  where DoIt is in another unit and has TTypeInfo
 - bug: DoIt(typeinfo(i))  where DoIt is in another unit and has TTypeInfo
 - bug:
 - bug:
   v:=a[0]  gives Local variable "a" is assigned but never used
   v:=a[0]  gives Local variable "a" is assigned but never used
@@ -374,8 +375,7 @@ ToDos:
 - interfaces
 - interfaces
   - array of interface
   - array of interface
   - record member interface
   - record member interface
-
-ToDo:
+- range check o.arr[i]  o.astring[i]
 - record field external name
 - record field external name
 - make records more lightweight
 - make records more lightweight
 - 1 as TEnum, ERangeError
 - 1 as TEnum, ERangeError
@@ -6774,7 +6774,7 @@ begin
           case El.Value[1] of
           case El.Value[1] of
           '$': S:='0x'+S;
           '$': S:='0x'+S;
           '&': if TargetProcessor=ProcessorECMAScript5 then
           '&': if TargetProcessor=ProcessorECMAScript5 then
-                 S:='0'+S
+                 S:='' // in strict mode 01 is forbidden
                else
                else
                  S:='0o'+S;
                  S:='0o'+S;
           '%': if TargetProcessor=ProcessorECMAScript5 then
           '%': if TargetProcessor=ProcessorECMAScript5 then