2014-09-12 22:35:07 +02:00
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'.
2014-12-17 00:56:56 +01:00
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.
2014-09-12 22:35:07 +02:00
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(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'.
2014-12-17 00:56:56 +01:00
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(867,29): error TS1015: Parameter cannot have question mark and initializer.
2014-09-12 22:35:07 +02:00
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(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'.
2014-12-17 00:56:56 +01:00
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.
2014-09-12 22:35:07 +02:00
tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1022,32): error TS2304: Cannot find name 'Symbol'.
2014-12-17 00:56:56 +01:00
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.
2014-09-12 22:35:07 +02:00
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'.
2014-11-20 03:36:05 +01:00
==== tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts (515 errors) ====
2014-07-13 01:04:16 +02:00
// 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' />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS6053: File 'typescript.ts' not found.
2014-07-13 01:04:16 +02:00
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;
~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Type'.
2014-07-13 01:04:16 +02:00
public flags = ASTFlags.Writeable;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ASTFlags'.
2014-07-13 01:04:16 +02:00
// REVIEW: for diagnostic purposes
public passCreated: number = CompilerDiagnostics.analysisPass;
~~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'CompilerDiagnostics'.
2014-07-13 01:04:16 +02:00
public preComments: Comment[] = null;
public postComments: Comment[] = null;
public isParenthesized = false;
constructor (public nodeType: NodeType) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
super();
}
public isExpression() { return false; }
public isStatementOrExpression() { return false; }
public isCompoundStatement() { return false; }
public isLeaf() { return this.isStatementOrExpression() && (!this.isCompoundStatement()); }
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
switch (this.nodeType) {
case NodeType.Error:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.EmptyExpr:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.anyType;
break;
case NodeType.This:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckThis(this);
case NodeType.Null:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.nullType;
break;
case NodeType.False:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.True:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.booleanType;
break;
case NodeType.Super:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckSuper(this);
case NodeType.EndCode:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Empty:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Void:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.voidType;
break;
default:
throw new Error("please implement in derived class");
}
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
switch (this.nodeType) {
case NodeType.This:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingStart(this);
if (emitter.thisFnc && (hasFlag(emitter.thisFnc.fncFlags, FncFlags.IsFatArrowFunction))) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("_this");
}
else {
emitter.writeToOutput("this");
}
emitter.recordSourceMappingEnd(this);
break;
case NodeType.Null:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("null");
emitter.recordSourceMappingEnd(this);
break;
case NodeType.False:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("false");
emitter.recordSourceMappingEnd(this);
break;
case NodeType.True:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("true");
emitter.recordSourceMappingEnd(this);
break;
case NodeType.Super:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingStart(this);
emitter.emitSuperReference();
emitter.recordSourceMappingEnd(this);
break;
case NodeType.EndCode:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Error:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.EmptyExpr:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Empty:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("; ");
emitter.recordSourceMappingEnd(this);
break;
case NodeType.Void:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'PrintContext'.
2014-07-13 01:04:16 +02:00
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)) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ASTFlags'.
2014-07-13 01:04:16 +02:00
lab += " (Error)";
}
context.writeLine(lab);
}
public printLabel() {
if (nodeTypeTable[this.nodeType] !== undefined) {
~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'nodeTypeTable'.
2014-07-13 01:04:16 +02:00
return nodeTypeTable[this.nodeType];
~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'nodeTypeTable'.
2014-07-13 01:04:16 +02:00
}
else {
return (<any>NodeType)._map[this.nodeType];
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
// 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) {
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Symbol'.
2014-07-13 01:04:16 +02:00
~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'StringHashTable'.
2014-07-13 01:04:16 +02:00
}
public treeViewLabel() {
return (<any>NodeType)._map[this.nodeType];
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.minChar = min;
this.limChar = lim;
}
}
export class ASTList extends AST {
public enclosingScope: SymbolScope = null;
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'SymbolScope'.
2014-07-13 01:04:16 +02:00
public members: AST[] = new AST[];
2014-11-29 23:51:25 +01:00
~~
2014-09-12 00:19:57 +02:00
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
2014-07-13 01:04:16 +02:00
constructor () {
super(NodeType.List);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingStart(this);
emitter.emitJavascriptList(this, null, TokenID.Semicolon, startLine, false, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingEnd(this);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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;
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Symbol'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckName(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascriptName(this, true);
}
public static fromToken(token: Token): Identifier {
~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Token'.
2014-07-13 01:04:16 +02:00
return new Identifier(token.getText(), (<IdentifierToken>token).hasEscapeSequence);
~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'IdentifierToken'.
2014-07-13 01:04:16 +02:00
}
}
export class MissingIdentifier extends Identifier {
constructor () {
super("__missing");
}
public isMissing() {
return true;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
// Emit nothing for a missing ID
}
}
export class Label extends AST {
constructor (public id: Identifier) {
super(NodeType.Label);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public printLabel() { return this.id.actualText + ":"; }
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.voidType;
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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)
~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Type'.
2014-07-13 01:04:16 +02:00
public castTerm: AST = null;
constructor (nodeType: NodeType, public operand: AST) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
super(nodeType);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
super.addToControlFlow(context);
// TODO: add successor as catch block/finally block if present
if (this.nodeType == NodeType.Throw) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
context.returnStmt();
}
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
switch (this.nodeType) {
case NodeType.Not:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckBitNot(this);
case NodeType.LogNot:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckLogNot(this);
case NodeType.Pos:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Neg:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckUnaryNumberOperator(this);
case NodeType.IncPost:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.IncPre:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.DecPost:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.DecPre:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckIncOrDec(this);
case NodeType.ArrayLit:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
typeFlow.typeCheckArrayLit(this);
return this;
case NodeType.ObjectLit:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
typeFlow.typeCheckObjectLit(this);
return this;
case NodeType.Throw:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.operand = typeFlow.typeCheck(this.operand);
this.type = typeFlow.voidType;
return this;
case NodeType.Typeof:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.operand = typeFlow.typeCheck(this.operand);
this.type = typeFlow.stringType;
return this;
case NodeType.Delete:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.operand = typeFlow.typeCheck(this.operand);
this.type = typeFlow.booleanType;
break;
case NodeType.TypeAssertion:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
// 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) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
switch (this.nodeType) {
case NodeType.IncPost:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascript(this.operand, TokenID.PlusPlus, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("++");
break;
case NodeType.LogNot:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("!");
emitter.emitJavascript(this.operand, TokenID.Exclamation, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.DecPost:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascript(this.operand, TokenID.MinusMinus, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("--");
break;
case NodeType.ObjectLit:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.emitObjectLiteral(<ASTList>this.operand);
break;
case NodeType.ArrayLit:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.emitArrayLiteral(<ASTList>this.operand);
break;
case NodeType.Not:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("~");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Neg:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("-");
if (this.operand.nodeType == NodeType.Neg) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.operand.isParenthesized = true;
}
emitter.emitJavascript(this.operand, TokenID.Minus, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Pos:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("+");
if (this.operand.nodeType == NodeType.Pos) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.operand.isParenthesized = true;
}
emitter.emitJavascript(this.operand, TokenID.Plus, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.IncPre:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("++");
emitter.emitJavascript(this.operand, TokenID.PlusPlus, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.DecPre:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("--");
emitter.emitJavascript(this.operand, TokenID.MinusMinus, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Throw:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("throw ");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(";");
break;
case NodeType.Typeof:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("typeof ");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Delete:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("delete ");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Void:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("void ");
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.TypeAssertion:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascript(this.operand, TokenID.Tilde, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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,
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
public target: AST,
public arguments: ASTList) {
super(nodeType);
this.minChar = this.target.minChar;
}
public signature: Signature = null;
~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Signature'.
2014-07-13 01:04:16 +02:00
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
if (this.nodeType == NodeType.New) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckNew(this);
}
else {
return typeFlow.typeCheckCall(this);
}
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.nodeType == NodeType.New) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
super(nodeType);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
switch (this.nodeType) {
case NodeType.Dot:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckDotOperator(this);
case NodeType.Asg:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckAsgOperator(this);
case NodeType.Add:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Sub:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Mul:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Div:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Mod:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Or:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.And:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckArithmeticOperator(this, false);
case NodeType.Xor:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckBitwiseOperator(this, false);
case NodeType.Ne:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Eq:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
var text: string;
if (typeFlow.checker.styleSettings.eqeqeq) {
text = nodeTypeTable[this.nodeType];
~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'nodeTypeTable'.
2014-07-13 01:04:16 +02:00
typeFlow.checker.errorReporter.styleError(this, "use of " + text);
}
else if (typeFlow.checker.styleSettings.eqnull) {
text = nodeTypeTable[this.nodeType];
~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'nodeTypeTable'.
2014-07-13 01:04:16 +02:00
if ((this.operand2 !== null) && (this.operand2.nodeType == NodeType.Null)) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
typeFlow.checker.errorReporter.styleError(this, "use of " + text + " to compare with null");
}
}
case NodeType.Eqv:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.NEqv:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Lt:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Le:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Ge:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Gt:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckBooleanOperator(this);
case NodeType.Index:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckIndex(this);
case NodeType.Member:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.voidType;
return this;
case NodeType.LogOr:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckLogOr(this);
case NodeType.LogAnd:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckLogAnd(this);
case NodeType.AsgAdd:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.AsgSub:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.AsgMul:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.AsgDiv:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.AsgMod:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.AsgOr:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.AsgAnd:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckArithmeticOperator(this, true);
case NodeType.AsgXor:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckBitwiseOperator(this, true);
case NodeType.Lsh:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Rsh:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.Rs2:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckShift(this, false);
case NodeType.AsgLsh:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.AsgRsh:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
case NodeType.AsgRs2:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckShift(this, true);
case NodeType.Comma:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckCommaOperator(this);
case NodeType.InstOf:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckInstOf(this);
case NodeType.In:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckInOperator(this);
case NodeType.From:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
var binTokenId = nodeTypeToTokTable[this.nodeType];
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'nodeTypeToTokTable'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (binTokenId != undefined) {
emitter.emitJavascript(this.operand1, binTokenId, false);
if (tokenTable[binTokenId].text == "instanceof") {
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'tokenTable'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(" instanceof ");
}
else if (tokenTable[binTokenId].text == "in") {
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'tokenTable'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(" in ");
}
else {
emitter.writeToOutputTrimmable(" " + tokenTable[binTokenId].text + " ");
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'tokenTable'.
2014-07-13 01:04:16 +02:00
}
emitter.emitJavascript(this.operand2, binTokenId, false);
}
else {
switch (this.nodeType) {
case NodeType.Dot:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (!emitter.tryEmitConstant(this)) {
emitter.emitJavascript(this.operand1, TokenID.Dot, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(".");
emitter.emitJavascriptName(<Identifier>this.operand2, false);
}
break;
case NodeType.Index:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.emitIndex(this.operand1, this.operand2);
break;
case NodeType.Member:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (this.operand2.nodeType == NodeType.FuncDecl && (<FuncDecl>this.operand2).isAccessor()) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
var funcDecl = <FuncDecl>this.operand2;
if (hasFlag(funcDecl.fncFlags, FncFlags.GetAccessor)) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("get ");
}
else {
emitter.writeToOutput("set ");
}
emitter.emitJavascript(this.operand1, TokenID.Colon, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
}
else {
emitter.emitJavascript(this.operand1, TokenID.Colon, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutputTrimmable(": ");
}
emitter.emitJavascript(this.operand2, TokenID.Comma, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Comma:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascript(this.operand1, TokenID.Comma, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
if (emitter.emitState.inObjectLiteral) {
emitter.writeLineToOutput(", ");
}
else {
emitter.writeToOutput(",");
}
emitter.emitJavascript(this.operand2, TokenID.Comma, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
break;
case NodeType.Is:
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckQMark(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitJavascript(this.operand1, TokenID.Question, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(" ? ");
emitter.emitJavascript(this.operand2, TokenID.Question, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(" : ");
emitter.emitJavascript(this.operand3, TokenID.Question, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
export class NumberLiteral extends Expression {
constructor (public value: number, public hasEmptyFraction?: boolean) {
super(NodeType.NumberLit);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isNegativeZero = false;
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.doubleType;
return this;
}
public treeViewLabel() {
return "num: " + this.printLabel();
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.regexType;
return this;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitStringLiteral(this.text);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
super(nodeType);
}
}
export class ImportDeclaration extends ModuleElement {
public isStatementOrExpression() { return true; }
public varFlags = VarFlags.None;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
public isDynamicImport = false;
constructor (public id: Identifier, public alias: AST) {
super(NodeType.ImportDeclaration);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
var mod = <ModuleType>this.alias.type;
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleType'.
2014-07-13 01:04:16 +02:00
// 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)) {
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeSymbol'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
// 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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckImportDecl(this);
}
public getAliasName(aliasAST?: AST = this.alias) : string {
2014-11-20 03:36:05 +01:00
~~~~~~~~
!!! error TS1015: Parameter cannot have question mark and initializer.
2014-07-13 01:04:16 +02:00
if (aliasAST.nodeType == NodeType.Name) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
public sym: Symbol = null;
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Symbol'.
2014-07-13 01:04:16 +02:00
constructor (public id: Identifier, nodeType: NodeType, public nestingLevel: number) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
super(nodeType);
}
public isStatementOrExpression() { return true; }
public isPrivate() { return hasFlag(this.varFlags, VarFlags.Private); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
public isPublic() { return hasFlag(this.varFlags, VarFlags.Public); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
public isProperty() { return hasFlag(this.varFlags, VarFlags.Property); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckBoundDecl(this);
}
public printLabel() {
return this.treeViewLabel();
}
}
export class VarDecl extends BoundDecl {
constructor (id: Identifier, nest: number) {
super(id, NodeType.VarDecl, nest);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isAmbient() { return hasFlag(this.varFlags, VarFlags.Ambient); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
public isExported() { return hasFlag(this.varFlags, VarFlags.Exported); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
public isStatic() { return hasFlag(this.varFlags, VarFlags.Static); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascriptVarDecl(this, tokenId);
}
public treeViewLabel() {
return "var " + this.id.actualText;
}
}
export class ArgDecl extends BoundDecl {
constructor (id: Identifier) {
super(id, NodeType.ArgDecl, 0);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isOptional = false;
public isOptionalArg() { return this.isOptional || this.init; }
public treeViewLabel() {
return "arg: " + this.id.actualText;
}
public parameterPropertySym: FieldSymbol = null;
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FieldSymbol'.
2014-07-13 01:04:16 +02:00
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public returnTypeAnnotation: AST = null;
public symbols: IHashTable;
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'IHashTable'.
2014-07-13 01:04:16 +02:00
public variableArgList = false;
public signature: Signature;
~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Signature'.
2014-07-13 01:04:16 +02:00
public envids: Identifier[];
public jumpRefs: Identifier[] = null;
public internalNameCache: string = null;
public tmp1Declared = false;
public enclosingFnc: FuncDecl = null;
public freeVariables: Symbol[] = [];
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Symbol'.
2014-07-13 01:04:16 +02:00
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;
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Symbol'.
2014-07-13 01:04:16 +02:00
public leftCurlyCount = 0;
public rightCurlyCount = 0;
public returnStatementsWithExpressions: ReturnStatement[] = [];
public scopeType: Type = null; // Type of the FuncDecl, before target typing
~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Type'.
2014-07-13 01:04:16 +02:00
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,
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); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public setHasSelfReference() { this.fncFlags |= FncFlags.HasSelfReference; }
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public addCloRef(id: Identifier, sym: Symbol): number {
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Symbol'.
2014-07-13 01:04:16 +02:00
if (this.envids == null) {
this.envids = new Identifier[];
2014-11-29 23:51:25 +01:00
~~
2014-09-12 00:19:57 +02:00
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
2014-07-13 01:04:16 +02:00
}
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 {
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Symbol'.
2014-07-13 01:04:16 +02:00
if (this.jumpRefs == null) {
this.jumpRefs = new Identifier[];
2014-11-29 23:51:25 +01:00
~~
2014-09-12 00:19:57 +02:00
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
2014-07-13 01:04:16 +02:00
}
var id = new Identifier(sym.name);
this.jumpRefs[this.jumpRefs.length] = id;
id.sym = sym;
id.cloId = this.addCloRef(id, null);
}
public buildControlFlow(): ControlFlowContext {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var entry = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var exit = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var context = new ControlFlowContext(entry, exit);
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var controlFlowPrefix = (ast: AST, parent: AST, walker: IAstWalker) => {
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'IAstWalker'.
2014-07-13 01:04:16 +02:00
ast.addToControlFlow(walker.state);
return ast;
}
var walker = getAstWalkerFactory().getWalker(controlFlowPrefix, null, null, context);
~~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'getAstWalkerFactory'.
2014-07-13 01:04:16 +02:00
context.walker = walker;
walker.walk(this.bod, this);
return context;
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckFunction(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
}
public isCallMember() { return hasFlag(this.fncFlags, FncFlags.CallMember); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isConstructMember() { return hasFlag(this.fncFlags, FncFlags.ConstructMember); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isIndexerMember() { return hasFlag(this.fncFlags, FncFlags.IndexerMember); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
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); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isGetAccessor() { return hasFlag(this.fncFlags, FncFlags.GetAccessor); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isSetAccessor() { return hasFlag(this.fncFlags, FncFlags.SetAccessor); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isAmbient() { return hasFlag(this.fncFlags, FncFlags.Ambient); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isExported() { return hasFlag(this.fncFlags, FncFlags.Exported); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isPrivate() { return hasFlag(this.fncFlags, FncFlags.Private); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isPublic() { return hasFlag(this.fncFlags, FncFlags.Public); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public isStatic() { return hasFlag(this.fncFlags, FncFlags.Static); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
public treeViewLabel() {
if (this.name == null) {
return "funcExpr";
}
else {
return "func: " + this.name.actualText
}
}
public ClearFlags(): void {
this.fncFlags = FncFlags.None;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
}
public isSignature() { return (this.fncFlags & FncFlags.Signature) != FncFlags.None; }
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'FncFlags'.
2014-07-13 01:04:16 +02:00
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[] = [];
~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'IFileReference'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.vars = vars;
this.scopes = scopes;
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (!hasFlag((<ModuleDeclaration>stmt).modFlags, ModuleFlags.ShouldEmitModuleDecl | ModuleFlags.Ambient)) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleFlags'.
2014-07-13 01:04:16 +02:00
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleFlags'.
2014-07-13 01:04:16 +02:00
return true;
}
}
else if (stmt.nodeType == NodeType.ClassDeclaration) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (!hasFlag((<InterfaceDeclaration>stmt).varFlags, VarFlags.Ambient)) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
return true;
}
}
else if (stmt.nodeType == NodeType.VarDecl) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (!hasFlag((<VarDecl>stmt).varFlags, VarFlags.Ambient)) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
return true;
}
}
else if (stmt.nodeType == NodeType.FuncDecl) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (!(<FuncDecl>stmt).isSignature()) {
return true;
}
}
else if (stmt.nodeType != NodeType.InterfaceDeclaration && stmt.nodeType != NodeType.Empty) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
return true;
}
}
}
return false;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
if (this.emitRequired()) {
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitJavascriptList(this.bod, null, TokenID.Semicolon, true, false, false, true, this.requiresInherits);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
}
export class NamedDeclaration extends ModuleElement {
public leftCurlyCount = 0;
public rightCurlyCount = 0;
constructor (nodeType: NodeType,
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
public name: Identifier,
public members: ASTList) {
super(nodeType);
}
}
export class ModuleDeclaration extends NamedDeclaration {
public modFlags = ModuleFlags.ShouldEmitModuleDecl;
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleFlags'.
2014-07-13 01:04:16 +02:00
public mod: ModuleType;
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleType'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
this.vars = vars;
this.scopes = scopes;
this.prettyName = this.name.actualText;
}
public isExported() { return hasFlag(this.modFlags, ModuleFlags.Exported); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleFlags'.
2014-07-13 01:04:16 +02:00
public isAmbient() { return hasFlag(this.modFlags, ModuleFlags.Ambient); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleFlags'.
2014-07-13 01:04:16 +02:00
public isEnum() { return hasFlag(this.modFlags, ModuleFlags.IsEnum); }
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleFlags'.
2014-07-13 01:04:16 +02:00
public recordNonInterface() {
this.modFlags &= ~ModuleFlags.ShouldEmitModuleDecl;
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleFlags'.
2014-07-13 01:04:16 +02:00
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckModule(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
if (!hasFlag(this.modFlags, ModuleFlags.ShouldEmitModuleDecl)) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ModuleFlags'.
2014-07-13 01:04:16 +02:00
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;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
constructor (nodeType: NodeType,
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
name: Identifier,
public extendsList: ASTList,
public implementsList: ASTList,
members: ASTList) {
super(nodeType, name, members);
}
public isExported() {
return hasFlag(this.varFlags, VarFlags.Exported);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
}
public isAmbient() {
return hasFlag(this.varFlags, VarFlags.Ambient);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'hasFlag'.
2014-07-13 01:04:16 +02:00
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
}
}
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckClass(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascriptClass(this);
}
}
export class InterfaceDeclaration extends TypeDeclaration {
constructor (name: Identifier,
members: ASTList,
extendsList: ASTList,
implementsList: ASTList) {
super(NodeType.InterfaceDeclaration, name, extendsList, implementsList, members);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckInterface(this);
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
}
}
export class Statement extends ModuleElement {
constructor (nodeType: NodeType) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
super(nodeType);
this.flags |= ASTFlags.IsStatement;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ASTFlags'.
2014-07-13 01:04:16 +02:00
}
public isLoop() { return false; }
public isStatementOrExpression() { return true; }
public isCompoundStatement() { return this.isLoop(); }
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
this.type = typeFlow.voidType;
return this;
}
}
export class LabeledStatement extends Statement {
constructor (public labels: ASTList, public stmt: AST) {
super(NodeType.LabeledStatement);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
typeFlow.typeCheck(this.labels);
this.stmt = this.stmt.typeCheck(typeFlow);
return this;
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var beforeBB = context.current;
var bb = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
context.current = bb;
beforeBB.addSuccessor(bb);
}
}
export class Block extends Statement {
constructor (public statements: ASTList,
public isStatementBlock: boolean) {
super(NodeType.Block);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
}
if (this.isStatementBlock) {
emitter.indenter.decreaseIndent();
emitter.emitIndent();
emitter.writeToOutput("}");
}
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var afterIfNeeded = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
super(nodeType);
}
public setResolvedTarget(parser: Parser, stmt: Statement): boolean {
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Parser'.
2014-07-13 01:04:16 +02:00
if (stmt.isLoop()) {
this.resolvedTarget = stmt;
return true;
}
if (this.nodeType === NodeType.Continue) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
parser.reportParseError("continue statement applies only to loops");
return false;
}
else {
if ((stmt.nodeType == NodeType.Switch) || this.hasExplicitTarget()) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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 {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
super.addToControlFlow(context);
context.unconditionalBranch(this.resolvedTarget, (this.nodeType == NodeType.Continue));
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.nodeType == NodeType.Break) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isLoop() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
emitter.writeToOutput("while(");
emitter.emitJavascript(this.cond, TokenID.While, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(")");
emitter.emitJavascriptStatements(this.body, false, false);
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckWhile(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var loopHeader = context.current;
var loopStart = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var afterLoop = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
loopHeader.addSuccessor(loopStart);
context.current = loopStart;
context.addContent(this.cond);
var condBlock = context.current;
var targetInfo: ITargetInfo = null;
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ITargetInfo'.
2014-07-13 01:04:16 +02:00
if (this.body) {
context.current = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(")");
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckDoWhile(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var loopHeader = context.current;
var loopStart = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var afterLoop = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
loopHeader.addSuccessor(loopStart);
context.current = loopStart;
var targetInfo: ITargetInfo = null;
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ITargetInfo'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isCompoundStatement() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckIf(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
this.cond.addToControlFlow(context);
var afterIf = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var beforeIf = context.current;
context.pushStatement(this, beforeIf, afterIf);
var hasContinuation = false;
context.current = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
}
else {
emitter.writeToOutput("return;");
}
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
super.addToControlFlow(context);
context.returnStmt();
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckReturn(this);
}
}
export class EndCode extends AST {
constructor () {
super(NodeType.EndCode);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
}
export class ForInStatement extends Statement {
constructor (public lval: AST, public obj: AST) {
super(NodeType.ForIn);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (this.lval && (this.lval.nodeType == NodeType.VarDecl)) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
(<BoundDecl>this.lval).varFlags |= VarFlags.AutoInit;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
}
}
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
var block = <Block>singleItem;
if ((block.statements !== null) && (block.statements.members.length == 1)) {
singleItem = block.statements.members[0];
}
}
if (singleItem.nodeType == NodeType.If) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
var cond = (<IfStatement>singleItem).cond;
if (cond.nodeType == NodeType.Call) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
var target = (<CallExpression>cond).target;
if (target.nodeType == NodeType.Dot) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
var binex = <BinaryExpression>target;
if ((binex.operand1.nodeType == NodeType.Name) &&
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
(this.obj.nodeType == NodeType.Name) &&
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
((<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) &&
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
(this.lval.nodeType == NodeType.Name)) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (((<Identifier>this.lval).actualText) == (<Identifier>arg).actualText) {
return true;
}
}
}
}
}
}
}
}
}
}
return false;
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(" in ");
emitter.emitJavascript(this.obj, TokenID.For, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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 {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
if (this.lval) {
context.addContent(this.lval);
}
if (this.obj) {
context.addContent(this.obj);
}
var loopHeader = context.current;
var loopStart = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var afterLoop = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isLoop() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
var temp = emitter.setInObjectLiteral(false);
emitter.writeToOutput("for(");
if (this.init) {
if (this.init.nodeType != NodeType.List) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascript(this.init, TokenID.For, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
}
else {
emitter.setInVarBlock((<ASTList>this.init).members.length);
emitter.emitJavascriptList(this.init, null, TokenID.For, false, false, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
}
}
emitter.writeToOutput("; ");
emitter.emitJavascript(this.cond, TokenID.For, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput("; ");
emitter.emitJavascript(this.incr, TokenID.For, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(")");
emitter.emitJavascriptStatements(this.body, true, false);
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
return typeFlow.typeCheckFor(this);
}
public addToControlFlow(context: ControlFlowContext): void {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
if (this.init) {
context.addContent(this.init);
}
var loopHeader = context.current;
var loopStart = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var afterLoop = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
loopHeader.addSuccessor(loopStart);
context.current = loopStart;
var condBlock: BasicBlock = null;
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var continueTarget = loopStart;
var incrBB: BasicBlock = null;
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
if (this.incr) {
incrBB = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
continueTarget = incrBB;
}
if (this.cond) {
condBlock = context.current;
context.addContent(this.cond);
context.current = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
condBlock.addSuccessor(context.current);
}
var targetInfo: ITargetInfo = null;
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ITargetInfo'.
2014-07-13 01:04:16 +02:00
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;
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'WithSymbol'.
2014-07-13 01:04:16 +02:00
constructor (public expr: AST) {
super(NodeType.With);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("with (");
if (this.expr) {
emitter.emitJavascript(this.expr, TokenID.With, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
}
emitter.writeToOutput(")");
emitter.emitJavascriptStatements(this.body, true, false);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isCompoundStatement() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeLineToOutput("");
}
emitter.indenter.decreaseIndent();
emitter.emitIndent();
emitter.writeToOutput("}");
emitter.setInObjectLiteral(temp);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var condBlock = context.current;
context.addContent(this.val);
var execBlock = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var afterSwitch = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
if (this.expr) {
emitter.writeToOutput("case ");
emitter.emitJavascript(this.expr, TokenID.Identifier, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
}
else {
emitter.writeToOutput("default");
}
emitter.writeToOutput(":");
emitter.emitJavascriptStatements(this.body, false, false);
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var execBlock = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
var sw = context.currentSwitch[context.currentSwitch.length - 1];
// TODO: fall-through from previous (+ to end of switch)
if (this.expr) {
var exprBlock = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
throw new Error("should not emit a type ref");
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
var prevInTCTR = typeFlow.inTypeRefTypeCheck;
typeFlow.inTypeRefTypeCheck = true;
var typeLink = getTypeLink(this, typeFlow.checker, true);
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'getTypeLink'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isCompoundStatement() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingStart(this);
emitter.emitJavascript(this.tryNode, TokenID.Try, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascript(this.finallyNode, TokenID.Finally, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingEnd(this);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
this.tryNode = typeFlow.typeCheck(this.tryNode);
this.finallyNode = <Finally>typeFlow.typeCheck(this.finallyNode);
this.type = typeFlow.voidType;
return this;
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var afterFinally = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
context.walk(this.tryNode, this);
var finBlock = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public isCompoundStatement() { return true; }
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.emitJavascript(this.tryNode, TokenID.Try, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitJavascript(this.catchNode, TokenID.Catch, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
var beforeTry = context.current;
var tryBlock = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
beforeTry.addSuccessor(tryBlock);
context.current = tryBlock;
var afterTryCatch = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
context.pushStatement(this, null, afterTryCatch);
context.walk(this.tryNode, this);
if (!context.noContinuation) {
if (context.current) {
context.current.addSuccessor(afterTryCatch);
}
}
context.current = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("try ");
emitter.emitJavascript(this.body, TokenID.Try, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
this.body = typeFlow.typeCheck(this.body);
return this;
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
if (this.param) {
this.param.varFlags |= VarFlags.AutoInit;
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VarFlags'.
2014-07-13 01:04:16 +02:00
}
}
public statement: ASTSpan = new ASTSpan();
public containedScope: SymbolScope = null;
~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'SymbolScope'.
2014-07-13 01:04:16 +02:00
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput(" ");
emitter.recordSourceMappingStart(this.statement);
emitter.writeToOutput("catch (");
emitter.emitJavascript(this.param, TokenID.OpenParen, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.writeToOutput(")");
emitter.recordSourceMappingEnd(this.statement);
emitter.emitJavascript(this.body, TokenID.Catch, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
if (this.param) {
context.addContent(this.param);
var bodBlock = new BasicBlock();
~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'BasicBlock'.
2014-07-13 01:04:16 +02:00
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) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
var prevScope = typeFlow.scope;
typeFlow.scope = this.containedScope;
this.param = <VarDecl>typeFlow.typeCheck(this.param);
var exceptVar = new ValueLocation();
~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ValueLocation'.
2014-07-13 01:04:16 +02:00
var varSym = new VariableSymbol((<VarDecl>this.param).id.text,
~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'VariableSymbol'.
2014-07-13 01:04:16 +02:00
this.param.minChar,
typeFlow.checker.locationInfo.unitIndex,
exceptVar);
exceptVar.symbol = varSym;
exceptVar.typeLink = new TypeLink();
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeLink'.
2014-07-13 01:04:16 +02:00
// 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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeToOutput("finally");
emitter.emitJavascript(this.body, TokenID.Finally, false);
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
public addToControlFlow(context: ControlFlowContext) {
~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'ControlFlowContext'.
2014-07-13 01:04:16 +02:00
if (this.body) {
context.walk(this.body, this);
}
context.walker.options.goChildren = false;
context.noContinuation = false;
}
public typeCheck(typeFlow: TypeFlow) {
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TypeFlow'.
2014-07-13 01:04:16 +02:00
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
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);
~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'NodeType'.
2014-07-13 01:04:16 +02:00
}
public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) {
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'Emitter'.
2014-07-13 01:04:16 +02:00
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'TokenID'.
2014-07-13 01:04:16 +02:00
emitter.emitParensAndCommentsInPlace(this, true);
emitter.recordSourceMappingStart(this);
emitter.writeLineToOutput("debugger;");
emitter.recordSourceMappingEnd(this);
emitter.emitParensAndCommentsInPlace(this, false);
}
}
}