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
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.6.1-2-2
description: >
Allow reserved words as property names by dot operator assignment.
---*/
var tokenCodes = {};
tokenCodes.await = 'await';
tokenCodes.break = 'break';
tokenCodes.case = 'case';
tokenCodes.catch = 'catch';
tokenCodes.class = 'class';
tokenCodes.const = 'const';
tokenCodes.continue = 'continue';
tokenCodes.debugger = 'debugger';
tokenCodes.default = 'default';
tokenCodes.delete = 'delete';
tokenCodes.do = 'do';
tokenCodes.else = 'else';
tokenCodes.export = 'export';
tokenCodes.extends = 'extends';
tokenCodes.finally = 'finally';
tokenCodes.for = 'for';
tokenCodes.function = 'function';
tokenCodes.if = 'if';
tokenCodes.import = 'import';
tokenCodes.in = 'in';
tokenCodes.instanceof = 'instanceof';
tokenCodes.new = 'new';
tokenCodes.return = 'return';
tokenCodes.super = 'super';
tokenCodes.switch = 'switch';
tokenCodes.this = 'this';
tokenCodes.throw = 'throw';
tokenCodes.try = 'try';
tokenCodes.typeof = 'typeof';
tokenCodes.var = 'var';
tokenCodes.void = 'void';
tokenCodes.while = 'while';
tokenCodes.with = 'with';
tokenCodes.yield = 'yield';
tokenCodes.enum = 'enum';
tokenCodes.implements = 'implements';
tokenCodes.interface = 'interface';
tokenCodes.package = 'package';
tokenCodes.protected = 'protected';
tokenCodes.private = 'private';
tokenCodes.public = 'public';
tokenCodes.let = 'let';
tokenCodes.static = 'static';
var arr = [
'await',
'break',
'case',
'catch',
'class',
'const',
'continue',
'debugger',
'default',
'delete',
'do',
'else',
'export',
'extends',
'finally',
'for',
'function',
'if',
'import',
'in',
'instanceof',
'new',
'return',
'super',
'switch',
'this',
'throw',
'try',
'typeof',
'var',
'void',
'while',
'with',
'yield',
'enum',
'implements',
'interface',
'package',
'protected',
'private',
'public',
'let',
'static',
];
for (var i = 0; i < arr.length; ++i) {
var propertyName = arr[i];
assert(tokenCodes.hasOwnProperty(propertyName),
'Property "' + propertyName + '" found');
assert.sameValue(tokenCodes[propertyName], propertyName,
'Property "' + propertyName + '" has correct value');
}
reportCompare(0, 0);
|