< prev index next >
src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/TokenType.java
Print this page
*** 80,90 ****
ASSIGN_SHL (BINARY, "<<=", 2, false),
LE (BINARY, "<=", 10, true),
ASSIGN (BINARY, "=", 2, false),
EQ (BINARY, "==", 9, true),
EQ_STRICT (BINARY, "===", 9, true),
! BIND (BINARY, "=>", 9, true),
GT (BINARY, ">", 10, true),
GE (BINARY, ">=", 10, true),
SAR (BINARY, ">>", 11, true),
ASSIGN_SAR (BINARY, ">>=", 2, false),
SHR (BINARY, ">>>", 11, true),
--- 80,90 ----
ASSIGN_SHL (BINARY, "<<=", 2, false),
LE (BINARY, "<=", 10, true),
ASSIGN (BINARY, "=", 2, false),
EQ (BINARY, "==", 9, true),
EQ_STRICT (BINARY, "===", 9, true),
! ARROW (BINARY, "=>", 2, true),
GT (BINARY, ">", 10, true),
GE (BINARY, ">=", 10, true),
SAR (BINARY, ">>", 11, true),
ASSIGN_SAR (BINARY, ">>=", 2, false),
SHR (BINARY, ">>>", 11, true),
*** 98,107 ****
--- 98,108 ----
BIT_OR (BINARY, "|", 6, true),
ASSIGN_BIT_OR (BINARY, "|=", 2, false),
OR (BINARY, "||", 4, true),
RBRACE (BRACKET, "}"),
BIT_NOT (UNARY, "~", 14, false),
+ ELLIPSIS (UNARY, "..."),
// ECMA 7.6.1.1 Keywords, 7.6.1.2 Future Reserved Words.
// All other Java keywords are commented out.
// ABSTRACT (FUTURE, "abstract"),
*** 188,198 ****
TEMPLATE_MIDDLE(LITERAL, null),
TEMPLATE_TAIL (LITERAL, null),
COMMALEFT (IR, null),
DECPOSTFIX (IR, null),
! INCPOSTFIX (IR, null);
/** Next token kind in token lookup table. */
private TokenType next;
/** Classification of token. */
--- 189,202 ----
TEMPLATE_MIDDLE(LITERAL, null),
TEMPLATE_TAIL (LITERAL, null),
COMMALEFT (IR, null),
DECPOSTFIX (IR, null),
! INCPOSTFIX (IR, null),
! SPREAD_ARGUMENT(IR, null),
! SPREAD_ARRAY (IR, null),
! YIELD_STAR (IR, null);
/** Next token kind in token lookup table. */
private TokenType next;
/** Classification of token. */
*** 249,259 ****
*/
public boolean isOperator(final boolean noIn) {
return kind == BINARY && (!noIn || this != IN) && precedence != 0;
}
-
public int getLength() {
assert name != null : "Token name not set";
return name.length();
}
--- 253,262 ----
< prev index next >