TypeScript/tests/baselines/reference/parserRealSource11.errors.txt
2015-04-03 17:59:40 -07:00

3918 lines
211 KiB
Plaintext

tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(13,22): error TS2304: Cannot find name 'Type'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(14,24): error TS2304: Cannot find name 'ASTFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(17,38): error TS2304: Cannot find name 'CompilerDiagnostics'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(24,39): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(36,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(38,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(39,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(42,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(44,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(47,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(48,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(51,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(53,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(54,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(55,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(64,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(64,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(67,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(69,45): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(69,79): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(77,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(82,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(87,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(92,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(97,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(99,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(100,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(103,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(108,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(119,31): error TS2304: Cannot find name 'PrintContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(130,17): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(130,37): error TS2304: Cannot find name 'ASTFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(137,17): error TS2304: Cannot find name 'nodeTypeTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(138,24): error TS2304: Cannot find name 'nodeTypeTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(141,30): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(145,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(151,39): error TS2304: Cannot find name 'Symbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(151,57): error TS2304: Cannot find name 'StringHashTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(155,26): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(184,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(192,32): error TS2304: Cannot find name 'SymbolScope'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(193,40): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(196,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(199,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(219,33): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(231,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(231,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(233,52): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(237,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(251,21): error TS2304: Cannot find name 'Symbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(268,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(298,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(302,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(302,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(306,40): error TS2304: Cannot find name 'Token'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(307,54): error TS2304: Cannot find name 'IdentifierToken'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(320,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(320,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(327,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(332,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(337,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(337,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(350,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(360,28): error TS2304: Cannot find name 'Type'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(363,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(367,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(370,34): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(375,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(377,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(380,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(383,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(384,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(387,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(388,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(389,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(390,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(393,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(397,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(401,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(406,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(411,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(416,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(427,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(441,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(441,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(445,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(446,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(449,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(451,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(453,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(454,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(457,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(460,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(463,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(465,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(467,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(469,50): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(472,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(474,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(476,50): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(479,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(481,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(483,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(485,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(487,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(489,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(491,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(494,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(496,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(498,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(500,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(502,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(504,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(506,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(507,58): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(518,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(520,29): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(525,27): error TS2304: Cannot find name 'Signature'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(527,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(528,34): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(536,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(536,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(540,34): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(553,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(557,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(559,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(561,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(563,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(564,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(565,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(566,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(567,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(568,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(569,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(571,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(573,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(574,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(577,32): error TS2304: Cannot find name 'nodeTypeTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(581,32): error TS2304: Cannot find name 'nodeTypeTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(582,84): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(586,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(587,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(588,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(589,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(590,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(591,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(593,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(595,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(598,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(600,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(602,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(603,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(604,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(605,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(606,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(607,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(608,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(610,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(612,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(613,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(614,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(616,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(617,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(618,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(620,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(622,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(624,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(626,22): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(635,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(635,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(636,30): error TS2304: Cannot find name 'nodeTypeToTokTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(644,21): error TS2304: Cannot find name 'tokenTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(647,26): error TS2304: Cannot find name 'tokenTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(651,58): error TS2304: Cannot find name 'tokenTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(658,26): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(660,67): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(665,26): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(669,26): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(670,55): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(672,33): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(672,60): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(678,67): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(681,67): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(684,63): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(686,26): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(687,63): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(694,63): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(696,26): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(711,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(714,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(718,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(718,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(721,51): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(723,51): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(725,51): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(733,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(738,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(747,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(747,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(778,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(781,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(786,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(786,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(797,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(800,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(800,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(808,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(823,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(830,27): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(834,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(837,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(837,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(838,24): error TS2304: Cannot find name 'ModuleType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(841,61): error TS2304: Cannot find name 'TypeSymbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(850,52): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(863,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(867,29): error TS1015: Parameter cannot have question mark and initializer.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(868,38): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(877,40): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(891,27): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(892,21): error TS2304: Cannot find name 'Symbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(894,55): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(900,37): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(900,60): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(901,36): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(901,59): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(902,38): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(902,61): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(904,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(915,23): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(918,37): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(918,60): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(919,38): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(919,61): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(920,36): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(920,59): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(922,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(922,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(933,23): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(944,38): error TS2304: Cannot find name 'FieldSymbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(946,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(946,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(959,27): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(961,25): error TS2304: Cannot find name 'IHashTable'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(963,27): error TS2304: Cannot find name 'Signature'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(969,31): error TS2304: Cannot find name 'Symbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(977,32): error TS2304: Cannot find name 'Symbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(981,27): error TS2304: Cannot find name 'Type'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(985,29): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1004,44): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1004,67): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1005,57): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1007,47): error TS2304: Cannot find name 'Symbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1009,45): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1022,32): error TS2304: Cannot find name 'Symbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1024,47): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1032,36): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1033,29): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1034,28): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1036,31): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1038,69): error TS2304: Cannot find name 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1043,26): error TS2304: Cannot find name 'getAstWalkerFactory'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1050,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1054,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1054,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1068,37): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1068,57): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1071,40): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1071,63): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1072,45): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1072,68): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1073,43): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1073,66): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1076,38): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1076,61): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1076,86): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1076,109): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1077,41): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1077,64): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1078,41): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1078,64): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1079,37): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1079,60): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1080,38): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1080,61): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1081,37): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1081,60): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1082,36): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1082,59): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1083,36): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1083,59): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1095,29): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1098,56): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1098,79): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1111,33): error TS2304: Cannot find name 'IFileReference'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1127,84): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1132,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1144,42): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1145,30): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1145,74): error TS2304: Cannot find name 'ModuleFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1145,109): error TS2304: Cannot find name 'ModuleFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1149,47): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1150,30): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1150,77): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1154,47): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1155,30): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1155,64): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1159,47): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1164,47): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1164,97): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1172,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1172,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1176,60): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1187,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1195,27): error TS2304: Cannot find name 'ModuleFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1196,21): error TS2304: Cannot find name 'ModuleType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1206,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1213,38): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1213,61): error TS2304: Cannot find name 'ModuleFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1214,37): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1214,60): error TS2304: Cannot find name 'ModuleFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1215,34): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1215,57): error TS2304: Cannot find name 'ModuleFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1218,31): error TS2304: Cannot find name 'ModuleFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1221,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1225,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1225,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1226,18): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1226,41): error TS2304: Cannot find name 'ModuleFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1237,27): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1239,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1248,20): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1248,43): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1252,20): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1252,43): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1266,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1269,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1273,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1273,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1283,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1286,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1290,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1290,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1295,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1297,27): error TS2304: Cannot find name 'ASTFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1306,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1314,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1317,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1317,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1331,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1337,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1339,26): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1348,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1351,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1351,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1362,67): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1374,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1375,37): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1388,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1405,32): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1409,42): error TS2304: Cannot find name 'Parser'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1414,35): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1419,39): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1430,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1432,80): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1435,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1435,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1438,34): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1457,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1462,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1462,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1467,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1475,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1479,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1481,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1482,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1488,29): error TS2304: Cannot find name 'ITargetInfo'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1490,39): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1515,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1518,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1518,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1528,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1535,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1539,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1541,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1542,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1545,29): error TS2304: Cannot find name 'ITargetInfo'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1572,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1577,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1577,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1583,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1596,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1600,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1602,31): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1606,35): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1615,39): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1651,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1654,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1654,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1660,63): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1670,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1675,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1682,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1688,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1689,53): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1690,52): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1701,43): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1712,48): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1718,48): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1720,46): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1722,52): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1724,65): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1725,59): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1732,66): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1733,73): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1749,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1749,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1755,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1757,46): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1766,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1775,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1784,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1785,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1811,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1816,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1816,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1822,43): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1823,55): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1827,65): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1831,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1833,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1841,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1845,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1850,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1851,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1855,28): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1857,25): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1859,30): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1865,39): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1868,29): error TS2304: Cannot find name 'ITargetInfo'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1908,25): error TS2304: Cannot find name 'WithSymbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1911,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1914,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1914,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1919,51): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1928,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1939,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1944,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1944,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1950,46): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1958,50): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1969,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1981,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1984,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1985,35): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2014,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2017,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2017,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2022,51): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2033,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2042,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2043,33): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2047,37): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2067,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2070,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2070,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2074,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2077,28): error TS2304: Cannot find name 'getTypeLink'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2100,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2105,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2105,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2107,50): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2108,54): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2112,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2119,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2120,36): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2122,32): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2145,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2150,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2150,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2153,50): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2154,52): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2159,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2161,32): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2164,37): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2172,35): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2185,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2195,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2198,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2198,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2202,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2207,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2212,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2223,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2225,40): error TS2304: Cannot find name 'VarFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2229,32): error TS2304: Cannot find name 'SymbolScope'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2231,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2231,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2237,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2240,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2245,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2248,36): error TS2304: Cannot find name 'BasicBlock'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2259,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2263,33): error TS2304: Cannot find name 'ValueLocation'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2264,30): error TS2304: Cannot find name 'VariableSymbol'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2269,38): error TS2304: Cannot find name 'TypeLink'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2300,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2303,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2303,48): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2307,47): error TS2304: Cannot find name 'TokenID'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2312,42): error TS2304: Cannot find name 'ControlFlowContext'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2320,36): error TS2304: Cannot find name 'TypeFlow'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2331,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2353,19): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,30): error TS2304: Cannot find name 'Emitter'.
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error TS2304: Cannot find name 'TokenID'.
==== tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts (517 errors) ====
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
// See LICENSE.txt in the project root for complete license information.
///<reference path='typescript.ts' />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS6053: File 'typescript.ts' not found.
module TypeScript {
export class ASTSpan {
public minChar: number = -1; // -1 = "undefined" or "compiler generated"
public limChar: number = -1; // -1 = "undefined" or "compiler generated"
}
export class AST extends ASTSpan {
public type: Type = null;
~~~~
!!! error TS2304: Cannot find name 'Type'.
public flags = ASTFlags.Writeable;
~~~~~~~~
!!! error TS2304: Cannot find name 'ASTFlags'.
// REVIEW: for diagnostic purposes
public passCreated: number = CompilerDiagnostics.analysisPass;
~~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'CompilerDiagnostics'.
public preComments: Comment[] = null;
public postComments: Comment[] = null;
public isParenthesized = false;
constructor (public nodeType: NodeType) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
super();
}
public isExpression() { return false; }
public isStatementOrExpression() { return false; }
public isCompoundStatement() { return false; }
public isLeaf() { return this.isStatementOrExpression() && (!this.isCompoundStatement()); }
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
switch (this.nodeType) {
case NodeType.Error:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.EmptyExpr:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.type = typeFlow.anyType;
break;
case NodeType.This:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckThis(this);
case NodeType.Null:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.type = typeFlow.nullType;
break;
case NodeType.False:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.True:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.type = typeFlow.booleanType;
break;
case NodeType.Super:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckSuper(this);
case NodeType.EndCode:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Empty:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Void:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.type = typeFlow.voidType;
break;
default:
throw new Error("please implement in derived class");
}
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
switch (this.nodeType) {
case NodeType.This:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.recordSourceMappingStart(this);
if (emitter.thisFnc && (hasFlag(emitter.thisFnc.fncFlags, FncFlags.IsFatArrowFunction))) {
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
emitter.writeToOutput("_this");
}
else {
emitter.writeToOutput("this");
}
emitter.recordSourceMappingEnd(this);
break;
case NodeType.Null:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("null");
emitter.recordSourceMappingEnd(this);
break;
case NodeType.False:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("false");
emitter.recordSourceMappingEnd(this);
break;
case NodeType.True:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("true");
emitter.recordSourceMappingEnd(this);
break;
case NodeType.Super:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.recordSourceMappingStart(this);
emitter.emitSuperReference();
emitter.recordSourceMappingEnd(this);
break;
case NodeType.EndCode:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
break;
case NodeType.Error:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.EmptyExpr:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
break;
case NodeType.Empty:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("; ");
emitter.recordSourceMappingEnd(this);
break;
case NodeType.Void:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("void ");
emitter.recordSourceMappingEnd(this);
break;
default:
throw new Error("please implement in derived class");
}
emitter.emitParensAndCommentsInPlace(this, false);
}
public print(context: PrintContext) {
~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'PrintContext'.
context.startLine();
var lineCol = { line: -1, col: -1 };
var limLineCol = { line: -1, col: -1 };
if (context.parser !== null) {
context.parser.getSourceLineCol(lineCol, this.minChar);
context.parser.getSourceLineCol(limLineCol, this.limChar);
context.write("(" + lineCol.line + "," + lineCol.col + ")--" +
"(" + limLineCol.line + "," + limLineCol.col + "): ");
}
var lab = this.printLabel();
if (hasFlag(this.flags, ASTFlags.Error)) {
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'ASTFlags'.
lab += " (Error)";
}
context.writeLine(lab);
}
public printLabel() {
if (nodeTypeTable[this.nodeType] !== undefined) {
~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'nodeTypeTable'.
return nodeTypeTable[this.nodeType];
~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'nodeTypeTable'.
}
else {
return (<any>NodeType)._map[this.nodeType];
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
// by default, AST adds itself to current basic block and does not check its children
context.walker.options.goChildren = false;
context.addContent(this);
}
public netFreeUses(container: Symbol, freeUses: StringHashTable) {
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'StringHashTable'.
}
public treeViewLabel() {
return (<any>NodeType)._map[this.nodeType];
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public static getResolvedIdentifierName(name: string): string {
if (!name) return "";
var resolved = "";
var start = 0;
var i = 0;
while(i <= name.length - 6) {
// Look for escape sequence \uxxxx
if (name.charAt(i) == '\\' && name.charAt(i+1) == 'u') {
var charCode = parseInt(name.substr(i + 2, 4), 16);
resolved += name.substr(start, i - start);
resolved += String.fromCharCode(charCode);
i += 6;
start = i;
continue;
}
i++;
}
// Append remaining string
resolved += name.substring(start);
return resolved;
}
}
export class IncompleteAST extends AST {
constructor (min: number, lim: number) {
super(NodeType.Error);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.minChar = min;
this.limChar = lim;
}
}
export class ASTList extends AST {
public enclosingScope: SymbolScope = null;
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'SymbolScope'.
public members: AST[] = new AST[];
~~
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
constructor () {
super(NodeType.List);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var len = this.members.length;
for (var i = 0; i < len; i++) {
if (context.noContinuation) {
context.addUnreachable(this.members[i]);
break;
}
else {
this.members[i] = context.walk(this.members[i], this);
}
}
context.walker.options.goChildren = false;
}
public append(ast: AST) {
this.members[this.members.length] = ast;
return this;
}
public appendAll(ast: AST) {
if (ast.nodeType == NodeType.List) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
var list = <ASTList>ast;
for (var i = 0, len = list.members.length; i < len; i++) {
this.append(list.members[i]);
}
}
else {
this.append(ast);
}
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingStart(this);
emitter.emitJavascriptList(this, null, TokenID.Semicolon, startLine, false, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingEnd(this);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
var len = this.members.length;
typeFlow.nestingLevel++;
for (var i = 0; i < len; i++) {
if (this.members[i]) {
this.members[i] = this.members[i].typeCheck(typeFlow);
}
}
typeFlow.nestingLevel--;
return this;
}
}
export class Identifier extends AST {
public sym: Symbol = null;
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
public cloId = -1;
public text: string;
// 'actualText' is the text that the user has entered for the identifier. the text might
// include any Unicode escape sequences (e.g.: \u0041 for 'A'). 'text', however, contains
// the resolved value of any escape sequences in the actual text; so in the previous
// example, actualText = '\u0041', text = 'A'.
//
// For purposes of finding a symbol, use text, as this will allow you to match all
// variations of the variable text. For full-fidelity translation of the user input, such
// as emitting, use the actualText field.
//
// Note:
// To change text, and to avoid running into a situation where 'actualText' does not
// match 'text', always use setText.
constructor (public actualText: string, public hasEscapeSequence?: boolean) {
super(NodeType.Name);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.setText(actualText, hasEscapeSequence);
}
public setText(actualText: string, hasEscapeSequence?: boolean) {
this.actualText = actualText;
if (hasEscapeSequence) {
this.text = AST.getResolvedIdentifierName(actualText);
}
else {
this.text = actualText;
}
}
public isMissing() { return false; }
public isLeaf() { return true; }
public treeViewLabel() {
return "id: " + this.actualText;
}
public printLabel() {
if (this.actualText) {
return "id: " + this.actualText;
}
else {
return "name node";
}
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckName(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitJavascriptName(this, true);
}
public static fromToken(token: Token): Identifier {
~~~~~
!!! error TS2304: Cannot find name 'Token'.
return new Identifier(token.getText(), (<IdentifierToken>token).hasEscapeSequence);
~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'IdentifierToken'.
}
}
export class MissingIdentifier extends Identifier {
constructor () {
super("__missing");
}
public isMissing() {
return true;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
// Emit nothing for a missing ID
}
}
export class Label extends AST {
constructor (public id: Identifier) {
super(NodeType.Label);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public printLabel() { return this.id.actualText + ":"; }
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.type = typeFlow.voidType;
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.recordSourceMappingStart(this.id);
emitter.writeToOutput(this.id.actualText);
emitter.recordSourceMappingEnd(this.id);
emitter.writeLineToOutput(":");
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
export class Expression extends AST {
constructor (nodeType: NodeType) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
super(nodeType);
}
public isExpression() { return true; }
public isStatementOrExpression() { return true; }
}
export class UnaryExpression extends Expression {
public targetType: Type = null; // Target type for an object literal (null if no target type)
~~~~
!!! error TS2304: Cannot find name 'Type'.
public castTerm: AST = null;
constructor (nodeType: NodeType, public operand: AST) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
super(nodeType);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
super.addToControlFlow(context);
// TODO: add successor as catch block/finally block if present
if (this.nodeType == NodeType.Throw) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
context.returnStmt();
}
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
switch (this.nodeType) {
case NodeType.Not:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckBitNot(this);
case NodeType.LogNot:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckLogNot(this);
case NodeType.Pos:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Neg:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckUnaryNumberOperator(this);
case NodeType.IncPost:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.IncPre:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.DecPost:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.DecPre:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckIncOrDec(this);
case NodeType.ArrayLit:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
typeFlow.typeCheckArrayLit(this);
return this;
case NodeType.ObjectLit:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
typeFlow.typeCheckObjectLit(this);
return this;
case NodeType.Throw:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.operand = typeFlow.typeCheck(this.operand);
this.type = typeFlow.voidType;
return this;
case NodeType.Typeof:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.operand = typeFlow.typeCheck(this.operand);
this.type = typeFlow.stringType;
return this;
case NodeType.Delete:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.operand = typeFlow.typeCheck(this.operand);
this.type = typeFlow.booleanType;
break;
case NodeType.TypeAssertion:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.castTerm = typeFlow.typeCheck(this.castTerm);
var applyTargetType = !this.operand.isParenthesized;
var targetType = applyTargetType ? this.castTerm.type : null;
typeFlow.checker.typeCheckWithContextualType(targetType, typeFlow.checker.inProvisionalTypecheckMode(), true, this.operand);
typeFlow.castWithCoercion(this.operand, this.castTerm.type, false, true);
this.type = this.castTerm.type;
return this;
case NodeType.Void:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
// REVIEW - Although this is good to do for completeness's sake,
// this shouldn't be strictly necessary from the void operator's
// point of view
this.operand = typeFlow.typeCheck(this.operand);
this.type = typeFlow.checker.undefinedType;
break;
default:
throw new Error("please implement in derived class");
}
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
switch (this.nodeType) {
case NodeType.IncPost:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitJavascript(this.operand, TokenID.PlusPlus, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput("++");
break;
case NodeType.LogNot:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("!");
emitter.emitJavascript(this.operand, TokenID.Exclamation, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.DecPost:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitJavascript(this.operand, TokenID.MinusMinus, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput("--");
break;
case NodeType.ObjectLit:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitObjectLiteral(<ASTList>this.operand);
break;
case NodeType.ArrayLit:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitArrayLiteral(<ASTList>this.operand);
break;
case NodeType.Not:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("~");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.Neg:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("-");
if (this.operand.nodeType == NodeType.Neg) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.operand.isParenthesized = true;
}
emitter.emitJavascript(this.operand, TokenID.Minus, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.Pos:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("+");
if (this.operand.nodeType == NodeType.Pos) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.operand.isParenthesized = true;
}
emitter.emitJavascript(this.operand, TokenID.Plus, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.IncPre:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("++");
emitter.emitJavascript(this.operand, TokenID.PlusPlus, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.DecPre:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("--");
emitter.emitJavascript(this.operand, TokenID.MinusMinus, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.Throw:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("throw ");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(";");
break;
case NodeType.Typeof:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("typeof ");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.Delete:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("delete ");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.Void:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("void ");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.TypeAssertion:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
default:
throw new Error("please implement in derived class");
}
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
export class CallExpression extends Expression {
constructor (nodeType: NodeType,
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
public target: AST,
public arguments: ASTList) {
~~~~~~~~~
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
super(nodeType);
this.minChar = this.target.minChar;
}
public signature: Signature = null;
~~~~~~~~~
!!! error TS2304: Cannot find name 'Signature'.
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
if (this.nodeType == NodeType.New) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckNew(this);
}
else {
return typeFlow.typeCheckCall(this);
}
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.nodeType == NodeType.New) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitNew(this.target, this.arguments);
}
else {
emitter.emitCall(this, this.target, this.arguments);
}
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
export class BinaryExpression extends Expression {
constructor (nodeType: NodeType, public operand1: AST, public operand2: AST) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
super(nodeType);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
switch (this.nodeType) {
case NodeType.Dot:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckDotOperator(this);
case NodeType.Asg:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckAsgOperator(this);
case NodeType.Add:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Sub:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Mul:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Div:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Mod:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Or:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.And:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckArithmeticOperator(this, false);
case NodeType.Xor:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckBitwiseOperator(this, false);
case NodeType.Ne:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Eq:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
var text: string;
if (typeFlow.checker.styleSettings.eqeqeq) {
text = nodeTypeTable[this.nodeType];
~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'nodeTypeTable'.
typeFlow.checker.errorReporter.styleError(this, "use of " + text);
}
else if (typeFlow.checker.styleSettings.eqnull) {
text = nodeTypeTable[this.nodeType];
~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'nodeTypeTable'.
if ((this.operand2 !== null) && (this.operand2.nodeType == NodeType.Null)) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
typeFlow.checker.errorReporter.styleError(this, "use of " + text + " to compare with null");
}
}
case NodeType.Eqv:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.NEqv:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Lt:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Le:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Ge:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Gt:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckBooleanOperator(this);
case NodeType.Index:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckIndex(this);
case NodeType.Member:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.type = typeFlow.voidType;
return this;
case NodeType.LogOr:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckLogOr(this);
case NodeType.LogAnd:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckLogAnd(this);
case NodeType.AsgAdd:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.AsgSub:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.AsgMul:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.AsgDiv:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.AsgMod:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.AsgOr:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.AsgAnd:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckArithmeticOperator(this, true);
case NodeType.AsgXor:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckBitwiseOperator(this, true);
case NodeType.Lsh:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Rsh:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.Rs2:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckShift(this, false);
case NodeType.AsgLsh:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.AsgRsh:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
case NodeType.AsgRs2:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckShift(this, true);
case NodeType.Comma:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckCommaOperator(this);
case NodeType.InstOf:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckInstOf(this);
case NodeType.In:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return typeFlow.typeCheckInOperator(this);
case NodeType.From:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
typeFlow.checker.errorReporter.simpleError(this, "Illegal use of 'from' keyword in binary expression");
break;
default:
throw new Error("please implement in derived class");
}
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
var binTokenId = nodeTypeToTokTable[this.nodeType];
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'nodeTypeToTokTable'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (binTokenId != undefined) {
emitter.emitJavascript(this.operand1, binTokenId, false);
if (tokenTable[binTokenId].text == "instanceof") {
~~~~~~~~~~
!!! error TS2304: Cannot find name 'tokenTable'.
emitter.writeToOutput(" instanceof ");
}
else if (tokenTable[binTokenId].text == "in") {
~~~~~~~~~~
!!! error TS2304: Cannot find name 'tokenTable'.
emitter.writeToOutput(" in ");
}
else {
emitter.writeToOutputTrimmable(" " + tokenTable[binTokenId].text + " ");
~~~~~~~~~~
!!! error TS2304: Cannot find name 'tokenTable'.
}
emitter.emitJavascript(this.operand2, binTokenId, false);
}
else {
switch (this.nodeType) {
case NodeType.Dot:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (!emitter.tryEmitConstant(this)) {
emitter.emitJavascript(this.operand1, TokenID.Dot, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(".");
emitter.emitJavascriptName(<Identifier>this.operand2, false);
}
break;
case NodeType.Index:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitIndex(this.operand1, this.operand2);
break;
case NodeType.Member:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (this.operand2.nodeType == NodeType.FuncDecl && (<FuncDecl>this.operand2).isAccessor()) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
var funcDecl = <FuncDecl>this.operand2;
if (hasFlag(funcDecl.fncFlags, FncFlags.GetAccessor)) {
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
emitter.writeToOutput("get ");
}
else {
emitter.writeToOutput("set ");
}
emitter.emitJavascript(this.operand1, TokenID.Colon, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
}
else {
emitter.emitJavascript(this.operand1, TokenID.Colon, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutputTrimmable(": ");
}
emitter.emitJavascript(this.operand2, TokenID.Comma, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.Comma:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitJavascript(this.operand1, TokenID.Comma, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
if (emitter.emitState.inObjectLiteral) {
emitter.writeLineToOutput(", ");
}
else {
emitter.writeToOutput(",");
}
emitter.emitJavascript(this.operand2, TokenID.Comma, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
break;
case NodeType.Is:
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
throw new Error("should be de-sugared during type check");
default:
throw new Error("please implement in derived class");
}
}
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
export class ConditionalExpression extends Expression {
constructor (public operand1: AST,
public operand2: AST,
public operand3: AST) {
super(NodeType.ConditionalExpression);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckQMark(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitJavascript(this.operand1, TokenID.Question, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(" ? ");
emitter.emitJavascript(this.operand2, TokenID.Question, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(" : ");
emitter.emitJavascript(this.operand3, TokenID.Question, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
export class NumberLiteral extends Expression {
constructor (public value: number, public hasEmptyFraction?: boolean) {
super(NodeType.NumberLit);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isNegativeZero = false;
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.type = typeFlow.doubleType;
return this;
}
public treeViewLabel() {
return "num: " + this.printLabel();
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.isNegativeZero) {
emitter.writeToOutput("-");
}
emitter.writeToOutput(this.value.toString());
if (this.hasEmptyFraction)
emitter.writeToOutput(".0");
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public printLabel() {
if (Math.floor(this.value) != this.value) {
return this.value.toFixed(2).toString();
}
else if (this.hasEmptyFraction) {
return this.value.toString() + ".0";
}
else {
return this.value.toString();
}
}
}
export class RegexLiteral extends Expression {
constructor (public regex) {
super(NodeType.Regex);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.type = typeFlow.regexType;
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput(this.regex.toString());
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
export class StringLiteral extends Expression {
constructor (public text: string) {
super(NodeType.QString);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitStringLiteral(this.text);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.type = typeFlow.stringType;
return this;
}
public treeViewLabel() {
return "st: " + this.text;
}
public printLabel() {
return this.text;
}
}
export class ModuleElement extends AST {
constructor (nodeType: NodeType) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
super(nodeType);
}
}
export class ImportDeclaration extends ModuleElement {
public isStatementOrExpression() { return true; }
public varFlags = VarFlags.None;
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
public isDynamicImport = false;
constructor (public id: Identifier, public alias: AST) {
super(NodeType.ImportDeclaration);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
var mod = <ModuleType>this.alias.type;
~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleType'.
// REVIEW: Only modules may be aliased for now, though there's no real
// restriction on what the type symbol may be
if (!this.isDynamicImport || (this.id.sym && !(<TypeSymbol>this.id.sym).onlyReferencedAsTypeRef)) {
~~~~~~~~~~
!!! error TS2304: Cannot find name 'TypeSymbol'.
var prevModAliasId = emitter.modAliasId;
var prevFirstModAlias = emitter.firstModAlias;
emitter.recordSourceMappingStart(this);
emitter.emitParensAndCommentsInPlace(this, true);
emitter.writeToOutput("var " + this.id.actualText + " = ");
emitter.modAliasId = this.id.actualText;
emitter.firstModAlias = this.firstAliasedModToString();
emitter.emitJavascript(this.alias, TokenID.Tilde, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
// the dynamic import case will insert the semi-colon automatically
if (!this.isDynamicImport) {
emitter.writeToOutput(";");
}
emitter.emitParensAndCommentsInPlace(this, false);
emitter.recordSourceMappingEnd(this);
emitter.modAliasId = prevModAliasId;
emitter.firstModAlias = prevFirstModAlias;
}
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckImportDecl(this);
}
public getAliasName(aliasAST?: AST = this.alias) : string {
~~~~~~~~
!!! error TS1015: Parameter cannot have question mark and initializer.
if (aliasAST.nodeType == NodeType.Name) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return (<Identifier>aliasAST).actualText;
} else {
var dotExpr = <BinaryExpression>aliasAST;
return this.getAliasName(dotExpr.operand1) + "." + this.getAliasName(dotExpr.operand2);
}
}
public firstAliasedModToString() {
if (this.alias.nodeType == NodeType.Name) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return (<Identifier>this.alias).actualText;
}
else {
var dotExpr = <BinaryExpression>this.alias;
var firstMod = <Identifier>dotExpr.operand1;
return firstMod.actualText;
}
}
}
export class BoundDecl extends AST {
public init: AST = null;
public typeExpr: AST = null;
public varFlags = VarFlags.None;
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
public sym: Symbol = null;
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
constructor (public id: Identifier, nodeType: NodeType, public nestingLevel: number) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
super(nodeType);
}
public isStatementOrExpression() { return true; }
public isPrivate() { return hasFlag(this.varFlags, VarFlags.Private); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
public isPublic() { return hasFlag(this.varFlags, VarFlags.Public); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
public isProperty() { return hasFlag(this.varFlags, VarFlags.Property); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckBoundDecl(this);
}
public printLabel() {
return this.treeViewLabel();
}
}
export class VarDecl extends BoundDecl {
constructor (id: Identifier, nest: number) {
super(id, NodeType.VarDecl, nest);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isAmbient() { return hasFlag(this.varFlags, VarFlags.Ambient); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
public isExported() { return hasFlag(this.varFlags, VarFlags.Exported); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
public isStatic() { return hasFlag(this.varFlags, VarFlags.Static); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitJavascriptVarDecl(this, tokenId);
}
public treeViewLabel() {
return "var " + this.id.actualText;
}
}
export class ArgDecl extends BoundDecl {
constructor (id: Identifier) {
super(id, NodeType.ArgDecl, 0);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isOptional = false;
public isOptionalArg() { return this.isOptional || this.init; }
public treeViewLabel() {
return "arg: " + this.id.actualText;
}
public parameterPropertySym: FieldSymbol = null;
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'FieldSymbol'.
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput(this.id.actualText);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
var internalId = 0;
export class FuncDecl extends AST {
public hint: string = null;
public fncFlags = FncFlags.None;
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public returnTypeAnnotation: AST = null;
public symbols: IHashTable;
~~~~~~~~~~
!!! error TS2304: Cannot find name 'IHashTable'.
public variableArgList = false;
public signature: Signature;
~~~~~~~~~
!!! error TS2304: Cannot find name 'Signature'.
public envids: Identifier[];
public jumpRefs: Identifier[] = null;
public internalNameCache: string = null;
public tmp1Declared = false;
public enclosingFnc: FuncDecl = null;
public freeVariables: Symbol[] = [];
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
public unitIndex = -1;
public classDecl: NamedDeclaration = null;
public boundToProperty: VarDecl = null;
public isOverload = false;
public innerStaticFuncs: FuncDecl[] = [];
public isTargetTypedAsMethod = false;
public isInlineCallLiteral = false;
public accessorSymbol: Symbol = null;
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
public leftCurlyCount = 0;
public rightCurlyCount = 0;
public returnStatementsWithExpressions: ReturnStatement[] = [];
public scopeType: Type = null; // Type of the FuncDecl, before target typing
~~~~
!!! error TS2304: Cannot find name 'Type'.
public endingToken: ASTSpan = null;
constructor (public name: Identifier, public bod: ASTList, public isConstructor: boolean,
public arguments: ASTList, public vars: ASTList, public scopes: ASTList, public statics: ASTList,
~~~~~~~~~
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
nodeType: number) {
super(nodeType);
}
public internalName(): string {
if (this.internalNameCache == null) {
var extName = this.getNameText();
if (extName) {
this.internalNameCache = "_internal_" + extName;
}
else {
this.internalNameCache = "_internal_" + internalId++;
}
}
return this.internalNameCache;
}
public hasSelfReference() { return hasFlag(this.fncFlags, FncFlags.HasSelfReference); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public setHasSelfReference() { this.fncFlags |= FncFlags.HasSelfReference; }
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public addCloRef(id: Identifier, sym: Symbol): number {
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
if (this.envids == null) {
this.envids = new Identifier[];
~~
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
}
this.envids[this.envids.length] = id;
var outerFnc = this.enclosingFnc;
if (sym) {
while (outerFnc && (outerFnc.type.symbol != sym.container)) {
outerFnc.addJumpRef(sym);
outerFnc = outerFnc.enclosingFnc;
}
}
return this.envids.length - 1;
}
public addJumpRef(sym: Symbol): void {
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
if (this.jumpRefs == null) {
this.jumpRefs = new Identifier[];
~~
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
}
var id = new Identifier(sym.name);
this.jumpRefs[this.jumpRefs.length] = id;
id.sym = sym;
id.cloId = this.addCloRef(id, null);
}
public buildControlFlow(): ControlFlowContext {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var entry = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var exit = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var context = new ControlFlowContext(entry, exit);
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var controlFlowPrefix = (ast: AST, parent: AST, walker: IAstWalker) => {
~~~~~~~~~~
!!! error TS2304: Cannot find name 'IAstWalker'.
ast.addToControlFlow(walker.state);
return ast;
}
var walker = getAstWalkerFactory().getWalker(controlFlowPrefix, null, null, context);
~~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'getAstWalkerFactory'.
context.walker = walker;
walker.walk(this.bod, this);
return context;
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckFunction(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitJavascriptFunction(this);
}
public getNameText() {
if (this.name) {
return this.name.actualText;
}
else {
return this.hint;
}
}
public isMethod() {
return (this.fncFlags & FncFlags.Method) != FncFlags.None;
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
}
public isCallMember() { return hasFlag(this.fncFlags, FncFlags.CallMember); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isConstructMember() { return hasFlag(this.fncFlags, FncFlags.ConstructMember); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isIndexerMember() { return hasFlag(this.fncFlags, FncFlags.IndexerMember); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isSpecialFn() { return this.isCallMember() || this.isIndexerMember() || this.isConstructMember(); }
public isAnonymousFn() { return this.name === null; }
public isAccessor() { return hasFlag(this.fncFlags, FncFlags.GetAccessor) || hasFlag(this.fncFlags, FncFlags.SetAccessor); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isGetAccessor() { return hasFlag(this.fncFlags, FncFlags.GetAccessor); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isSetAccessor() { return hasFlag(this.fncFlags, FncFlags.SetAccessor); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isAmbient() { return hasFlag(this.fncFlags, FncFlags.Ambient); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isExported() { return hasFlag(this.fncFlags, FncFlags.Exported); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isPrivate() { return hasFlag(this.fncFlags, FncFlags.Private); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isPublic() { return hasFlag(this.fncFlags, FncFlags.Public); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public isStatic() { return hasFlag(this.fncFlags, FncFlags.Static); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public treeViewLabel() {
if (this.name == null) {
return "funcExpr";
}
else {
return "func: " + this.name.actualText
}
}
public ClearFlags(): void {
this.fncFlags = FncFlags.None;
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
}
public isSignature() { return (this.fncFlags & FncFlags.Signature) != FncFlags.None; }
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
~~~~~~~~
!!! error TS2304: Cannot find name 'FncFlags'.
public hasStaticDeclarations() { return (!this.isConstructor && (this.statics.members.length > 0 || this.innerStaticFuncs.length > 0)); }
}
export class LocationInfo {
constructor (public filename: string, public lineMap: number[], public unitIndex) { }
}
export var unknownLocationInfo = new LocationInfo("unknown", null, -1);
export class Script extends FuncDecl {
public locationInfo: LocationInfo = null;
public referencedFiles: IFileReference[] = [];
~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'IFileReference'.
public requiresGlobal = false;
public requiresInherits = false;
public isResident = false;
public isDeclareFile = false;
public hasBeenTypeChecked = false;
public topLevelMod: ModuleDeclaration = null;
public leftCurlyCount = 0;
public rightCurlyCount = 0;
public vars: ASTList;
public scopes: ASTList;
// Remember if the script contains Unicode chars, that is needed when generating code for this script object to decide the output file correct encoding.
public containsUnicodeChar = false;
public containsUnicodeCharInComment = false;
constructor (vars: ASTList, scopes: ASTList) {
super(new Identifier("script"), null, false, null, vars, scopes, null, NodeType.Script);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.vars = vars;
this.scopes = scopes;
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckScript(this);
}
public treeViewLabel() {
return "Script";
}
public emitRequired() {
if (!this.isDeclareFile && !this.isResident && this.bod) {
for (var i = 0, len = this.bod.members.length; i < len; i++) {
var stmt = this.bod.members[i];
if (stmt.nodeType == NodeType.ModuleDeclaration) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (!hasFlag((<ModuleDeclaration>stmt).modFlags, ModuleFlags.ShouldEmitModuleDecl | ModuleFlags.Ambient)) {
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleFlags'.
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleFlags'.
return true;
}
}
else if (stmt.nodeType == NodeType.ClassDeclaration) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (!hasFlag((<InterfaceDeclaration>stmt).varFlags, VarFlags.Ambient)) {
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
return true;
}
}
else if (stmt.nodeType == NodeType.VarDecl) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (!hasFlag((<VarDecl>stmt).varFlags, VarFlags.Ambient)) {
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
return true;
}
}
else if (stmt.nodeType == NodeType.FuncDecl) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (!(<FuncDecl>stmt).isSignature()) {
return true;
}
}
else if (stmt.nodeType != NodeType.InterfaceDeclaration && stmt.nodeType != NodeType.Empty) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
return true;
}
}
}
return false;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
if (this.emitRequired()) {
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitJavascriptList(this.bod, null, TokenID.Semicolon, true, false, false, true, this.requiresInherits);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
}
export class NamedDeclaration extends ModuleElement {
public leftCurlyCount = 0;
public rightCurlyCount = 0;
constructor (nodeType: NodeType,
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
public name: Identifier,
public members: ASTList) {
super(nodeType);
}
}
export class ModuleDeclaration extends NamedDeclaration {
public modFlags = ModuleFlags.ShouldEmitModuleDecl;
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleFlags'.
public mod: ModuleType;
~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleType'.
public prettyName: string;
public amdDependencies: string[] = [];
public vars: ASTList;
public scopes: ASTList;
// Remember if the module contains Unicode chars, that is needed for dynamic module as we will generate a file for each.
public containsUnicodeChar = false;
public containsUnicodeCharInComment = false;
constructor (name: Identifier, members: ASTList, vars: ASTList, scopes: ASTList, public endingToken: ASTSpan) {
super(NodeType.ModuleDeclaration, name, members);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.vars = vars;
this.scopes = scopes;
this.prettyName = this.name.actualText;
}
public isExported() { return hasFlag(this.modFlags, ModuleFlags.Exported); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleFlags'.
public isAmbient() { return hasFlag(this.modFlags, ModuleFlags.Ambient); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleFlags'.
public isEnum() { return hasFlag(this.modFlags, ModuleFlags.IsEnum); }
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleFlags'.
public recordNonInterface() {
this.modFlags &= ~ModuleFlags.ShouldEmitModuleDecl;
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleFlags'.
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckModule(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
if (!hasFlag(this.modFlags, ModuleFlags.ShouldEmitModuleDecl)) {
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ModuleFlags'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitJavascriptModule(this);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
}
export class TypeDeclaration extends NamedDeclaration {
public varFlags = VarFlags.None;
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
constructor (nodeType: NodeType,
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
name: Identifier,
public extendsList: ASTList,
public implementsList: ASTList,
members: ASTList) {
super(nodeType, name, members);
}
public isExported() {
return hasFlag(this.varFlags, VarFlags.Exported);
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
}
public isAmbient() {
return hasFlag(this.varFlags, VarFlags.Ambient);
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
}
}
export class ClassDeclaration extends TypeDeclaration {
public knownMemberNames: any = {};
public constructorDecl: FuncDecl = null;
public constructorNestingLevel = 0;
public endingToken: ASTSpan = null;
constructor (name: Identifier,
members: ASTList,
extendsList: ASTList,
implementsList: ASTList) {
super(NodeType.ClassDeclaration, name, extendsList, implementsList, members);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckClass(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitJavascriptClass(this);
}
}
export class InterfaceDeclaration extends TypeDeclaration {
constructor (name: Identifier,
members: ASTList,
extendsList: ASTList,
implementsList: ASTList) {
super(NodeType.InterfaceDeclaration, name, extendsList, implementsList, members);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckInterface(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
}
}
export class Statement extends ModuleElement {
constructor (nodeType: NodeType) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
super(nodeType);
this.flags |= ASTFlags.IsStatement;
~~~~~~~~
!!! error TS2304: Cannot find name 'ASTFlags'.
}
public isLoop() { return false; }
public isStatementOrExpression() { return true; }
public isCompoundStatement() { return this.isLoop(); }
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.type = typeFlow.voidType;
return this;
}
}
export class LabeledStatement extends Statement {
constructor (public labels: ASTList, public stmt: AST) {
super(NodeType.LabeledStatement);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.labels) {
var labelsLen = this.labels.members.length;
for (var i = 0; i < labelsLen; i++) {
this.labels.members[i].emit(emitter, tokenId, startLine);
}
}
this.stmt.emit(emitter, tokenId, true);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
typeFlow.typeCheck(this.labels);
this.stmt = this.stmt.typeCheck(typeFlow);
return this;
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var beforeBB = context.current;
var bb = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
context.current = bb;
beforeBB.addSuccessor(bb);
}
}
export class Block extends Statement {
constructor (public statements: ASTList,
public isStatementBlock: boolean) {
super(NodeType.Block);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.isStatementBlock) {
emitter.writeLineToOutput(" {");
emitter.indenter.increaseIndent();
} else {
emitter.setInVarBlock(this.statements.members.length);
}
var temp = emitter.setInObjectLiteral(false);
if (this.statements) {
emitter.emitJavascriptList(this.statements, null, TokenID.Semicolon, true, false, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
}
if (this.isStatementBlock) {
emitter.indenter.decreaseIndent();
emitter.emitIndent();
emitter.writeToOutput("}");
}
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var afterIfNeeded = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
context.pushStatement(this, context.current, afterIfNeeded);
if (this.statements) {
context.walk(this.statements, this);
}
context.walker.options.goChildren = false;
context.popStatement();
if (afterIfNeeded.predecessors.length > 0) {
context.current.addSuccessor(afterIfNeeded);
context.current = afterIfNeeded;
}
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
if (!typeFlow.checker.styleSettings.emptyBlocks) {
if ((this.statements === null) || (this.statements.members.length == 0)) {
typeFlow.checker.errorReporter.styleError(this, "empty block");
}
}
typeFlow.typeCheck(this.statements);
return this;
}
}
export class Jump extends Statement {
public target: string = null;
public hasExplicitTarget() { return (this.target); }
public resolvedTarget: Statement = null;
constructor (nodeType: NodeType) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
super(nodeType);
}
public setResolvedTarget(parser: Parser, stmt: Statement): boolean {
~~~~~~
!!! error TS2304: Cannot find name 'Parser'.
if (stmt.isLoop()) {
this.resolvedTarget = stmt;
return true;
}
if (this.nodeType === NodeType.Continue) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
parser.reportParseError("continue statement applies only to loops");
return false;
}
else {
if ((stmt.nodeType == NodeType.Switch) || this.hasExplicitTarget()) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
this.resolvedTarget = stmt;
return true;
}
else {
parser.reportParseError("break statement with no label can apply only to a loop or switch statement");
return false;
}
}
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
super.addToControlFlow(context);
context.unconditionalBranch(this.resolvedTarget, (this.nodeType == NodeType.Continue));
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.nodeType == NodeType.Break) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.writeToOutput("break");
}
else {
emitter.writeToOutput("continue");
}
if (this.hasExplicitTarget()) {
emitter.writeToOutput(" " + this.target);
}
emitter.recordSourceMappingEnd(this);
emitter.writeToOutput(";");
emitter.emitParensAndCommentsInPlace(this, false);
}
}
export class WhileStatement extends Statement {
public body: AST = null;
constructor (public cond: AST) {
super(NodeType.While);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isLoop() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
emitter.writeToOutput("while(");
emitter.emitJavascript(this.cond, TokenID.While, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(")");
emitter.emitJavascriptStatements(this.body, false, false);
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckWhile(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var loopHeader = context.current;
var loopStart = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var afterLoop = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
loopHeader.addSuccessor(loopStart);
context.current = loopStart;
context.addContent(this.cond);
var condBlock = context.current;
var targetInfo: ITargetInfo = null;
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ITargetInfo'.
if (this.body) {
context.current = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
condBlock.addSuccessor(context.current);
context.pushStatement(this, loopStart, afterLoop);
context.walk(this.body, this);
targetInfo = context.popStatement();
}
if (!(context.noContinuation)) {
var loopEnd = context.current;
loopEnd.addSuccessor(loopStart);
}
context.current = afterLoop;
condBlock.addSuccessor(afterLoop);
// TODO: check for while (true) and then only continue if afterLoop has predecessors
context.noContinuation = false;
context.walker.options.goChildren = false;
}
}
export class DoWhileStatement extends Statement {
public body: AST = null;
public whileAST: AST = null;
public cond: AST = null;
public isLoop() { return true; }
constructor () {
super(NodeType.DoWhile);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
emitter.writeToOutput("do");
emitter.emitJavascriptStatements(this.body, true, false);
emitter.recordSourceMappingStart(this.whileAST);
emitter.writeToOutput("while");
emitter.recordSourceMappingEnd(this.whileAST);
emitter.writeToOutput('(');
emitter.emitJavascript(this.cond, TokenID.CloseParen, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(")");
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckDoWhile(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var loopHeader = context.current;
var loopStart = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var afterLoop = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
loopHeader.addSuccessor(loopStart);
context.current = loopStart;
var targetInfo: ITargetInfo = null;
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ITargetInfo'.
if (this.body) {
context.pushStatement(this, loopStart, afterLoop);
context.walk(this.body, this);
targetInfo = context.popStatement();
}
if (!(context.noContinuation)) {
var loopEnd = context.current;
loopEnd.addSuccessor(loopStart);
context.addContent(this.cond);
// TODO: check for while (true)
context.current = afterLoop;
loopEnd.addSuccessor(afterLoop);
}
else {
context.addUnreachable(this.cond);
}
context.walker.options.goChildren = false;
}
}
export class IfStatement extends Statement {
public thenBod: AST;
public elseBod: AST = null;
public statement: ASTSpan = new ASTSpan();
constructor (public cond: AST) {
super(NodeType.If);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isCompoundStatement() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
emitter.recordSourceMappingStart(this.statement);
emitter.writeToOutput("if(");
emitter.emitJavascript(this.cond, TokenID.If, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(")");
emitter.recordSourceMappingEnd(this.statement);
emitter.emitJavascriptStatements(this.thenBod, true, false);
if (this.elseBod) {
emitter.writeToOutput(" else");
emitter.emitJavascriptStatements(this.elseBod, true, true);
}
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckIf(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
this.cond.addToControlFlow(context);
var afterIf = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var beforeIf = context.current;
context.pushStatement(this, beforeIf, afterIf);
var hasContinuation = false;
context.current = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
beforeIf.addSuccessor(context.current);
context.walk(this.thenBod, this);
if (!context.noContinuation) {
hasContinuation = true;
context.current.addSuccessor(afterIf);
}
if (this.elseBod) {
// current block will be thenBod
context.current = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
context.noContinuation = false;
beforeIf.addSuccessor(context.current);
context.walk(this.elseBod, this);
if (!context.noContinuation) {
hasContinuation = true;
context.current.addSuccessor(afterIf);
}
else {
// thenBod created continuation for if statement
if (hasContinuation) {
context.noContinuation = false;
}
}
}
else {
beforeIf.addSuccessor(afterIf);
context.noContinuation = false;
hasContinuation = true;
}
var targetInfo = context.popStatement();
if (afterIf.predecessors.length > 0) {
context.noContinuation = false;
hasContinuation = true;
}
if (hasContinuation) {
context.current = afterIf;
}
context.walker.options.goChildren = false;
}
}
export class ReturnStatement extends Statement {
public returnExpression: AST = null;
constructor () {
super(NodeType.Return);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
if (this.returnExpression) {
emitter.writeToOutput("return ");
emitter.emitJavascript(this.returnExpression, TokenID.Semicolon, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
}
else {
emitter.writeToOutput("return;");
}
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
super.addToControlFlow(context);
context.returnStmt();
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckReturn(this);
}
}
export class EndCode extends AST {
constructor () {
super(NodeType.EndCode);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
}
export class ForInStatement extends Statement {
constructor (public lval: AST, public obj: AST) {
super(NodeType.ForIn);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (this.lval && (this.lval.nodeType == NodeType.VarDecl)) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
(<BoundDecl>this.lval).varFlags |= VarFlags.AutoInit;
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
}
}
public statement: ASTSpan = new ASTSpan();
public body: AST;
public isLoop() { return true; }
public isFiltered() {
if (this.body) {
var singleItem: AST = null;
if (this.body.nodeType == NodeType.List) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
var stmts = <ASTList>this.body;
if (stmts.members.length == 1) {
singleItem = stmts.members[0];
}
}
else {
singleItem = this.body;
}
// match template for filtering 'own' properties from obj
if (singleItem !== null) {
if (singleItem.nodeType == NodeType.Block) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
var block = <Block>singleItem;
if ((block.statements !== null) && (block.statements.members.length == 1)) {
singleItem = block.statements.members[0];
}
}
if (singleItem.nodeType == NodeType.If) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
var cond = (<IfStatement>singleItem).cond;
if (cond.nodeType == NodeType.Call) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
var target = (<CallExpression>cond).target;
if (target.nodeType == NodeType.Dot) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
var binex = <BinaryExpression>target;
if ((binex.operand1.nodeType == NodeType.Name) &&
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
(this.obj.nodeType == NodeType.Name) &&
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
((<Identifier>binex.operand1).actualText == (<Identifier>this.obj).actualText)) {
var prop = <Identifier>binex.operand2;
if (prop.actualText == "hasOwnProperty") {
var args = (<CallExpression>cond).arguments;
if ((args !== null) && (args.members.length == 1)) {
var arg = args.members[0];
if ((arg.nodeType == NodeType.Name) &&
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
(this.lval.nodeType == NodeType.Name)) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (((<Identifier>this.lval).actualText) == (<Identifier>arg).actualText) {
return true;
}
}
}
}
}
}
}
}
}
}
return false;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
emitter.recordSourceMappingStart(this.statement);
emitter.writeToOutput("for(");
emitter.emitJavascript(this.lval, TokenID.For, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(" in ");
emitter.emitJavascript(this.obj, TokenID.For, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(")");
emitter.recordSourceMappingEnd(this.statement);
emitter.emitJavascriptStatements(this.body, true, false);
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
if (typeFlow.checker.styleSettings.forin) {
if (!this.isFiltered()) {
typeFlow.checker.errorReporter.styleError(this, "no hasOwnProperty filter");
}
}
return typeFlow.typeCheckForIn(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
if (this.lval) {
context.addContent(this.lval);
}
if (this.obj) {
context.addContent(this.obj);
}
var loopHeader = context.current;
var loopStart = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var afterLoop = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
loopHeader.addSuccessor(loopStart);
context.current = loopStart;
if (this.body) {
context.pushStatement(this, loopStart, afterLoop);
context.walk(this.body, this);
context.popStatement();
}
if (!(context.noContinuation)) {
var loopEnd = context.current;
loopEnd.addSuccessor(loopStart);
}
context.current = afterLoop;
context.noContinuation = false;
loopHeader.addSuccessor(afterLoop);
context.walker.options.goChildren = false;
}
}
export class ForStatement extends Statement {
public cond: AST;
public body: AST;
public incr: AST;
constructor (public init: AST) {
super(NodeType.For);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isLoop() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
emitter.writeToOutput("for(");
if (this.init) {
if (this.init.nodeType != NodeType.List) {
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
emitter.emitJavascript(this.init, TokenID.For, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
}
else {
emitter.setInVarBlock((<ASTList>this.init).members.length);
emitter.emitJavascriptList(this.init, null, TokenID.For, false, false, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
}
}
emitter.writeToOutput("; ");
emitter.emitJavascript(this.cond, TokenID.For, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput("; ");
emitter.emitJavascript(this.incr, TokenID.For, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(")");
emitter.emitJavascriptStatements(this.body, true, false);
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckFor(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
if (this.init) {
context.addContent(this.init);
}
var loopHeader = context.current;
var loopStart = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var afterLoop = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
loopHeader.addSuccessor(loopStart);
context.current = loopStart;
var condBlock: BasicBlock = null;
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var continueTarget = loopStart;
var incrBB: BasicBlock = null;
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
if (this.incr) {
incrBB = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
continueTarget = incrBB;
}
if (this.cond) {
condBlock = context.current;
context.addContent(this.cond);
context.current = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
condBlock.addSuccessor(context.current);
}
var targetInfo: ITargetInfo = null;
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ITargetInfo'.
if (this.body) {
context.pushStatement(this, continueTarget, afterLoop);
context.walk(this.body, this);
targetInfo = context.popStatement();
}
if (this.incr) {
if (context.noContinuation) {
if (incrBB.predecessors.length == 0) {
context.addUnreachable(this.incr);
}
}
else {
context.current.addSuccessor(incrBB);
context.current = incrBB;
context.addContent(this.incr);
}
}
var loopEnd = context.current;
if (!(context.noContinuation)) {
loopEnd.addSuccessor(loopStart);
}
if (condBlock) {
condBlock.addSuccessor(afterLoop);
context.noContinuation = false;
}
if (afterLoop.predecessors.length > 0) {
context.noContinuation = false;
context.current = afterLoop;
}
context.walker.options.goChildren = false;
}
}
export class WithStatement extends Statement {
public body: AST;
public isCompoundStatement() { return true; }
public withSym: WithSymbol = null;
~~~~~~~~~~
!!! error TS2304: Cannot find name 'WithSymbol'.
constructor (public expr: AST) {
super(NodeType.With);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("with (");
if (this.expr) {
emitter.emitJavascript(this.expr, TokenID.With, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
}
emitter.writeToOutput(")");
emitter.emitJavascriptStatements(this.body, true, false);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
return typeFlow.typeCheckWith(this);
}
}
export class SwitchStatement extends Statement {
public caseList: ASTList;
public defaultCase: CaseStatement = null;
public statement: ASTSpan = new ASTSpan();
constructor (public val: AST) {
super(NodeType.Switch);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isCompoundStatement() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
emitter.recordSourceMappingStart(this.statement);
emitter.writeToOutput("switch(");
emitter.emitJavascript(this.val, TokenID.Identifier, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(")");
emitter.recordSourceMappingEnd(this.statement);
emitter.writeLineToOutput(" {");
emitter.indenter.increaseIndent();
var casesLen = this.caseList.members.length;
for (var i = 0; i < casesLen; i++) {
var caseExpr = this.caseList.members[i];
emitter.emitJavascript(caseExpr, TokenID.Case, true);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeLineToOutput("");
}
emitter.indenter.decreaseIndent();
emitter.emitIndent();
emitter.writeToOutput("}");
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
var len = this.caseList.members.length;
this.val = typeFlow.typeCheck(this.val);
for (var i = 0; i < len; i++) {
this.caseList.members[i] = typeFlow.typeCheck(this.caseList.members[i]);
}
this.defaultCase = <CaseStatement>typeFlow.typeCheck(this.defaultCase);
this.type = typeFlow.voidType;
return this;
}
// if there are break statements that match this switch, then just link cond block with block after switch
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var condBlock = context.current;
context.addContent(this.val);
var execBlock = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var afterSwitch = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
condBlock.addSuccessor(execBlock);
context.pushSwitch(execBlock);
context.current = execBlock;
context.pushStatement(this, execBlock, afterSwitch);
context.walk(this.caseList, this);
context.popSwitch();
var targetInfo = context.popStatement();
var hasCondContinuation = (this.defaultCase == null);
if (this.defaultCase == null) {
condBlock.addSuccessor(afterSwitch);
}
if (afterSwitch.predecessors.length > 0) {
context.noContinuation = false;
context.current = afterSwitch;
}
else {
context.noContinuation = true;
}
context.walker.options.goChildren = false;
}
}
export class CaseStatement extends Statement {
public expr: AST = null;
public body: ASTList;
constructor () {
super(NodeType.Case);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.expr) {
emitter.writeToOutput("case ");
emitter.emitJavascript(this.expr, TokenID.Identifier, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
}
else {
emitter.writeToOutput("default");
}
emitter.writeToOutput(":");
emitter.emitJavascriptStatements(this.body, false, false);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.expr = typeFlow.typeCheck(this.expr);
typeFlow.typeCheck(this.body);
this.type = typeFlow.voidType;
return this;
}
// TODO: more reasoning about unreachable cases (such as duplicate literals as case expressions)
// for now, assume all cases are reachable, regardless of whether some cases fall through
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var execBlock = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
var sw = context.currentSwitch[context.currentSwitch.length - 1];
// TODO: fall-through from previous (+ to end of switch)
if (this.expr) {
var exprBlock = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
context.current = exprBlock;
sw.addSuccessor(exprBlock);
context.addContent(this.expr);
exprBlock.addSuccessor(execBlock);
}
else {
sw.addSuccessor(execBlock);
}
context.current = execBlock;
if (this.body) {
context.walk(this.body, this);
}
context.noContinuation = false;
context.walker.options.goChildren = false;
}
}
export class TypeReference extends AST {
constructor (public term: AST, public arrayCount: number) {
super(NodeType.TypeRef);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
throw new Error("should not emit a type ref");
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
var prevInTCTR = typeFlow.inTypeRefTypeCheck;
typeFlow.inTypeRefTypeCheck = true;
var typeLink = getTypeLink(this, typeFlow.checker, true);
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'getTypeLink'.
typeFlow.checker.resolveTypeLink(typeFlow.scope, typeLink, false);
if (this.term) {
typeFlow.typeCheck(this.term);
}
typeFlow.checkForVoidConstructor(typeLink.type, this);
this.type = typeLink.type;
// in error recovery cases, there may not be a term
if (this.term) {
this.term.type = this.type;
}
typeFlow.inTypeRefTypeCheck = prevInTCTR;
return this;
}
}
export class TryFinally extends Statement {
constructor (public tryNode: AST, public finallyNode: Finally) {
super(NodeType.TryFinally);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isCompoundStatement() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingStart(this);
emitter.emitJavascript(this.tryNode, TokenID.Try, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitJavascript(this.finallyNode, TokenID.Finally, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingEnd(this);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.tryNode = typeFlow.typeCheck(this.tryNode);
this.finallyNode = <Finally>typeFlow.typeCheck(this.finallyNode);
this.type = typeFlow.voidType;
return this;
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var afterFinally = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
context.walk(this.tryNode, this);
var finBlock = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
if (context.current) {
context.current.addSuccessor(finBlock);
}
context.current = finBlock;
context.pushStatement(this, null, afterFinally);
context.walk(this.finallyNode, this);
if (!context.noContinuation && context.current) {
context.current.addSuccessor(afterFinally);
}
if (afterFinally.predecessors.length > 0) {
context.current = afterFinally;
}
else {
context.noContinuation = true;
}
context.popStatement();
context.walker.options.goChildren = false;
}
}
export class TryCatch extends Statement {
constructor (public tryNode: Try, public catchNode: Catch) {
super(NodeType.TryCatch);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public isCompoundStatement() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitJavascript(this.tryNode, TokenID.Try, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitJavascript(this.catchNode, TokenID.Catch, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
var beforeTry = context.current;
var tryBlock = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
beforeTry.addSuccessor(tryBlock);
context.current = tryBlock;
var afterTryCatch = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
context.pushStatement(this, null, afterTryCatch);
context.walk(this.tryNode, this);
if (!context.noContinuation) {
if (context.current) {
context.current.addSuccessor(afterTryCatch);
}
}
context.current = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
beforeTry.addSuccessor(context.current);
context.walk(this.catchNode, this);
context.popStatement();
if (!context.noContinuation) {
if (context.current) {
context.current.addSuccessor(afterTryCatch);
}
}
context.current = afterTryCatch;
context.walker.options.goChildren = false;
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.tryNode = <Try>typeFlow.typeCheck(this.tryNode);
this.catchNode = <Catch>typeFlow.typeCheck(this.catchNode);
this.type = typeFlow.voidType;
return this;
}
}
export class Try extends Statement {
constructor (public body: AST) {
super(NodeType.Try);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("try ");
emitter.emitJavascript(this.body, TokenID.Try, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.body = typeFlow.typeCheck(this.body);
return this;
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
if (this.body) {
context.walk(this.body, this);
}
context.walker.options.goChildren = false;
context.noContinuation = false;
}
}
export class Catch extends Statement {
constructor (public param: VarDecl, public body: AST) {
super(NodeType.Catch);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
if (this.param) {
this.param.varFlags |= VarFlags.AutoInit;
~~~~~~~~
!!! error TS2304: Cannot find name 'VarFlags'.
}
}
public statement: ASTSpan = new ASTSpan();
public containedScope: SymbolScope = null;
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'SymbolScope'.
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput(" ");
emitter.recordSourceMappingStart(this.statement);
emitter.writeToOutput("catch (");
emitter.emitJavascript(this.param, TokenID.OpenParen, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.writeToOutput(")");
emitter.recordSourceMappingEnd(this.statement);
emitter.emitJavascript(this.body, TokenID.Catch, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
if (this.param) {
context.addContent(this.param);
var bodBlock = new BasicBlock();
~~~~~~~~~~
!!! error TS2304: Cannot find name 'BasicBlock'.
context.current.addSuccessor(bodBlock);
context.current = bodBlock;
}
if (this.body) {
context.walk(this.body, this);
}
context.noContinuation = false;
context.walker.options.goChildren = false;
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
var prevScope = typeFlow.scope;
typeFlow.scope = this.containedScope;
this.param = <VarDecl>typeFlow.typeCheck(this.param);
var exceptVar = new ValueLocation();
~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ValueLocation'.
var varSym = new VariableSymbol((<VarDecl>this.param).id.text,
~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'VariableSymbol'.
this.param.minChar,
typeFlow.checker.locationInfo.unitIndex,
exceptVar);
exceptVar.symbol = varSym;
exceptVar.typeLink = new TypeLink();
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeLink'.
// var type for now (add syntax for type annotation)
exceptVar.typeLink.type = typeFlow.anyType;
var thisFnc = typeFlow.thisFnc;
if (thisFnc && thisFnc.type) {
exceptVar.symbol.container = thisFnc.type.symbol;
}
else {
exceptVar.symbol.container = null;
}
this.param.sym = exceptVar.symbol;
typeFlow.scope.enter(exceptVar.symbol.container, this.param, exceptVar.symbol,
typeFlow.checker.errorReporter, false, false, false);
this.body = typeFlow.typeCheck(this.body);
// if we're in provisional typecheck mode, clean up the symbol entry
// REVIEW: This is obviously bad form, since we're counting on the internal
// layout of the symbol table, but this is also the only place where we insert
// symbols during typecheck
if (typeFlow.checker.inProvisionalTypecheckMode()) {
var table = typeFlow.scope.getTable();
(<any>table).secondaryTable.table[exceptVar.symbol.name] = undefined;
}
this.type = typeFlow.voidType;
typeFlow.scope = prevScope;
return this;
}
}
export class Finally extends Statement {
constructor (public body: AST) {
super(NodeType.Finally);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("finally");
emitter.emitJavascript(this.body, TokenID.Finally, false);
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'ControlFlowContext'.
if (this.body) {
context.walk(this.body, this);
}
context.walker.options.goChildren = false;
context.noContinuation = false;
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
!!! error TS2304: Cannot find name 'TypeFlow'.
this.body = typeFlow.typeCheck(this.body);
return this;
}
}
export class Comment extends AST {
public text: string[] = null;
constructor (public content: string, public isBlockComment: boolean, public endsLine) {
super(NodeType.Comment);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public getText(): string[] {
if (this.text == null) {
if (this.isBlockComment) {
this.text = this.content.split("\n");
for (var i = 0; i < this.text.length; i++) {
this.text[i] = this.text[i].replace(/^\s+|\s+$/g, '');
}
}
else {
this.text = [(this.content.replace(/^\s+|\s+$/g, ''))];
}
}
return this.text;
}
}
export class DebuggerStatement extends Statement {
constructor () {
super(NodeType.Debugger);
~~~~~~~~
!!! error TS2304: Cannot find name 'NodeType'.
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
!!! error TS2304: Cannot find name 'Emitter'.
~~~~~~~
!!! error TS2304: Cannot find name 'TokenID'.
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeLineToOutput("debugger;");
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
}