forked from AssemblyScript/assemblyscript
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.ts
More file actions
Latest commit
98 lines (88 loc) · 2.69 KB
/
Copy pathcommon.ts
File metadata and controls
98 lines (88 loc) · 2.69 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/**
* Common constants.
* @module common
*//***/
/** Indicates traits of a {@link Node} or {@link Element}. */
exportenumCommonFlags{
/** No flags set. */
NONE=0,
// Basic modifiers
/** Has an `import` modifier. */
IMPORT=1<<0,
/** Has an `export` modifier. */
EXPORT=1<<1,
/** Has a `declare` modifier. */
DECLARE=1<<2,
/** Has a `const` modifier. */
CONST=1<<3,
/** Has a `let` modifier. */
LET=1<<4,
/** Has a `static` modifier. */
STATIC=1<<5,
/** Has a `readonly` modifier. */
READONLY=1<<6,
/** Has an `abstract` modifier. */
ABSTRACT=1<<7,
/** Has a `public` modifier. */
PUBLIC=1<<8,
/** Has a `private` modifier. */
PRIVATE=1<<9,
/** Has a `protected` modifier. */
PROTECTED=1<<10,
/** Has a `get` modifier. */
GET=1<<11,
/** Has a `set` modifier. */
SET=1<<12,
// Extended modifiers usually derived from basic modifiers
/** Is ambient, that is either declared or nested in a declared element. */
AMBIENT=1<<13,
/** Is generic. */
GENERIC=1<<14,
/** Is part of a generic context. */
GENERIC_CONTEXT=1<<15,
/** Is an instance member. */
INSTANCE=1<<16,
/** Is a constructor. */
CONSTRUCTOR=1<<17,
/** Is an arrow function. */
ARROW=1<<18,
/** Is a module export. */
MODULE_EXPORT=1<<19,
/** Is a module import. */
MODULE_IMPORT=1<<20,
// Compilation states
/** Is compiled. */
COMPILED=1<<21,
/** Has a constant value and is therefore inlined. */
INLINED=1<<22,
/** Is scoped. */
SCOPED=1<<23,
/** Is a trampoline. */
TRAMPOLINE=1<<24,
/** Is a virtual method. */
VIRTUAL=1<<25,
/** Is the main function. */
MAIN=1<<26,
// Other
QUOTED=1<<27
}
/** Path delimiter inserted between file system levels. */
exportconstPATH_DELIMITER="/";
/** Substitution used to indicate the parent directory. */
exportconstPARENT_SUBST="..";
/** Function name prefix used for getters. */
exportconstGETTER_PREFIX="get:";
/** Function name prefix used for setters. */
exportconstSETTER_PREFIX="set:";
/** Delimiter used between class names and instance members. */
exportconstINSTANCE_DELIMITER="#";
/** Delimiter used between class and namespace names and static members. */
exportconstSTATIC_DELIMITER=".";
/** Delimiter used between a function and its inner elements. */
exportconstINNER_DELIMITER="~";
/** Substitution used to indicate a library directory. */
exportconstLIBRARY_SUBST="~lib";
/** Library directory prefix. */
exportconstLIBRARY_PREFIX=LIBRARY_SUBST+PATH_DELIMITER;
/** Prefix used to indicate a filespace element. */
exportconstFILESPACE_PREFIX="file:";