js/src/jsreflect.h

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

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

mercurial