• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "JSCompiler.h"
17 
18 namespace ark::es2panda::compiler {
19 
20 // from as folder
Compile(const ir::NamedType * node) const21 void JSCompiler::Compile([[maybe_unused]] const ir::NamedType *node) const
22 {
23     UNREACHABLE();
24 }
25 
Compile(const ir::PrefixAssertionExpression * expr) const26 void JSCompiler::Compile([[maybe_unused]] const ir::PrefixAssertionExpression *expr) const
27 {
28     UNREACHABLE();
29 }
30 
Compile(const ir::ClassProperty * st) const31 void JSCompiler::Compile([[maybe_unused]] const ir::ClassProperty *st) const
32 {
33     UNREACHABLE();
34 }
35 
Compile(const ir::ClassStaticBlock * st) const36 void JSCompiler::Compile([[maybe_unused]] const ir::ClassStaticBlock *st) const
37 {
38     UNREACHABLE();
39 }
40 
Compile(const ir::Decorator * st) const41 void JSCompiler::Compile([[maybe_unused]] const ir::Decorator *st) const
42 {
43     UNREACHABLE();
44 }
45 
Compile(const ir::MethodDefinition * node) const46 void JSCompiler::Compile([[maybe_unused]] const ir::MethodDefinition *node) const
47 {
48     UNREACHABLE();
49 }
50 
Compile(const ir::Property * expr) const51 void JSCompiler::Compile([[maybe_unused]] const ir::Property *expr) const
52 {
53     UNREACHABLE();
54 }
55 
Compile(const ir::ScriptFunction * node) const56 void JSCompiler::Compile([[maybe_unused]] const ir::ScriptFunction *node) const
57 {
58     UNREACHABLE();
59 }
60 
Compile(const ir::SpreadElement * expr) const61 void JSCompiler::Compile([[maybe_unused]] const ir::SpreadElement *expr) const
62 {
63     UNREACHABLE();
64 }
65 
Compile(const ir::TemplateElement * expr) const66 void JSCompiler::Compile([[maybe_unused]] const ir::TemplateElement *expr) const
67 {
68     UNREACHABLE();
69 }
70 
Compile(const ir::TSIndexSignature * node) const71 void JSCompiler::Compile([[maybe_unused]] const ir::TSIndexSignature *node) const
72 {
73     UNREACHABLE();
74 }
75 
Compile(const ir::TSMethodSignature * node) const76 void JSCompiler::Compile([[maybe_unused]] const ir::TSMethodSignature *node) const
77 {
78     UNREACHABLE();
79 }
80 
Compile(const ir::TSPropertySignature * node) const81 void JSCompiler::Compile([[maybe_unused]] const ir::TSPropertySignature *node) const
82 {
83     UNREACHABLE();
84 }
85 
Compile(const ir::TSSignatureDeclaration * node) const86 void JSCompiler::Compile([[maybe_unused]] const ir::TSSignatureDeclaration *node) const
87 {
88     UNREACHABLE();
89 }
90 // from ets folder
Compile(const ir::ETSScript * expr) const91 void JSCompiler::Compile([[maybe_unused]] const ir::ETSScript *expr) const
92 {
93     UNREACHABLE();
94 }
95 
Compile(const ir::ETSClassLiteral * expr) const96 void JSCompiler::Compile([[maybe_unused]] const ir::ETSClassLiteral *expr) const
97 {
98     UNREACHABLE();
99 }
100 
Compile(const ir::ETSFunctionType * expr) const101 void JSCompiler::Compile([[maybe_unused]] const ir::ETSFunctionType *expr) const
102 {
103     UNREACHABLE();
104 }
105 
Compile(const ir::ETSTuple * expr) const106 void JSCompiler::Compile([[maybe_unused]] const ir::ETSTuple *expr) const
107 {
108     UNREACHABLE();
109 }
110 
Compile(const ir::ETSImportDeclaration * node) const111 void JSCompiler::Compile([[maybe_unused]] const ir::ETSImportDeclaration *node) const
112 {
113     UNREACHABLE();
114 }
115 
Compile(const ir::ETSReExportDeclaration * node) const116 void JSCompiler::Compile([[maybe_unused]] const ir::ETSReExportDeclaration *node) const
117 {
118     UNREACHABLE();
119 }
120 
Compile(const ir::ETSLaunchExpression * expr) const121 void JSCompiler::Compile([[maybe_unused]] const ir::ETSLaunchExpression *expr) const
122 {
123     UNREACHABLE();
124 }
125 
Compile(const ir::ETSNewArrayInstanceExpression * expr) const126 void JSCompiler::Compile([[maybe_unused]] const ir::ETSNewArrayInstanceExpression *expr) const
127 {
128     UNREACHABLE();
129 }
130 
Compile(const ir::ETSNewClassInstanceExpression * expr) const131 void JSCompiler::Compile([[maybe_unused]] const ir::ETSNewClassInstanceExpression *expr) const
132 {
133     UNREACHABLE();
134 }
135 
Compile(const ir::ETSNewMultiDimArrayInstanceExpression * expr) const136 void JSCompiler::Compile([[maybe_unused]] const ir::ETSNewMultiDimArrayInstanceExpression *expr) const
137 {
138     UNREACHABLE();
139 }
140 
Compile(const ir::ETSPackageDeclaration * expr) const141 void JSCompiler::Compile([[maybe_unused]] const ir::ETSPackageDeclaration *expr) const
142 {
143     UNREACHABLE();
144 }
145 
Compile(const ir::ETSParameterExpression * expr) const146 void JSCompiler::Compile([[maybe_unused]] const ir::ETSParameterExpression *expr) const
147 {
148     UNREACHABLE();
149 }
150 
Compile(const ir::ETSPrimitiveType * expr) const151 void JSCompiler::Compile([[maybe_unused]] const ir::ETSPrimitiveType *expr) const
152 {
153     UNREACHABLE();
154 }
155 
Compile(const ir::ETSStructDeclaration * node) const156 void JSCompiler::Compile([[maybe_unused]] const ir::ETSStructDeclaration *node) const
157 {
158     UNREACHABLE();
159 }
160 
Compile(const ir::ETSTypeReference * expr) const161 void JSCompiler::Compile([[maybe_unused]] const ir::ETSTypeReference *expr) const
162 {
163     UNREACHABLE();
164 }
165 
Compile(const ir::ETSTypeReferencePart * expr) const166 void JSCompiler::Compile([[maybe_unused]] const ir::ETSTypeReferencePart *expr) const
167 {
168     UNREACHABLE();
169 }
170 
Compile(const ir::ETSNullType * node) const171 void JSCompiler::Compile([[maybe_unused]] const ir::ETSNullType *node) const
172 {
173     UNREACHABLE();
174 }
175 
Compile(const ir::ETSUndefinedType * node) const176 void JSCompiler::Compile([[maybe_unused]] const ir::ETSUndefinedType *node) const
177 {
178     UNREACHABLE();
179 }
180 
Compile(const ir::ETSNeverType * node) const181 void JSCompiler::Compile([[maybe_unused]] const ir::ETSNeverType *node) const
182 {
183     UNREACHABLE();
184 }
185 
Compile(const ir::ETSStringLiteralType * node) const186 void JSCompiler::Compile([[maybe_unused]] const ir::ETSStringLiteralType *node) const
187 {
188     UNREACHABLE();
189 }
190 
Compile(const ir::ETSUnionType * node) const191 void JSCompiler::Compile([[maybe_unused]] const ir::ETSUnionType *node) const
192 {
193     UNREACHABLE();
194 }
195 
Compile(const ir::ETSWildcardType * expr) const196 void JSCompiler::Compile([[maybe_unused]] const ir::ETSWildcardType *expr) const
197 {
198     UNREACHABLE();
199 }
200 
Compile(const ir::BlockExpression * expr) const201 void JSCompiler::Compile([[maybe_unused]] const ir::BlockExpression *expr) const
202 {
203     UNREACHABLE();
204 }
205 
Compile(const ir::OpaqueTypeNode * node) const206 void JSCompiler::Compile([[maybe_unused]] const ir::OpaqueTypeNode *node) const
207 {
208     UNREACHABLE();
209 }
210 
Compile(const ir::OmittedExpression * expr) const211 void JSCompiler::Compile([[maybe_unused]] const ir::OmittedExpression *expr) const
212 {
213     UNREACHABLE();
214 }
215 
Compile(const ir::CharLiteral * expr) const216 void JSCompiler::Compile([[maybe_unused]] const ir::CharLiteral *expr) const
217 {
218     UNREACHABLE();
219 }
220 
Compile(const ir::UndefinedLiteral * expr) const221 void JSCompiler::Compile([[maybe_unused]] const ir::UndefinedLiteral *expr) const
222 {
223     UNREACHABLE();
224 }
225 
Compile(const ir::ExportSpecifier * st) const226 void JSCompiler::Compile([[maybe_unused]] const ir::ExportSpecifier *st) const
227 {
228     UNREACHABLE();
229 }
230 
Compile(const ir::ImportDefaultSpecifier * st) const231 void JSCompiler::Compile([[maybe_unused]] const ir::ImportDefaultSpecifier *st) const
232 {
233     UNREACHABLE();
234 }
235 
Compile(const ir::ImportNamespaceSpecifier * st) const236 void JSCompiler::Compile([[maybe_unused]] const ir::ImportNamespaceSpecifier *st) const
237 {
238     UNREACHABLE();
239 }
240 
Compile(const ir::ImportSpecifier * st) const241 void JSCompiler::Compile([[maybe_unused]] const ir::ImportSpecifier *st) const
242 {
243     UNREACHABLE();
244 }
245 // Compile methods for STATEMENTS in alphabetical order
Compile(const ir::AssertStatement * st) const246 void JSCompiler::Compile([[maybe_unused]] const ir::AssertStatement *st) const
247 {
248     UNREACHABLE();
249 }
250 
Compile(const ir::SwitchCaseStatement * st) const251 void JSCompiler::Compile([[maybe_unused]] const ir::SwitchCaseStatement *st) const
252 {
253     UNREACHABLE();
254 }
255 
256 // from ts folder
Compile(const ir::TSAnyKeyword * node) const257 void JSCompiler::Compile([[maybe_unused]] const ir::TSAnyKeyword *node) const
258 {
259     UNREACHABLE();
260 }
261 
Compile(const ir::TSArrayType * node) const262 void JSCompiler::Compile([[maybe_unused]] const ir::TSArrayType *node) const
263 {
264     UNREACHABLE();
265 }
266 
Compile(const ir::TSAsExpression * expr) const267 void JSCompiler::Compile([[maybe_unused]] const ir::TSAsExpression *expr) const
268 {
269     UNREACHABLE();
270 }
271 
Compile(const ir::TSBigintKeyword * node) const272 void JSCompiler::Compile([[maybe_unused]] const ir::TSBigintKeyword *node) const
273 {
274     UNREACHABLE();
275 }
276 
Compile(const ir::TSBooleanKeyword * node) const277 void JSCompiler::Compile([[maybe_unused]] const ir::TSBooleanKeyword *node) const
278 {
279     UNREACHABLE();
280 }
281 
Compile(const ir::TSClassImplements * expr) const282 void JSCompiler::Compile([[maybe_unused]] const ir::TSClassImplements *expr) const
283 {
284     UNREACHABLE();
285 }
286 
Compile(const ir::TSConditionalType * node) const287 void JSCompiler::Compile([[maybe_unused]] const ir::TSConditionalType *node) const
288 {
289     UNREACHABLE();
290 }
291 
Compile(const ir::TSConstructorType * node) const292 void JSCompiler::Compile([[maybe_unused]] const ir::TSConstructorType *node) const
293 {
294     UNREACHABLE();
295 }
296 
Compile(const ir::TSEnumDeclaration * st) const297 void JSCompiler::Compile([[maybe_unused]] const ir::TSEnumDeclaration *st) const
298 {
299     UNREACHABLE();
300 }
301 
Compile(const ir::TSEnumMember * st) const302 void JSCompiler::Compile([[maybe_unused]] const ir::TSEnumMember *st) const
303 {
304     UNREACHABLE();
305 }
306 
Compile(const ir::TSExternalModuleReference * expr) const307 void JSCompiler::Compile([[maybe_unused]] const ir::TSExternalModuleReference *expr) const
308 {
309     UNREACHABLE();
310 }
311 
Compile(const ir::TSFunctionType * node) const312 void JSCompiler::Compile([[maybe_unused]] const ir::TSFunctionType *node) const
313 {
314     UNREACHABLE();
315 }
316 
Compile(const ir::TSImportEqualsDeclaration * st) const317 void JSCompiler::Compile([[maybe_unused]] const ir::TSImportEqualsDeclaration *st) const
318 {
319     UNREACHABLE();
320 }
321 
Compile(const ir::TSImportType * node) const322 void JSCompiler::Compile([[maybe_unused]] const ir::TSImportType *node) const
323 {
324     UNREACHABLE();
325 }
326 
Compile(const ir::TSIndexedAccessType * node) const327 void JSCompiler::Compile([[maybe_unused]] const ir::TSIndexedAccessType *node) const
328 {
329     UNREACHABLE();
330 }
331 
Compile(const ir::TSInferType * node) const332 void JSCompiler::Compile([[maybe_unused]] const ir::TSInferType *node) const
333 {
334     UNREACHABLE();
335 }
336 
Compile(const ir::TSInterfaceBody * expr) const337 void JSCompiler::Compile([[maybe_unused]] const ir::TSInterfaceBody *expr) const
338 {
339     UNREACHABLE();
340 }
341 
Compile(const ir::TSInterfaceDeclaration * st) const342 void JSCompiler::Compile([[maybe_unused]] const ir::TSInterfaceDeclaration *st) const
343 {
344     UNREACHABLE();
345 }
346 
Compile(const ir::TSInterfaceHeritage * expr) const347 void JSCompiler::Compile([[maybe_unused]] const ir::TSInterfaceHeritage *expr) const
348 {
349     UNREACHABLE();
350 }
351 
Compile(const ir::TSIntersectionType * node) const352 void JSCompiler::Compile([[maybe_unused]] const ir::TSIntersectionType *node) const
353 {
354     UNREACHABLE();
355 }
356 
Compile(const ir::TSLiteralType * node) const357 void JSCompiler::Compile([[maybe_unused]] const ir::TSLiteralType *node) const
358 {
359     UNREACHABLE();
360 }
361 
Compile(const ir::TSMappedType * node) const362 void JSCompiler::Compile([[maybe_unused]] const ir::TSMappedType *node) const
363 {
364     UNREACHABLE();
365 }
366 
Compile(const ir::TSModuleBlock * st) const367 void JSCompiler::Compile([[maybe_unused]] const ir::TSModuleBlock *st) const
368 {
369     UNREACHABLE();
370 }
371 
Compile(const ir::TSModuleDeclaration * st) const372 void JSCompiler::Compile([[maybe_unused]] const ir::TSModuleDeclaration *st) const
373 {
374     UNREACHABLE();
375 }
376 
Compile(const ir::TSNamedTupleMember * node) const377 void JSCompiler::Compile([[maybe_unused]] const ir::TSNamedTupleMember *node) const
378 {
379     UNREACHABLE();
380 }
381 
Compile(const ir::TSNeverKeyword * node) const382 void JSCompiler::Compile([[maybe_unused]] const ir::TSNeverKeyword *node) const
383 {
384     UNREACHABLE();
385 }
386 
Compile(const ir::TSNonNullExpression * expr) const387 void JSCompiler::Compile([[maybe_unused]] const ir::TSNonNullExpression *expr) const
388 {
389     UNREACHABLE();
390 }
391 
Compile(const ir::TSNullKeyword * node) const392 void JSCompiler::Compile([[maybe_unused]] const ir::TSNullKeyword *node) const
393 {
394     UNREACHABLE();
395 }
396 
Compile(const ir::TSNumberKeyword * node) const397 void JSCompiler::Compile([[maybe_unused]] const ir::TSNumberKeyword *node) const
398 {
399     UNREACHABLE();
400 }
401 
Compile(const ir::TSObjectKeyword * node) const402 void JSCompiler::Compile([[maybe_unused]] const ir::TSObjectKeyword *node) const
403 {
404     UNREACHABLE();
405 }
406 
Compile(const ir::TSParameterProperty * expr) const407 void JSCompiler::Compile([[maybe_unused]] const ir::TSParameterProperty *expr) const
408 {
409     UNREACHABLE();
410 }
411 
Compile(const ir::TSParenthesizedType * node) const412 void JSCompiler::Compile([[maybe_unused]] const ir::TSParenthesizedType *node) const
413 {
414     UNREACHABLE();
415 }
416 
Compile(const ir::TSQualifiedName * expr) const417 void JSCompiler::Compile([[maybe_unused]] const ir::TSQualifiedName *expr) const
418 {
419     UNREACHABLE();
420 }
421 
Compile(const ir::TSStringKeyword * node) const422 void JSCompiler::Compile([[maybe_unused]] const ir::TSStringKeyword *node) const
423 {
424     UNREACHABLE();
425 }
426 
Compile(const ir::TSThisType * node) const427 void JSCompiler::Compile([[maybe_unused]] const ir::TSThisType *node) const
428 {
429     UNREACHABLE();
430 }
431 
Compile(const ir::TSTupleType * node) const432 void JSCompiler::Compile([[maybe_unused]] const ir::TSTupleType *node) const
433 {
434     UNREACHABLE();
435 }
436 
Compile(const ir::TSTypeAliasDeclaration * st) const437 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeAliasDeclaration *st) const
438 {
439     UNREACHABLE();
440 }
441 
Compile(const ir::TSTypeAssertion * expr) const442 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeAssertion *expr) const
443 {
444     UNREACHABLE();
445 }
446 
Compile(const ir::TSTypeLiteral * node) const447 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeLiteral *node) const
448 {
449     UNREACHABLE();
450 }
451 
Compile(const ir::TSTypeOperator * node) const452 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeOperator *node) const
453 {
454     UNREACHABLE();
455 }
456 
Compile(const ir::TSTypeParameter * expr) const457 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeParameter *expr) const
458 {
459     UNREACHABLE();
460 }
461 
Compile(const ir::TSTypeParameterDeclaration * expr) const462 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeParameterDeclaration *expr) const
463 {
464     UNREACHABLE();
465 }
466 
Compile(const ir::TSTypeParameterInstantiation * expr) const467 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeParameterInstantiation *expr) const
468 {
469     UNREACHABLE();
470 }
471 
Compile(const ir::TSTypePredicate * node) const472 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypePredicate *node) const
473 {
474     UNREACHABLE();
475 }
476 
Compile(const ir::TSTypeQuery * node) const477 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeQuery *node) const
478 {
479     UNREACHABLE();
480 }
481 
Compile(const ir::TSTypeReference * node) const482 void JSCompiler::Compile([[maybe_unused]] const ir::TSTypeReference *node) const
483 {
484     UNREACHABLE();
485 }
486 
Compile(const ir::TSUndefinedKeyword * node) const487 void JSCompiler::Compile([[maybe_unused]] const ir::TSUndefinedKeyword *node) const
488 {
489     UNREACHABLE();
490 }
491 
Compile(const ir::TSUnionType * node) const492 void JSCompiler::Compile([[maybe_unused]] const ir::TSUnionType *node) const
493 {
494     UNREACHABLE();
495 }
496 
Compile(const ir::TSUnknownKeyword * node) const497 void JSCompiler::Compile([[maybe_unused]] const ir::TSUnknownKeyword *node) const
498 {
499     UNREACHABLE();
500 }
501 
Compile(const ir::TSVoidKeyword * node) const502 void JSCompiler::Compile([[maybe_unused]] const ir::TSVoidKeyword *node) const
503 {
504     UNREACHABLE();
505 }
506 
Compile(const ir::DummyNode * node) const507 void JSCompiler::Compile([[maybe_unused]] const ir::DummyNode *node) const
508 {
509     UNREACHABLE();
510 }
511 
Compile(const ir::NamespaceDeclaration * st) const512 void JSCompiler::Compile([[maybe_unused]] const ir::NamespaceDeclaration *st) const
513 {
514     UNREACHABLE();
515 }
516 
Compile(const ir::NamespaceDefinition * st) const517 void JSCompiler::Compile([[maybe_unused]] const ir::NamespaceDefinition *st) const
518 {
519     UNREACHABLE();
520 }
521 }  // namespace ark::es2panda::compiler
522