Package org.mozilla.javascript
Class Token
- java.lang.Object
-
- org.mozilla.javascript.Token
-
public class Token extends java.lang.ObjectThis class implements the JavaScript scanner.It is based on the C source files jsscan.c and jsscan.h in the jsref package.
- See Also:
Parser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classToken.CommentType
-
Field Summary
Fields Modifier and Type Field Description static intADDToken types.static intANDstatic intARRAYCOMPstatic intARRAYLITToken types.static intARROWstatic intASSIGNstatic intASSIGN_ADDstatic intASSIGN_BITANDstatic intASSIGN_BITORstatic intASSIGN_BITXORstatic intASSIGN_DIVstatic intASSIGN_EXPstatic intASSIGN_LSHstatic intASSIGN_MODstatic intASSIGN_MULstatic intASSIGN_RSHstatic intASSIGN_SUBstatic intASSIGN_URSHstatic intBIGINTToken types.static intBINDNAMEToken types.static intBITANDToken types.static intBITNOTToken types.static intBITORToken types.static intBITXORToken types.static intBLOCKstatic intBREAKstatic intCALLToken types.static intCASEstatic intCATCHstatic intCATCH_SCOPEToken types.static intCOLONstatic intCOLONCOLONstatic intCOMMAstatic intCOMMENTstatic intCONSTstatic intCONTINUEstatic intDEBUGGERstatic intDECstatic intDEFAULTstatic intDEFAULTNAMESPACEToken types.static intDEL_REFToken types.static intDELPROPToken types.static intDIVToken types.static intDOstatic intDOTstatic intDOTDOTstatic intDOTDOTDOTstatic intDOTQUERYstatic intELSEstatic intEMPTYstatic intENTERWITHToken types.static intENUM_IDToken types.static intENUM_INIT_ARRAYToken types.static intENUM_INIT_KEYSToken types.static intENUM_INIT_VALUESToken types.static intENUM_INIT_VALUES_IN_ORDERToken types.static intENUM_NEXTToken types.static intEOFToken types.static intEOLToken types.static intEQToken types.static intERRORToken types.static intESCXMLATTRToken types.static intESCXMLTEXTToken types.static intEXPToken types.static intEXPORTstatic intEXPR_RESULTstatic intEXPR_VOIDstatic intFALSEToken types.static intFINALLYstatic intFIRST_ASSIGNstatic intFIRST_BYTECODE_TOKENToken types.static intFORstatic intFUNCTIONstatic intGEToken types.static intGENEXPRstatic intGETstatic intGET_REFToken types.static intGETELEMToken types.static intGETPROPToken types.static intGETPROPNOWARNToken types.static intGETVARToken types.static intGOTOToken types.static intGTToken types.static intHOOKstatic intIFstatic intIFEQToken types.static intIFNEToken types.static intIMPORTstatic intINToken types.static intINCstatic intINSTANCEOFToken types.static intJSRstatic intLABELstatic intLAST_ASSIGNstatic intLAST_BYTECODE_TOKENstatic intLAST_TOKENstatic intLBstatic intLCstatic intLEToken types.static intLEAVEWITHToken types.static intLETstatic intLETEXPRstatic intLOCAL_BLOCKstatic intLOCAL_LOADToken types.static intLOOPstatic intLPstatic intLSHToken types.static intLTToken types.static intMETHODstatic intMODToken types.static intMULToken types.static intNAMEToken types.static intNEToken types.static intNEGToken types.static intNEWToken types.static intNOTToken types.static intNULLToken types.static intNUMBERToken types.static intOBJECTLITToken types.static intORstatic intPOSToken types.static booleanprintTreesstatic intRBstatic intRCstatic intREF_CALLToken types.static intREF_MEMBERToken types.static intREF_NAMEToken types.static intREF_NS_MEMBERToken types.static intREF_NS_NAMEToken types.static intREF_SPECIALToken types.static intREGEXPToken types.static intRESERVEDstatic intRETHROWToken types.static intRETURNToken types.static intRETURN_RESULTToken types.static intRPstatic intRSHToken types.static intSCRIPTstatic intSEMIstatic intSETstatic intSET_REFToken types.static intSET_REF_OPstatic intSETCONSTstatic intSETCONSTVARstatic intSETELEMToken types.static intSETELEM_OPstatic intSETNAMEToken types.static intSETPROPToken types.static intSETPROP_OPstatic intSETVARToken types.static intSHEQToken types.static intSHNEToken types.static intSTRICT_SETNAMEToken types.static intSTRINGToken types.static intSUBToken types.static intSWITCHstatic intTAGGED_TEMPLATE_LITERALstatic intTARGETstatic intTEMPLATE_CHARSstatic intTEMPLATE_LITERALstatic intTEMPLATE_LITERAL_SUBSTstatic intTHISToken types.static intTHISFNToken types.static intTHROWToken types.static intTO_DOUBLEstatic intTO_OBJECTstatic intTRUEToken types.static intTRYstatic intTYPEOFToken types.static intTYPEOFNAMEstatic intURSHToken types.static intUSE_STACKstatic intVARstatic intVOIDstatic intWHILEstatic intWITHstatic intWITHEXPRstatic intXMLstatic intXMLATTRstatic intXMLENDstatic intYIELDToken types.static intYIELD_STAR
-
Constructor Summary
Constructors Constructor Description Token()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisValidToken(int code)Return true if the passed code is a valid Token constant.static java.lang.StringkeywordToName(int token)Convert a keyword token to a name string for use with theContext.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIERfeature.static java.lang.Stringname(int token)Returns a name for the token.static java.lang.StringtypeToName(int token)Always returns a human-readable string for the token name.
-
-
-
Field Detail
-
printTrees
public static final boolean printTrees
- See Also:
- Constant Field Values
-
ERROR
public static final int ERROR
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
EOF
public static final int EOF
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
EOL
public static final int EOL
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
FIRST_BYTECODE_TOKEN
public static final int FIRST_BYTECODE_TOKEN
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ENTERWITH
public static final int ENTERWITH
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
LEAVEWITH
public static final int LEAVEWITH
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
RETURN
public static final int RETURN
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
GOTO
public static final int GOTO
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
IFEQ
public static final int IFEQ
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
IFNE
public static final int IFNE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
SETNAME
public static final int SETNAME
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
BITOR
public static final int BITOR
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
BITXOR
public static final int BITXOR
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
BITAND
public static final int BITAND
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
EQ
public static final int EQ
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
NE
public static final int NE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
LT
public static final int LT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
LE
public static final int LE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
GT
public static final int GT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
GE
public static final int GE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
LSH
public static final int LSH
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
RSH
public static final int RSH
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
URSH
public static final int URSH
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ADD
public static final int ADD
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
SUB
public static final int SUB
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
MUL
public static final int MUL
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
DIV
public static final int DIV
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
MOD
public static final int MOD
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
NOT
public static final int NOT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
BITNOT
public static final int BITNOT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
POS
public static final int POS
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
NEG
public static final int NEG
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
NEW
public static final int NEW
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
DELPROP
public static final int DELPROP
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
TYPEOF
public static final int TYPEOF
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
GETPROP
public static final int GETPROP
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
GETPROPNOWARN
public static final int GETPROPNOWARN
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
SETPROP
public static final int SETPROP
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
GETELEM
public static final int GETELEM
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
SETELEM
public static final int SETELEM
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
CALL
public static final int CALL
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
NAME
public static final int NAME
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
NUMBER
public static final int NUMBER
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
STRING
public static final int STRING
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
NULL
public static final int NULL
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
THIS
public static final int THIS
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
FALSE
public static final int FALSE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
TRUE
public static final int TRUE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
SHEQ
public static final int SHEQ
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
SHNE
public static final int SHNE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
REGEXP
public static final int REGEXP
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
BINDNAME
public static final int BINDNAME
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
THROW
public static final int THROW
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
RETHROW
public static final int RETHROW
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
IN
public static final int IN
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
INSTANCEOF
public static final int INSTANCEOF
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
LOCAL_LOAD
public static final int LOCAL_LOAD
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
GETVAR
public static final int GETVAR
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
SETVAR
public static final int SETVAR
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
CATCH_SCOPE
public static final int CATCH_SCOPE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ENUM_INIT_KEYS
public static final int ENUM_INIT_KEYS
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ENUM_INIT_VALUES
public static final int ENUM_INIT_VALUES
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ENUM_INIT_ARRAY
public static final int ENUM_INIT_ARRAY
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ENUM_INIT_VALUES_IN_ORDER
public static final int ENUM_INIT_VALUES_IN_ORDER
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ENUM_NEXT
public static final int ENUM_NEXT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ENUM_ID
public static final int ENUM_ID
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
THISFN
public static final int THISFN
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
RETURN_RESULT
public static final int RETURN_RESULT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ARRAYLIT
public static final int ARRAYLIT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
OBJECTLIT
public static final int OBJECTLIT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
GET_REF
public static final int GET_REF
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
SET_REF
public static final int SET_REF
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
DEL_REF
public static final int DEL_REF
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
REF_CALL
public static final int REF_CALL
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
REF_SPECIAL
public static final int REF_SPECIAL
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
YIELD
public static final int YIELD
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
STRICT_SETNAME
public static final int STRICT_SETNAME
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
EXP
public static final int EXP
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
DEFAULTNAMESPACE
public static final int DEFAULTNAMESPACE
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ESCXMLATTR
public static final int ESCXMLATTR
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
ESCXMLTEXT
public static final int ESCXMLTEXT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
REF_MEMBER
public static final int REF_MEMBER
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
REF_NS_MEMBER
public static final int REF_NS_MEMBER
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
REF_NAME
public static final int REF_NAME
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
REF_NS_NAME
public static final int REF_NS_NAME
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
BIGINT
public static final int BIGINT
Token types. These values correspond to JSTokenType values in jsscan.c.- See Also:
- Constant Field Values
-
LAST_BYTECODE_TOKEN
public static final int LAST_BYTECODE_TOKEN
- See Also:
- Constant Field Values
-
TRY
public static final int TRY
- See Also:
- Constant Field Values
-
SEMI
public static final int SEMI
- See Also:
- Constant Field Values
-
LB
public static final int LB
- See Also:
- Constant Field Values
-
RB
public static final int RB
- See Also:
- Constant Field Values
-
LC
public static final int LC
- See Also:
- Constant Field Values
-
RC
public static final int RC
- See Also:
- Constant Field Values
-
LP
public static final int LP
- See Also:
- Constant Field Values
-
RP
public static final int RP
- See Also:
- Constant Field Values
-
COMMA
public static final int COMMA
- See Also:
- Constant Field Values
-
ASSIGN
public static final int ASSIGN
- See Also:
- Constant Field Values
-
ASSIGN_BITOR
public static final int ASSIGN_BITOR
- See Also:
- Constant Field Values
-
ASSIGN_BITXOR
public static final int ASSIGN_BITXOR
- See Also:
- Constant Field Values
-
ASSIGN_BITAND
public static final int ASSIGN_BITAND
- See Also:
- Constant Field Values
-
ASSIGN_LSH
public static final int ASSIGN_LSH
- See Also:
- Constant Field Values
-
ASSIGN_RSH
public static final int ASSIGN_RSH
- See Also:
- Constant Field Values
-
ASSIGN_URSH
public static final int ASSIGN_URSH
- See Also:
- Constant Field Values
-
ASSIGN_ADD
public static final int ASSIGN_ADD
- See Also:
- Constant Field Values
-
ASSIGN_SUB
public static final int ASSIGN_SUB
- See Also:
- Constant Field Values
-
ASSIGN_MUL
public static final int ASSIGN_MUL
- See Also:
- Constant Field Values
-
ASSIGN_DIV
public static final int ASSIGN_DIV
- See Also:
- Constant Field Values
-
ASSIGN_MOD
public static final int ASSIGN_MOD
- See Also:
- Constant Field Values
-
ASSIGN_EXP
public static final int ASSIGN_EXP
- See Also:
- Constant Field Values
-
FIRST_ASSIGN
public static final int FIRST_ASSIGN
- See Also:
- Constant Field Values
-
LAST_ASSIGN
public static final int LAST_ASSIGN
- See Also:
- Constant Field Values
-
HOOK
public static final int HOOK
- See Also:
- Constant Field Values
-
COLON
public static final int COLON
- See Also:
- Constant Field Values
-
OR
public static final int OR
- See Also:
- Constant Field Values
-
AND
public static final int AND
- See Also:
- Constant Field Values
-
INC
public static final int INC
- See Also:
- Constant Field Values
-
DEC
public static final int DEC
- See Also:
- Constant Field Values
-
DOT
public static final int DOT
- See Also:
- Constant Field Values
-
FUNCTION
public static final int FUNCTION
- See Also:
- Constant Field Values
-
EXPORT
public static final int EXPORT
- See Also:
- Constant Field Values
-
IMPORT
public static final int IMPORT
- See Also:
- Constant Field Values
-
IF
public static final int IF
- See Also:
- Constant Field Values
-
ELSE
public static final int ELSE
- See Also:
- Constant Field Values
-
SWITCH
public static final int SWITCH
- See Also:
- Constant Field Values
-
CASE
public static final int CASE
- See Also:
- Constant Field Values
-
DEFAULT
public static final int DEFAULT
- See Also:
- Constant Field Values
-
WHILE
public static final int WHILE
- See Also:
- Constant Field Values
-
DO
public static final int DO
- See Also:
- Constant Field Values
-
FOR
public static final int FOR
- See Also:
- Constant Field Values
-
BREAK
public static final int BREAK
- See Also:
- Constant Field Values
-
CONTINUE
public static final int CONTINUE
- See Also:
- Constant Field Values
-
VAR
public static final int VAR
- See Also:
- Constant Field Values
-
WITH
public static final int WITH
- See Also:
- Constant Field Values
-
CATCH
public static final int CATCH
- See Also:
- Constant Field Values
-
FINALLY
public static final int FINALLY
- See Also:
- Constant Field Values
-
VOID
public static final int VOID
- See Also:
- Constant Field Values
-
RESERVED
public static final int RESERVED
- See Also:
- Constant Field Values
-
EMPTY
public static final int EMPTY
- See Also:
- Constant Field Values
-
BLOCK
public static final int BLOCK
- See Also:
- Constant Field Values
-
LABEL
public static final int LABEL
- See Also:
- Constant Field Values
-
TARGET
public static final int TARGET
- See Also:
- Constant Field Values
-
LOOP
public static final int LOOP
- See Also:
- Constant Field Values
-
EXPR_VOID
public static final int EXPR_VOID
- See Also:
- Constant Field Values
-
EXPR_RESULT
public static final int EXPR_RESULT
- See Also:
- Constant Field Values
-
JSR
public static final int JSR
- See Also:
- Constant Field Values
-
SCRIPT
public static final int SCRIPT
- See Also:
- Constant Field Values
-
TYPEOFNAME
public static final int TYPEOFNAME
- See Also:
- Constant Field Values
-
USE_STACK
public static final int USE_STACK
- See Also:
- Constant Field Values
-
SETPROP_OP
public static final int SETPROP_OP
- See Also:
- Constant Field Values
-
SETELEM_OP
public static final int SETELEM_OP
- See Also:
- Constant Field Values
-
LOCAL_BLOCK
public static final int LOCAL_BLOCK
- See Also:
- Constant Field Values
-
SET_REF_OP
public static final int SET_REF_OP
- See Also:
- Constant Field Values
-
DOTDOT
public static final int DOTDOT
- See Also:
- Constant Field Values
-
COLONCOLON
public static final int COLONCOLON
- See Also:
- Constant Field Values
-
XML
public static final int XML
- See Also:
- Constant Field Values
-
DOTQUERY
public static final int DOTQUERY
- See Also:
- Constant Field Values
-
XMLATTR
public static final int XMLATTR
- See Also:
- Constant Field Values
-
XMLEND
public static final int XMLEND
- See Also:
- Constant Field Values
-
TO_OBJECT
public static final int TO_OBJECT
- See Also:
- Constant Field Values
-
TO_DOUBLE
public static final int TO_DOUBLE
- See Also:
- Constant Field Values
-
GET
public static final int GET
- See Also:
- Constant Field Values
-
SET
public static final int SET
- See Also:
- Constant Field Values
-
LET
public static final int LET
- See Also:
- Constant Field Values
-
CONST
public static final int CONST
- See Also:
- Constant Field Values
-
SETCONST
public static final int SETCONST
- See Also:
- Constant Field Values
-
SETCONSTVAR
public static final int SETCONSTVAR
- See Also:
- Constant Field Values
-
ARRAYCOMP
public static final int ARRAYCOMP
- See Also:
- Constant Field Values
-
LETEXPR
public static final int LETEXPR
- See Also:
- Constant Field Values
-
WITHEXPR
public static final int WITHEXPR
- See Also:
- Constant Field Values
-
DEBUGGER
public static final int DEBUGGER
- See Also:
- Constant Field Values
-
COMMENT
public static final int COMMENT
- See Also:
- Constant Field Values
-
GENEXPR
public static final int GENEXPR
- See Also:
- Constant Field Values
-
METHOD
public static final int METHOD
- See Also:
- Constant Field Values
-
ARROW
public static final int ARROW
- See Also:
- Constant Field Values
-
YIELD_STAR
public static final int YIELD_STAR
- See Also:
- Constant Field Values
-
TEMPLATE_LITERAL
public static final int TEMPLATE_LITERAL
- See Also:
- Constant Field Values
-
TEMPLATE_CHARS
public static final int TEMPLATE_CHARS
- See Also:
- Constant Field Values
-
TEMPLATE_LITERAL_SUBST
public static final int TEMPLATE_LITERAL_SUBST
- See Also:
- Constant Field Values
-
TAGGED_TEMPLATE_LITERAL
public static final int TAGGED_TEMPLATE_LITERAL
- See Also:
- Constant Field Values
-
DOTDOTDOT
public static final int DOTDOTDOT
- See Also:
- Constant Field Values
-
LAST_TOKEN
public static final int LAST_TOKEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
name
public static java.lang.String name(int token)
Returns a name for the token. If Rhino is compiled with certain hardcoded debugging flags in this file, it calls#typeToName; otherwise it returns a string whose value is the token number.
-
typeToName
public static java.lang.String typeToName(int token)
Always returns a human-readable string for the token name. For instance,FINALLYhas the name "FINALLY".- Parameters:
token- the token code- Returns:
- the actual name for the token code
-
keywordToName
public static java.lang.String keywordToName(int token)
Convert a keyword token to a name string for use with theContext.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIERfeature.- Parameters:
token- A token- Returns:
- the corresponding name string
-
isValidToken
public static boolean isValidToken(int code)
Return true if the passed code is a valid Token constant.- Parameters:
code- a potential token code- Returns:
- true if it's a known token
-
-