1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "ETSCompiler.h" 17 18 namespace ark::es2panda::compiler { 19 Compile(const ir::NamedType * node) const20void ETSCompiler::Compile([[maybe_unused]] const ir::NamedType *node) const 21 { 22 UNREACHABLE(); 23 } 24 Compile(const ir::PrefixAssertionExpression * expr) const25void ETSCompiler::Compile([[maybe_unused]] const ir::PrefixAssertionExpression *expr) const 26 { 27 UNREACHABLE(); 28 } 29 Compile(const ir::ClassDefinition * node) const30void ETSCompiler::Compile([[maybe_unused]] const ir::ClassDefinition *node) const 31 { 32 UNREACHABLE(); 33 } 34 Compile(const ir::ClassStaticBlock * st) const35void ETSCompiler::Compile([[maybe_unused]] const ir::ClassStaticBlock *st) const 36 { 37 UNREACHABLE(); 38 } 39 Compile(const ir::Decorator * st) const40void ETSCompiler::Compile([[maybe_unused]] const ir::Decorator *st) const 41 { 42 UNREACHABLE(); 43 } 44 Compile(const ir::MetaProperty * expr) const45void ETSCompiler::Compile([[maybe_unused]] const ir::MetaProperty *expr) const 46 { 47 UNREACHABLE(); 48 } 49 Compile(const ir::MethodDefinition * node) const50void ETSCompiler::Compile([[maybe_unused]] const ir::MethodDefinition *node) const 51 { 52 UNREACHABLE(); 53 } 54 Compile(const ir::Property * expr) const55void ETSCompiler::Compile([[maybe_unused]] const ir::Property *expr) const 56 { 57 UNREACHABLE(); 58 } 59 Compile(const ir::ScriptFunction * node) const60void ETSCompiler::Compile([[maybe_unused]] const ir::ScriptFunction *node) const 61 { 62 UNREACHABLE(); 63 } 64 Compile(const ir::SpreadElement * expr) const65void ETSCompiler::Compile([[maybe_unused]] const ir::SpreadElement *expr) const 66 { 67 UNREACHABLE(); 68 } 69 Compile(const ir::TSIndexSignature * node) const70void ETSCompiler::Compile([[maybe_unused]] const ir::TSIndexSignature *node) const 71 { 72 UNREACHABLE(); 73 } 74 Compile(const ir::TSMethodSignature * node) const75void ETSCompiler::Compile([[maybe_unused]] const ir::TSMethodSignature *node) const 76 { 77 UNREACHABLE(); 78 } 79 Compile(const ir::TSPropertySignature * node) const80void ETSCompiler::Compile([[maybe_unused]] const ir::TSPropertySignature *node) const 81 { 82 UNREACHABLE(); 83 } 84 Compile(const ir::TSSignatureDeclaration * node) const85void ETSCompiler::Compile([[maybe_unused]] const ir::TSSignatureDeclaration *node) const 86 { 87 UNREACHABLE(); 88 } 89 Compile(const ir::ETSScript * node) const90void ETSCompiler::Compile([[maybe_unused]] const ir::ETSScript *node) const 91 { 92 UNREACHABLE(); 93 } 94 Compile(const ir::ETSTuple * node) const95void ETSCompiler::Compile([[maybe_unused]] const ir::ETSTuple *node) const 96 { 97 UNREACHABLE(); 98 } 99 Compile(const ir::ETSImportDeclaration * node) const100void ETSCompiler::Compile([[maybe_unused]] const ir::ETSImportDeclaration *node) const 101 { 102 UNREACHABLE(); 103 } 104 Compile(const ir::ETSPackageDeclaration * st) const105void ETSCompiler::Compile([[maybe_unused]] const ir::ETSPackageDeclaration *st) const 106 { 107 UNREACHABLE(); 108 } 109 Compile(const ir::ETSPrimitiveType * node) const110void ETSCompiler::Compile([[maybe_unused]] const ir::ETSPrimitiveType *node) const 111 { 112 UNREACHABLE(); 113 } 114 Compile(const ir::ETSStructDeclaration * node) const115void ETSCompiler::Compile([[maybe_unused]] const ir::ETSStructDeclaration *node) const 116 { 117 UNREACHABLE(); 118 } 119 Compile(const ir::ETSNullType * node) const120void ETSCompiler::Compile([[maybe_unused]] const ir::ETSNullType *node) const 121 { 122 UNREACHABLE(); 123 } 124 Compile(const ir::ETSUndefinedType * node) const125void ETSCompiler::Compile([[maybe_unused]] const ir::ETSUndefinedType *node) const 126 { 127 UNREACHABLE(); 128 } 129 Compile(const ir::ETSNeverType * node) const130void ETSCompiler::Compile([[maybe_unused]] const ir::ETSNeverType *node) const 131 { 132 UNREACHABLE(); 133 } 134 Compile(const ir::ETSStringLiteralType * node) const135void ETSCompiler::Compile([[maybe_unused]] const ir::ETSStringLiteralType *node) const 136 { 137 UNREACHABLE(); 138 } 139 Compile(const ir::ETSUnionType * node) const140void ETSCompiler::Compile([[maybe_unused]] const ir::ETSUnionType *node) const 141 { 142 UNREACHABLE(); 143 } 144 Compile(const ir::ArrowFunctionExpression * expr) const145void ETSCompiler::Compile([[maybe_unused]] const ir::ArrowFunctionExpression *expr) const 146 { 147 // Should have been handled by LambdaLowering 148 UNREACHABLE(); 149 } 150 Compile(const ir::ChainExpression * expr) const151void ETSCompiler::Compile([[maybe_unused]] const ir::ChainExpression *expr) const 152 { 153 UNREACHABLE(); 154 } 155 Compile(const ir::ClassExpression * expr) const156void ETSCompiler::Compile([[maybe_unused]] const ir::ClassExpression *expr) const 157 { 158 UNREACHABLE(); 159 } 160 Compile(const ir::ETSReExportDeclaration * stmt) const161void ETSCompiler::Compile([[maybe_unused]] const ir::ETSReExportDeclaration *stmt) const 162 { 163 UNREACHABLE(); 164 } 165 Compile(const ir::DirectEvalExpression * expr) const166void ETSCompiler::Compile([[maybe_unused]] const ir::DirectEvalExpression *expr) const 167 { 168 UNREACHABLE(); 169 } 170 Compile(const ir::FunctionExpression * expr) const171void ETSCompiler::Compile([[maybe_unused]] const ir::FunctionExpression *expr) const 172 { 173 UNREACHABLE(); 174 } 175 Compile(const ir::NewExpression * expr) const176void ETSCompiler::Compile([[maybe_unused]] const ir::NewExpression *expr) const 177 { 178 UNREACHABLE(); 179 } 180 Compile(const ir::OmittedExpression * expr) const181void ETSCompiler::Compile([[maybe_unused]] const ir::OmittedExpression *expr) const 182 { 183 UNREACHABLE(); 184 } 185 Compile(const ir::OpaqueTypeNode * node) const186void ETSCompiler::Compile([[maybe_unused]] const ir::OpaqueTypeNode *node) const 187 { 188 UNREACHABLE(); 189 } 190 Compile(const ir::TaggedTemplateExpression * expr) const191void ETSCompiler::Compile([[maybe_unused]] const ir::TaggedTemplateExpression *expr) const 192 { 193 UNREACHABLE(); 194 } 195 Compile(const ir::UpdateExpression * expr) const196void ETSCompiler::Compile([[maybe_unused]] const ir::UpdateExpression *expr) const 197 { 198 // Should have been handled by OpAssignment lowering. 199 UNREACHABLE(); 200 } 201 Compile(const ir::YieldExpression * expr) const202void ETSCompiler::Compile([[maybe_unused]] const ir::YieldExpression *expr) const 203 { 204 UNREACHABLE(); 205 } 206 Compile(const ir::RegExpLiteral * expr) const207void ETSCompiler::Compile([[maybe_unused]] const ir::RegExpLiteral *expr) const 208 { 209 UNREACHABLE(); 210 } 211 Compile(const ir::UndefinedLiteral * expr) const212void ETSCompiler::Compile([[maybe_unused]] const ir::UndefinedLiteral *expr) const 213 { 214 UNREACHABLE(); 215 } 216 Compile(const ir::ExportAllDeclaration * st) const217void ETSCompiler::Compile([[maybe_unused]] const ir::ExportAllDeclaration *st) const 218 { 219 UNREACHABLE(); 220 } 221 Compile(const ir::ExportDefaultDeclaration * st) const222void ETSCompiler::Compile([[maybe_unused]] const ir::ExportDefaultDeclaration *st) const 223 { 224 UNREACHABLE(); 225 } 226 Compile(const ir::ExportNamedDeclaration * st) const227void ETSCompiler::Compile([[maybe_unused]] const ir::ExportNamedDeclaration *st) const 228 { 229 UNREACHABLE(); 230 } 231 Compile(const ir::ExportSpecifier * st) const232void ETSCompiler::Compile([[maybe_unused]] const ir::ExportSpecifier *st) const 233 { 234 UNREACHABLE(); 235 } 236 Compile(const ir::ImportDeclaration * st) const237void ETSCompiler::Compile([[maybe_unused]] const ir::ImportDeclaration *st) const 238 { 239 UNREACHABLE(); 240 } 241 Compile(const ir::ImportDefaultSpecifier * st) const242void ETSCompiler::Compile([[maybe_unused]] const ir::ImportDefaultSpecifier *st) const 243 { 244 UNREACHABLE(); 245 } 246 Compile(const ir::ImportNamespaceSpecifier * st) const247void ETSCompiler::Compile([[maybe_unused]] const ir::ImportNamespaceSpecifier *st) const 248 { 249 UNREACHABLE(); 250 } 251 Compile(const ir::ImportSpecifier * st) const252void ETSCompiler::Compile([[maybe_unused]] const ir::ImportSpecifier *st) const 253 { 254 UNREACHABLE(); 255 } 256 Compile(const ir::DebuggerStatement * st) const257void ETSCompiler::Compile([[maybe_unused]] const ir::DebuggerStatement *st) const 258 { 259 UNREACHABLE(); 260 } 261 Compile(const ir::ForInStatement * st) const262void ETSCompiler::Compile([[maybe_unused]] const ir::ForInStatement *st) const 263 { 264 UNREACHABLE(); 265 } 266 Compile(const ir::FunctionDeclaration * st) const267void ETSCompiler::Compile([[maybe_unused]] const ir::FunctionDeclaration *st) const 268 { 269 UNREACHABLE(); 270 } 271 Compile(const ir::SwitchCaseStatement * st) const272void ETSCompiler::Compile([[maybe_unused]] const ir::SwitchCaseStatement *st) const 273 { 274 UNREACHABLE(); 275 } 276 Compile(const ir::TSAnyKeyword * node) const277void ETSCompiler::Compile([[maybe_unused]] const ir::TSAnyKeyword *node) const 278 { 279 UNREACHABLE(); 280 } 281 Compile(const ir::TSBigintKeyword * node) const282void ETSCompiler::Compile([[maybe_unused]] const ir::TSBigintKeyword *node) const 283 { 284 UNREACHABLE(); 285 } 286 Compile(const ir::TSBooleanKeyword * node) const287void ETSCompiler::Compile([[maybe_unused]] const ir::TSBooleanKeyword *node) const 288 { 289 UNREACHABLE(); 290 } 291 Compile(const ir::TSClassImplements * expr) const292void ETSCompiler::Compile([[maybe_unused]] const ir::TSClassImplements *expr) const 293 { 294 UNREACHABLE(); 295 } 296 Compile(const ir::TSConditionalType * node) const297void ETSCompiler::Compile([[maybe_unused]] const ir::TSConditionalType *node) const 298 { 299 UNREACHABLE(); 300 } 301 Compile(const ir::TSConstructorType * node) const302void ETSCompiler::Compile([[maybe_unused]] const ir::TSConstructorType *node) const 303 { 304 UNREACHABLE(); 305 } 306 Compile(const ir::TSEnumMember * st) const307void ETSCompiler::Compile([[maybe_unused]] const ir::TSEnumMember *st) const 308 { 309 UNREACHABLE(); 310 } 311 Compile(const ir::TSExternalModuleReference * expr) const312void ETSCompiler::Compile([[maybe_unused]] const ir::TSExternalModuleReference *expr) const 313 { 314 UNREACHABLE(); 315 } 316 Compile(const ir::TSFunctionType * node) const317void ETSCompiler::Compile([[maybe_unused]] const ir::TSFunctionType *node) const 318 { 319 UNREACHABLE(); 320 } 321 Compile(const ir::TSImportEqualsDeclaration * st) const322void ETSCompiler::Compile([[maybe_unused]] const ir::TSImportEqualsDeclaration *st) const 323 { 324 UNREACHABLE(); 325 } 326 Compile(const ir::TSImportType * node) const327void ETSCompiler::Compile([[maybe_unused]] const ir::TSImportType *node) const 328 { 329 UNREACHABLE(); 330 } 331 Compile(const ir::TSIndexedAccessType * node) const332void ETSCompiler::Compile([[maybe_unused]] const ir::TSIndexedAccessType *node) const 333 { 334 UNREACHABLE(); 335 } 336 Compile(const ir::TSInferType * node) const337void ETSCompiler::Compile([[maybe_unused]] const ir::TSInferType *node) const 338 { 339 UNREACHABLE(); 340 } 341 Compile(const ir::TSInterfaceBody * expr) const342void ETSCompiler::Compile([[maybe_unused]] const ir::TSInterfaceBody *expr) const 343 { 344 UNREACHABLE(); 345 } 346 Compile(const ir::TSInterfaceHeritage * expr) const347void ETSCompiler::Compile([[maybe_unused]] const ir::TSInterfaceHeritage *expr) const 348 { 349 UNREACHABLE(); 350 } 351 Compile(const ir::TSIntersectionType * node) const352void ETSCompiler::Compile([[maybe_unused]] const ir::TSIntersectionType *node) const 353 { 354 UNREACHABLE(); 355 } 356 Compile(const ir::TSLiteralType * node) const357void ETSCompiler::Compile([[maybe_unused]] const ir::TSLiteralType *node) const 358 { 359 UNREACHABLE(); 360 } 361 Compile(const ir::TSMappedType * node) const362void ETSCompiler::Compile([[maybe_unused]] const ir::TSMappedType *node) const 363 { 364 UNREACHABLE(); 365 } 366 Compile(const ir::TSModuleBlock * st) const367void ETSCompiler::Compile([[maybe_unused]] const ir::TSModuleBlock *st) const 368 { 369 UNREACHABLE(); 370 } 371 Compile(const ir::TSModuleDeclaration * st) const372void ETSCompiler::Compile([[maybe_unused]] const ir::TSModuleDeclaration *st) const 373 { 374 UNREACHABLE(); 375 } 376 Compile(const ir::TSNamedTupleMember * node) const377void ETSCompiler::Compile([[maybe_unused]] const ir::TSNamedTupleMember *node) const 378 { 379 UNREACHABLE(); 380 } 381 Compile(const ir::TSNeverKeyword * node) const382void ETSCompiler::Compile([[maybe_unused]] const ir::TSNeverKeyword *node) const 383 { 384 UNREACHABLE(); 385 } 386 Compile(const ir::TSNullKeyword * node) const387void ETSCompiler::Compile([[maybe_unused]] const ir::TSNullKeyword *node) const 388 { 389 UNREACHABLE(); 390 } 391 Compile(const ir::TSNumberKeyword * node) const392void ETSCompiler::Compile([[maybe_unused]] const ir::TSNumberKeyword *node) const 393 { 394 UNREACHABLE(); 395 } 396 Compile(const ir::TSObjectKeyword * node) const397void ETSCompiler::Compile([[maybe_unused]] const ir::TSObjectKeyword *node) const 398 { 399 UNREACHABLE(); 400 } 401 Compile(const ir::TSParameterProperty * expr) const402void ETSCompiler::Compile([[maybe_unused]] const ir::TSParameterProperty *expr) const 403 { 404 UNREACHABLE(); 405 } 406 Compile(const ir::TSParenthesizedType * node) const407void ETSCompiler::Compile([[maybe_unused]] const ir::TSParenthesizedType *node) const 408 { 409 UNREACHABLE(); 410 } 411 Compile(const ir::TSQualifiedName * expr) const412void ETSCompiler::Compile([[maybe_unused]] const ir::TSQualifiedName *expr) const 413 { 414 UNREACHABLE(); 415 } 416 Compile(const ir::TSStringKeyword * node) const417void ETSCompiler::Compile([[maybe_unused]] const ir::TSStringKeyword *node) const 418 { 419 UNREACHABLE(); 420 } 421 Compile(const ir::TSThisType * node) const422void ETSCompiler::Compile([[maybe_unused]] const ir::TSThisType *node) const 423 { 424 UNREACHABLE(); 425 } 426 Compile(const ir::TSTupleType * node) const427void ETSCompiler::Compile([[maybe_unused]] const ir::TSTupleType *node) const 428 { 429 UNREACHABLE(); 430 } 431 Compile(const ir::TSTypeAssertion * expr) const432void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypeAssertion *expr) const 433 { 434 UNREACHABLE(); 435 } 436 Compile(const ir::TSTypeLiteral * node) const437void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypeLiteral *node) const 438 { 439 UNREACHABLE(); 440 } 441 Compile(const ir::TSTypeOperator * node) const442void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypeOperator *node) const 443 { 444 UNREACHABLE(); 445 } 446 Compile(const ir::TSTypeParameter * expr) const447void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypeParameter *expr) const 448 { 449 UNREACHABLE(); 450 } 451 Compile(const ir::TSTypeParameterDeclaration * expr) const452void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypeParameterDeclaration *expr) const 453 { 454 UNREACHABLE(); 455 } 456 Compile(const ir::TSTypeParameterInstantiation * expr) const457void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypeParameterInstantiation *expr) const 458 { 459 UNREACHABLE(); 460 } 461 Compile(const ir::TSTypePredicate * node) const462void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypePredicate *node) const 463 { 464 UNREACHABLE(); 465 } 466 Compile(const ir::TSTypeQuery * node) const467void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypeQuery *node) const 468 { 469 UNREACHABLE(); 470 } 471 Compile(const ir::TSTypeReference * node) const472void ETSCompiler::Compile([[maybe_unused]] const ir::TSTypeReference *node) const 473 { 474 UNREACHABLE(); 475 } 476 Compile(const ir::TSUndefinedKeyword * node) const477void ETSCompiler::Compile([[maybe_unused]] const ir::TSUndefinedKeyword *node) const 478 { 479 UNREACHABLE(); 480 } 481 Compile(const ir::TSUnionType * node) const482void ETSCompiler::Compile([[maybe_unused]] const ir::TSUnionType *node) const 483 { 484 UNREACHABLE(); 485 } 486 Compile(const ir::TSUnknownKeyword * node) const487void ETSCompiler::Compile([[maybe_unused]] const ir::TSUnknownKeyword *node) const 488 { 489 UNREACHABLE(); 490 } 491 Compile(const ir::TSVoidKeyword * node) const492void ETSCompiler::Compile([[maybe_unused]] const ir::TSVoidKeyword *node) const 493 { 494 UNREACHABLE(); 495 } 496 Compile(const ir::DummyNode * node) const497void ETSCompiler::Compile([[maybe_unused]] const ir::DummyNode *node) const 498 { 499 UNREACHABLE(); 500 } 501 Compile(const ir::NamespaceDeclaration * st) const502void ETSCompiler::Compile([[maybe_unused]] const ir::NamespaceDeclaration *st) const 503 { 504 UNREACHABLE(); 505 } 506 Compile(const ir::NamespaceDefinition * st) const507void ETSCompiler::Compile([[maybe_unused]] const ir::NamespaceDefinition *st) const 508 { 509 UNREACHABLE(); 510 } 511 } // namespace ark::es2panda::compiler 512