summaryrefslogtreecommitdiff
path: root/js/src/frontend/TokenKind.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-06-07 20:20:19 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-06-07 20:20:19 -0500
commit878ab758d5d4c1ef7badf2bc20ebc7c67dc2165b (patch)
tree3683d6df35e3618c0e7b456de7c749ca4c8c21a6 /js/src/frontend/TokenKind.h
parenta621951327b0c19c0c24dfd9fd973f7bd13ae68f (diff)
parentcfb9884423faf741de03c5fcc72bf9ac8c6ada4d (diff)
downloadaura-central-878ab758d5d4c1ef7badf2bc20ebc7c67dc2165b.tar.gz
Merge branch 'TRUNK' into ARE-5.0
Diffstat (limited to 'js/src/frontend/TokenKind.h')
-rw-r--r--js/src/frontend/TokenKind.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/js/src/frontend/TokenKind.h b/js/src/frontend/TokenKind.h
index 27da8ecf3..f11ceda33 100644
--- a/js/src/frontend/TokenKind.h
+++ b/js/src/frontend/TokenKind.h
@@ -152,11 +152,15 @@
* range-testing. \
*/ \
/* \
- * Binary operators tokens, TOK_OR thru TOK_POW. These must be in the same \
- * order as F(OR) and friends in FOR_EACH_PARSE_NODE_KIND in ParseNode.h. \
+ * Binary operators tokens. \
+ * These must be in the same order in several places: \
+ * - the precedence table and JSOp code list in Parser.cpp \
+ * - the binary operators in ParseNode.h \
+ * - the first and last binary operator markers in ParseNode.h \
*/ \
+ macro(COALESCE, "'\?\?'") /* escapes to avoid trigraphs warning */ \
+ range(BINOP_FIRST, COALESCE) \
macro(OR, "'||'") /* logical or */ \
- range(BINOP_FIRST, OR) \
macro(AND, "'&&'") /* logical and */ \
macro(BITOR, "'|'") /* bitwise-or */ \
macro(BITXOR, "'^'") /* bitwise-xor */ \
@@ -196,7 +200,7 @@
macro(DIV, "'/'") \
macro(MOD, "'%'") \
macro(POW, "'**'") \
- range(BINOP_LAST, POW) \
+ range(BINOP_LAST, POW) \
\
/* Unary operation tokens. */ \
macro(TYPEOF, "keyword 'typeof'") \