1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
//// [escapedIdentifiers.ts]
/*
0 .. \u0030
9 .. \u0039
A .. \u0041
Z .. \u005a
a .. \u0061
z .. \u00za
*/
// var decl
var \u0061 = 1;
a ++;
\u0061 ++;
var b = 1;
b ++;
\u0062 ++;
// modules
module moduleType1 {
export var baz1: number;
}
module moduleType\u0032 {
export var baz2: number;
}
moduleType1.baz1 = 3;
moduleType\u0031.baz1 = 3;
moduleType2.baz2 = 3;
moduleType\u0032.baz2 = 3;
// classes
class classType1 {
public foo1: number;
}
class classType\u0032 {
public foo2: number;
}
var classType1Object1 = new classType1();
classType1Object1.foo1 = 2;
var classType1Object2 = new classType\u0031();
classType1Object2.foo1 = 2;
var classType2Object1 = new classType2();
classType2Object1.foo2 = 2;
var classType2Object2 = new classType\u0032();
classType2Object2.foo2 = 2;
// interfaces
interface interfaceType1 {
bar1: number;
}
interface interfaceType\u0032 {
bar2: number;
}
var interfaceType1Object1 = <interfaceType1>{ bar1: 0 };
interfaceType1Object1.bar1 = 2;
var interfaceType1Object2 = <interfaceType\u0031>{ bar1: 0 };
interfaceType1Object2.bar1 = 2;
var interfaceType2Object1 = <interfaceType2>{ bar2: 0 };
interfaceType2Object1.bar2 = 2;
var interfaceType2Object2 = <interfaceType\u0032>{ bar2: 0 };
interfaceType2Object2.bar2 = 2;
// arguments
class testClass {
public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) {
arg\u0031 = 1;
arg2 = 'string';
arg\u0033 = true;
arg4 = 2;
}
}
// constructors
class constructorTestClass {
constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) {
}
}
var constructorTestObject = new constructorTestClass(1, 'string', true, 2);
constructorTestObject.arg\u0031 = 1;
constructorTestObject.arg2 = 'string';
constructorTestObject.arg\u0033 = true;
constructorTestObject.arg4 = 2;
// Lables
l\u0061bel1:
while (false)
{
while(false)
continue label1; // it will go to next iteration of outer loop
}
label2:
while (false)
{
while(false)
continue l\u0061bel2; // it will go to next iteration of outer loop
}
label3:
while (false)
{
while(false)
continue label3; // it will go to next iteration of outer loop
}
l\u0061bel4:
while (false)
{
while(false)
continue l\u0061bel4; // it will go to next iteration of outer loop
}
//// [escapedIdentifiers.js]
/*
0 .. \u0030
9 .. \u0039
A .. \u0041
Z .. \u005a
a .. \u0061
z .. \u00za
*/
// var decl
var \u0061 = 1;
a++;
\u0061++;
var b = 1;
b++;
\u0062++;
// modules
var moduleType1;
(function (moduleType1) {
})(moduleType1 || (moduleType1 = {}));
var moduleType\u0032;
(function (moduleType\u0032) {
})(moduleType\u0032 || (moduleType\u0032 = {}));
moduleType1.baz1 = 3;
moduleType\u0031.baz1 = 3;
moduleType2.baz2 = 3;
moduleType\u0032.baz2 = 3;
// classes
var classType1 = /** @class */ (function () {
function classType1() {
}
return classType1;
}());
var classType\u0032 = /** @class */ (function () {
function classType\u0032() {
}
return classType\u0032;
}());
var classType1Object1 = new classType1();
classType1Object1.foo1 = 2;
var classType1Object2 = new classType\u0031();
classType1Object2.foo1 = 2;
var classType2Object1 = new classType2();
classType2Object1.foo2 = 2;
var classType2Object2 = new classType\u0032();
classType2Object2.foo2 = 2;
var interfaceType1Object1 = { bar1: 0 };
interfaceType1Object1.bar1 = 2;
var interfaceType1Object2 = { bar1: 0 };
interfaceType1Object2.bar1 = 2;
var interfaceType2Object1 = { bar2: 0 };
interfaceType2Object1.bar2 = 2;
var interfaceType2Object2 = { bar2: 0 };
interfaceType2Object2.bar2 = 2;
// arguments
var testClass = /** @class */ (function () {
function testClass() {
}
testClass.prototype.func = function (arg1, arg\u0032, arg\u0033, arg4) {
arg\u0031 = 1;
arg2 = 'string';
arg\u0033 = true;
arg4 = 2;
};
return testClass;
}());
// constructors
var constructorTestClass = /** @class */ (function () {
function constructorTestClass(arg1, arg\u0032, arg\u0033, arg4) {
this.arg1 = arg1;
this.arg\u0032 = arg\u0032;
this.arg\u0033 = arg\u0033;
this.arg4 = arg4;
}
return constructorTestClass;
}());
var constructorTestObject = new constructorTestClass(1, 'string', true, 2);
constructorTestObject.arg\u0031 = 1;
constructorTestObject.arg2 = 'string';
constructorTestObject.arg\u0033 = true;
constructorTestObject.arg4 = 2;
// Lables
l\u0061bel1: while (false) {
while (false)
continue label1; // it will go to next iteration of outer loop
}
label2: while (false) {
while (false)
continue l\u0061bel2; // it will go to next iteration of outer loop
}
label3: while (false) {
while (false)
continue label3; // it will go to next iteration of outer loop
}
l\u0061bel4: while (false) {
while (false)
continue l\u0061bel4; // it will go to next iteration of outer loop
}
|