Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 | /* A higher-order macro for enumerating keyword tokens. */ |
michael@0 | 8 | |
michael@0 | 9 | #ifndef vm_Keywords_h |
michael@0 | 10 | #define vm_Keywords_h |
michael@0 | 11 | |
michael@0 | 12 | #define FOR_EACH_JAVASCRIPT_KEYWORD(macro) \ |
michael@0 | 13 | macro(false, false_, TOK_FALSE, JSVERSION_DEFAULT) \ |
michael@0 | 14 | macro(true, true_, TOK_TRUE, JSVERSION_DEFAULT) \ |
michael@0 | 15 | macro(null, null, TOK_NULL, JSVERSION_DEFAULT) \ |
michael@0 | 16 | /* Keywords. */ \ |
michael@0 | 17 | macro(break, break_, TOK_BREAK, JSVERSION_DEFAULT) \ |
michael@0 | 18 | macro(case, case_, TOK_CASE, JSVERSION_DEFAULT) \ |
michael@0 | 19 | macro(catch, catch_, TOK_CATCH, JSVERSION_DEFAULT) \ |
michael@0 | 20 | macro(const, const_, TOK_CONST, JSVERSION_DEFAULT) \ |
michael@0 | 21 | macro(continue, continue_, TOK_CONTINUE, JSVERSION_DEFAULT) \ |
michael@0 | 22 | macro(debugger, debugger, TOK_DEBUGGER, JSVERSION_DEFAULT) \ |
michael@0 | 23 | macro(default, default_, TOK_DEFAULT, JSVERSION_DEFAULT) \ |
michael@0 | 24 | macro(delete, delete_, TOK_DELETE, JSVERSION_DEFAULT) \ |
michael@0 | 25 | macro(do, do_, TOK_DO, JSVERSION_DEFAULT) \ |
michael@0 | 26 | macro(else, else_, TOK_ELSE, JSVERSION_DEFAULT) \ |
michael@0 | 27 | macro(finally, finally_, TOK_FINALLY, JSVERSION_DEFAULT) \ |
michael@0 | 28 | macro(for, for_, TOK_FOR, JSVERSION_DEFAULT) \ |
michael@0 | 29 | macro(function, function, TOK_FUNCTION, JSVERSION_DEFAULT) \ |
michael@0 | 30 | macro(if, if_, TOK_IF, JSVERSION_DEFAULT) \ |
michael@0 | 31 | macro(in, in, TOK_IN, JSVERSION_DEFAULT) \ |
michael@0 | 32 | macro(instanceof, instanceof, TOK_INSTANCEOF, JSVERSION_DEFAULT) \ |
michael@0 | 33 | macro(new, new_, TOK_NEW, JSVERSION_DEFAULT) \ |
michael@0 | 34 | macro(return, return_, TOK_RETURN, JSVERSION_DEFAULT) \ |
michael@0 | 35 | macro(switch, switch_, TOK_SWITCH, JSVERSION_DEFAULT) \ |
michael@0 | 36 | macro(this, this_, TOK_THIS, JSVERSION_DEFAULT) \ |
michael@0 | 37 | macro(throw, throw_, TOK_THROW, JSVERSION_DEFAULT) \ |
michael@0 | 38 | macro(try, try_, TOK_TRY, JSVERSION_DEFAULT) \ |
michael@0 | 39 | macro(typeof, typeof, TOK_TYPEOF, JSVERSION_DEFAULT) \ |
michael@0 | 40 | macro(var, var, TOK_VAR, JSVERSION_DEFAULT) \ |
michael@0 | 41 | macro(void, void_, TOK_VOID, JSVERSION_DEFAULT) \ |
michael@0 | 42 | macro(while, while_, TOK_WHILE, JSVERSION_DEFAULT) \ |
michael@0 | 43 | macro(with, with, TOK_WITH, JSVERSION_DEFAULT) \ |
michael@0 | 44 | macro(import, import, TOK_IMPORT, JSVERSION_DEFAULT) \ |
michael@0 | 45 | macro(export, export, TOK_EXPORT, JSVERSION_DEFAULT) \ |
michael@0 | 46 | /* Reserved keywords. */ \ |
michael@0 | 47 | macro(class, class_, TOK_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 48 | macro(enum, enum_, TOK_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 49 | macro(extends, extends, TOK_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 50 | macro(super, super, TOK_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 51 | /* Future reserved keywords, but only in strict mode. */ \ |
michael@0 | 52 | macro(implements, implements, TOK_STRICT_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 53 | macro(interface, interface, TOK_STRICT_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 54 | macro(package, package, TOK_STRICT_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 55 | macro(private, private_, TOK_STRICT_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 56 | macro(protected, protected_, TOK_STRICT_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 57 | macro(public, public_, TOK_STRICT_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 58 | macro(static, static_, TOK_STRICT_RESERVED, JSVERSION_DEFAULT) \ |
michael@0 | 59 | /* \ |
michael@0 | 60 | * Yield is a token inside function*. Outside of a function*, it is a \ |
michael@0 | 61 | * future reserved keyword in strict mode, but a keyword in JS1.7 even \ |
michael@0 | 62 | * when strict. Punt logic to parser. \ |
michael@0 | 63 | */ \ |
michael@0 | 64 | macro(yield, yield, TOK_YIELD, JSVERSION_DEFAULT) \ |
michael@0 | 65 | /* \ |
michael@0 | 66 | * Let is a future reserved keyword in strict mode, and a keyword in \ |
michael@0 | 67 | * JS1.7. \ |
michael@0 | 68 | */ \ |
michael@0 | 69 | macro(let, let, TOK_LET, JSVERSION_1_7) |
michael@0 | 70 | |
michael@0 | 71 | #endif /* vm_Keywords_h */ |