source: trip-planner-front/node_modules/@webassemblyjs/helper-wasm-bytecode/esm/section.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 515 bytes
Line 
1export function getSectionForNode(n) {
2 switch (n.type) {
3 case "ModuleImport":
4 return "import";
5
6 case "CallInstruction":
7 case "CallIndirectInstruction":
8 case "Func":
9 case "Instr":
10 return "code";
11
12 case "ModuleExport":
13 return "export";
14
15 case "Start":
16 return "start";
17
18 case "TypeInstruction":
19 return "type";
20
21 case "IndexInFuncSection":
22 return "func";
23
24 case "Global":
25 return "global";
26 // No section
27
28 default:
29 return;
30 }
31}
Note: See TracBrowser for help on using the repository browser.