Projekt

Obecné

Profil

Stáhnout (636 Bajtů) Statistiky
| Větev: | Revize:
1
"use strict";
2

    
3
Object.defineProperty(exports, "__esModule", {
4
  value: true
5
});
6
exports.getSectionForNode = getSectionForNode;
7

    
8
function getSectionForNode(n) {
9
  switch (n.type) {
10
    case "ModuleImport":
11
      return "import";
12

    
13
    case "CallInstruction":
14
    case "CallIndirectInstruction":
15
    case "Func":
16
    case "Instr":
17
      return "code";
18

    
19
    case "ModuleExport":
20
      return "export";
21

    
22
    case "Start":
23
      return "start";
24

    
25
    case "TypeInstruction":
26
      return "type";
27

    
28
    case "IndexInFuncSection":
29
      return "func";
30

    
31
    case "Global":
32
      return "global";
33
    // No section
34

    
35
    default:
36
      return;
37
  }
38
}
(2-2/2)