js/src/jsreflect.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     7 /*
     8  * JS reflection package.
     9  */
    10 #ifndef jsreflect_h
    11 #define jsreflect_h
    13 namespace js {
    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 };
    23 enum AssignmentOperator {
    24     AOP_ERR = -1,
    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,
    35     AOP_LIMIT
    36 };
    38 enum BinaryOperator {
    39     BINOP_ERR = -1,
    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,
    54     BINOP_LIMIT
    55 };
    57 enum UnaryOperator {
    58     UNOP_ERR = -1,
    60     UNOP_DELETE = 0,
    61     UNOP_NEG,
    62     UNOP_POS,
    63     UNOP_NOT,
    64     UNOP_BITNOT,
    65     UNOP_TYPEOF,
    66     UNOP_VOID,
    68     UNOP_LIMIT
    69 };
    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 };
    80 enum PropKind {
    81     PROP_ERR = -1,
    82     PROP_INIT = 0,
    83     PROP_GETTER,
    84     PROP_SETTER,
    85     PROP_LIMIT
    86 };
    88 extern char const * const aopNames[];
    89 extern char const * const binopNames[];
    90 extern char const * const unopNames[];
    91 extern char const * const nodeTypeNames[];
    93 } /* namespace js */
    95 #endif /* jsreflect_h */

mercurial