forked from ard/ruoyi-api

‘liusuyi’
2023-07-18 9f0d9e8358442d5d156a4e8aa1e8d6bd4960a6f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"use strict";
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getSectionForNode = getSectionForNode;
 
function getSectionForNode(n) {
  switch (n.type) {
    case "ModuleImport":
      return "import";
 
    case "CallInstruction":
    case "CallIndirectInstruction":
    case "Func":
    case "Instr":
      return "code";
 
    case "ModuleExport":
      return "export";
 
    case "Start":
      return "start";
 
    case "TypeInstruction":
      return "type";
 
    case "IndexInFuncSection":
      return "func";
 
    case "Global":
      return "global";
    // No section
 
    default:
      return;
  }
}