js/src/jsreflect.h

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:2e36a54827b5
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=8 sts=4 et sw=4 tw=99:
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 /*
8 * JS reflection package.
9 */
10 #ifndef jsreflect_h
11 #define jsreflect_h
12
13 namespace js {
14
15 enum ASTType {
16 AST_ERROR = -1,
17 #define ASTDEF(ast, str, method) ast,
18 #include "jsast.tbl"
19 #undef ASTDEF
20 AST_LIMIT
21 };
22
23 enum AssignmentOperator {
24 AOP_ERR = -1,
25
26 /* assign */
27 AOP_ASSIGN = 0,
28 /* operator-assign */
29 AOP_PLUS, AOP_MINUS, AOP_STAR, AOP_DIV, AOP_MOD,
30 /* shift-assign */
31 AOP_LSH, AOP_RSH, AOP_URSH,
32 /* binary */
33 AOP_BITOR, AOP_BITXOR, AOP_BITAND,
34
35 AOP_LIMIT
36 };
37
38 enum BinaryOperator {
39 BINOP_ERR = -1,
40
41 /* eq */
42 BINOP_EQ = 0, BINOP_NE, BINOP_STRICTEQ, BINOP_STRICTNE,
43 /* rel */
44 BINOP_LT, BINOP_LE, BINOP_GT, BINOP_GE,
45 /* shift */
46 BINOP_LSH, BINOP_RSH, BINOP_URSH,
47 /* arithmetic */
48 BINOP_ADD, BINOP_SUB, BINOP_STAR, BINOP_DIV, BINOP_MOD,
49 /* binary */
50 BINOP_BITOR, BINOP_BITXOR, BINOP_BITAND,
51 /* misc */
52 BINOP_IN, BINOP_INSTANCEOF,
53
54 BINOP_LIMIT
55 };
56
57 enum UnaryOperator {
58 UNOP_ERR = -1,
59
60 UNOP_DELETE = 0,
61 UNOP_NEG,
62 UNOP_POS,
63 UNOP_NOT,
64 UNOP_BITNOT,
65 UNOP_TYPEOF,
66 UNOP_VOID,
67
68 UNOP_LIMIT
69 };
70
71 enum VarDeclKind {
72 VARDECL_ERR = -1,
73 VARDECL_VAR = 0,
74 VARDECL_CONST,
75 VARDECL_LET,
76 VARDECL_LET_HEAD,
77 VARDECL_LIMIT
78 };
79
80 enum PropKind {
81 PROP_ERR = -1,
82 PROP_INIT = 0,
83 PROP_GETTER,
84 PROP_SETTER,
85 PROP_LIMIT
86 };
87
88 extern char const * const aopNames[];
89 extern char const * const binopNames[];
90 extern char const * const unopNames[];
91 extern char const * const nodeTypeNames[];
92
93 } /* namespace js */
94
95 #endif /* jsreflect_h */

mercurial