swc_ecma_lexer/common/
context.rs1bitflags::bitflags! {
2 #[derive(Debug, Clone, Copy, Default)]
3 pub struct Context: u32 {
4
5 const IgnoreError = 1 << 0;
7
8 const Module = 1 << 1;
10 const CanBeModule = 1 << 2;
11 const Strict = 1 << 3;
12
13 const ForLoopInit = 1 << 4;
14 const ForAwaitLoopInit = 1 << 5;
15
16 const IncludeInExpr = 1 << 6;
17 const InAsync = 1 << 7;
20 const InGenerator = 1 << 8;
23
24 const InStaticBlock = 1 << 9;
26
27 const IsContinueAllowed = 1 << 10;
28 const IsBreakAllowed = 1 << 11;
29
30 const InType = 1 << 12;
31 const ShouldNotLexLtOrGtAsType = 1 << 13;
33 const InDeclare = 1 << 14;
35
36 const InCondExpr = 1 << 15;
38 const WillExpectColonForCond = 1 << 16;
39
40 const InClass = 1 << 17;
41
42 const InClassField = 1 << 18;
43
44 const InFunction = 1 << 19;
45
46 const InsideNonArrowFunctionScope = 1 << 20;
49
50 const InParameters = 1 << 21;
51
52 const HasSuperClass = 1 << 22;
53
54 const InPropertyName = 1 << 23;
55
56 const InForcedJsxContext = 1 << 24;
57
58 const AllowDirectSuper = 1 << 25;
60
61 const IgnoreElseClause = 1 << 26;
62
63 const DisallowConditionalTypes = 1 << 27;
64
65 const AllowUsingDecl = 1 << 28;
66
67 const TopLevel = 1 << 29;
68
69 const TsModuleBlock = 1 << 30;
70 }
71}