1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2  * vim: set ts=8 sts=2 et sw=2 tw=80:
3  * This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 #ifndef vm_ScopeKind_h
8 #define vm_ScopeKind_h
9 
10 #include <stdint.h>
11 
12 namespace js {
13 
14 enum class ScopeKind : uint8_t {
15   // FunctionScope
16   Function,
17 
18   // VarScope
19   FunctionBodyVar,
20 
21   // LexicalScope
22   Lexical,
23   SimpleCatch,
24   Catch,
25   NamedLambda,
26   StrictNamedLambda,
27   FunctionLexical,
28   ClassBody,
29 
30   // WithScope
31   With,
32 
33   // EvalScope
34   Eval,
35   StrictEval,
36 
37   // GlobalScope
38   Global,
39   NonSyntactic,
40 
41   // ModuleScope
42   Module,
43 
44   // WasmInstanceScope
45   WasmInstance,
46 
47   // WasmFunctionScope
48   WasmFunction
49 };
50 
51 }  // namespace js
52 
53 #endif  // vm_ScopeKind_hs
54