diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /js/src/frontend/ReservedWords.h | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/frontend/ReservedWords.h')
-rw-r--r-- | js/src/frontend/ReservedWords.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/js/src/frontend/ReservedWords.h b/js/src/frontend/ReservedWords.h new file mode 100644 index 0000000000..723f310ecf --- /dev/null +++ b/js/src/frontend/ReservedWords.h @@ -0,0 +1,78 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * vim: set ts=8 sts=2 et sw=2 tw=80: + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* A higher-order macro for enumerating reserved word tokens. */ + +#ifndef vm_ReservedWords_h +#define vm_ReservedWords_h + +#define FOR_EACH_JAVASCRIPT_RESERVED_WORD(MACRO) \ + MACRO(false, false_, TokenKind::False) \ + MACRO(true, true_, TokenKind::True) \ + MACRO(null, null, TokenKind::Null) \ + \ + /* Keywords. */ \ + MACRO(break, break_, TokenKind::Break) \ + MACRO(case, case_, TokenKind::Case) \ + MACRO(catch, catch_, TokenKind::Catch) \ + MACRO(const, const_, TokenKind::Const) \ + MACRO(continue, continue_, TokenKind::Continue) \ + MACRO(debugger, debugger, TokenKind::Debugger) \ + MACRO(default, default_, TokenKind::Default) \ + MACRO(delete, delete_, TokenKind::Delete) \ + MACRO(do, do_, TokenKind::Do) \ + MACRO(else, else_, TokenKind::Else) \ + MACRO(finally, finally_, TokenKind::Finally) \ + MACRO(for, for_, TokenKind::For) \ + MACRO(function, function, TokenKind::Function) \ + MACRO(if, if_, TokenKind::If) \ + MACRO(in, in, TokenKind::In) \ + MACRO(instanceof, instanceof, TokenKind::InstanceOf) \ + MACRO(new, new_, TokenKind::New) \ + MACRO(return, return_, TokenKind::Return) \ + MACRO(switch, switch_, TokenKind::Switch) \ + MACRO(this, this_, TokenKind::This) \ + MACRO(throw, throw_, TokenKind::Throw) \ + MACRO(try, try_, TokenKind::Try) \ + MACRO(typeof, typeof_, TokenKind::TypeOf) \ + MACRO(var, var, TokenKind::Var) \ + MACRO(void, void_, TokenKind::Void) \ + MACRO(while, while_, TokenKind::While) \ + MACRO(with, with, TokenKind::With) \ + MACRO(import, import, TokenKind::Import) \ + MACRO(export, export_, TokenKind::Export) \ + MACRO(class, class_, TokenKind::Class) \ + MACRO(extends, extends, TokenKind::Extends) \ + IF_DECORATORS(MACRO(accessor, accessor, TokenKind::Accessor)) \ + MACRO(super, super, TokenKind::Super) \ + \ + /* Future reserved words. */ \ + MACRO(enum, enum_, TokenKind::Enum) \ + \ + /* Future reserved words, but only in strict mode. */ \ + MACRO(implements, implements, TokenKind::Implements) \ + MACRO(interface, interface, TokenKind::Interface) \ + MACRO(package, package, TokenKind::Package) \ + MACRO(private, private_, TokenKind::Private) \ + MACRO(protected, protected_, TokenKind::Protected) \ + MACRO(public, public_, TokenKind::Public) \ + \ + /* Contextual keywords. */ \ + MACRO(as, as, TokenKind::As) \ + MACRO(assert, assert_, TokenKind::Assert) \ + MACRO(async, async, TokenKind::Async) \ + MACRO(await, await, TokenKind::Await) \ + MACRO(from, from, TokenKind::From) \ + MACRO(get, get, TokenKind::Get) \ + MACRO(let, let, TokenKind::Let) \ + MACRO(meta, meta, TokenKind::Meta) \ + MACRO(of, of, TokenKind::Of) \ + MACRO(set, set, TokenKind::Set) \ + MACRO(static, static_, TokenKind::Static) \ + MACRO(target, target, TokenKind::Target) \ + MACRO(yield, yield, TokenKind::Yield) + +#endif /* vm_ReservedWords_h */ |