Class Ecmascript5TokenKinds
- java.lang.Object
-
- net.sourceforge.pmd.lang.ecmascript5.ast.Ecmascript5TokenKinds
-
@InternalApi public final class Ecmascript5TokenKinds extends Object
Token kinds (JavaccToken.kind) for this language.
-
-
Field Summary
Fields Modifier and Type Field Description static int_DEFAULTstatic intANDASSIGNstatic intASSIGNstatic intATstatic intBACKTICK_STRING_LITERAL_BODYstatic intBANGstatic intBIT_ANDstatic intBIT_ORstatic intBOMstatic intBREAKstatic intCASEstatic intCATCHstatic intCLASSstatic intCOLONstatic intCOMMAstatic intCONSTstatic intCONTINUEstatic intCRstatic intDEBUGGERstatic intDECIMAL_LITERALstatic intDECRstatic intDELETEstatic intDOstatic intDOTstatic intDOUBLE_STRING_LITERAL_BODYstatic intELSEstatic intENUMstatic intEOFstatic intEOLstatic intEQstatic intEXPONENTstatic intEXPORTstatic intEXTENDSstatic intFALSEstatic intFFstatic intFINALLYstatic intFLOATING_POINT_LITERALstatic intFORstatic intFUNCTIONstatic intGEstatic intGETstatic intGTstatic intHEX_DIGITstatic intHEX_LITERALstatic intHOOKstatic intIDENTIFIERstatic intIDENTIFIER_PARTstatic intIDENTIFIER_STARTstatic intIFstatic intIMPORTstatic intINstatic intINCRstatic intINSTANCEOFstatic intJS_DOC_COMMENTstatic intLBRACEstatic intLBRACKETstatic intLEstatic intLETstatic intLFstatic intLPARENstatic intLSstatic intLSHIFTstatic intLSHIFTASSIGNstatic intLTstatic intMINUSstatic intMINUSASSIGNstatic intMULTI_LINE_COMMENTstatic intNBSPstatic intNEstatic intNEWstatic intNL_DECRstatic intNL_INCRstatic intNO_SKIP_EOLstatic intNULLstatic intOCTAL_LITERALstatic intORASSIGNstatic intPLUSstatic intPLUSASSIGNstatic intPSstatic intRBRACEstatic intRBRACKETstatic intREGULAR_EXPRESSION_BACKSLASH_SEQUENCEstatic intREGULAR_EXPRESSION_BODYstatic intREGULAR_EXPRESSION_CHARstatic intREGULAR_EXPRESSION_CLASSstatic intREGULAR_EXPRESSION_CLASS_CHARstatic intREGULAR_EXPRESSION_FIRST_CHARstatic intREGULAR_EXPRESSION_LITERALstatic intREMstatic intREMASSIGNstatic intRETURNstatic intRPARENstatic intRSIGNEDSHIFTstatic intRSIGNEDSHIFTASSIGNstatic intRUNSIGNEDSHIFTstatic intRUNSIGNEDSHIFTASSIGNstatic intSC_ANDstatic intSC_ORstatic intSEMICOLONstatic intSETstatic intSINGLE_LINE_COMMENTstatic intSINGLE_STRING_LITERAL_BODYstatic intSLASHstatic intSLASHASSIGNstatic intSPstatic intSTARstatic intSTARASSIGNstatic intSTRICT_EQstatic intSTRICT_NEQstatic intSTRING_LITERALstatic intSUPERstatic intSWITCHstatic intTABstatic intTHISstatic intTHROWstatic intTILDEstatic List<String>TOKEN_NAMESNams of the tokens, each index corresponds to a kind.static intTRUEstatic intTRYstatic intTYPEOFstatic intUNICODE_COMBINING_MARKstatic intUNICODE_CONNECTOR_PUNCTUATIONstatic intUNICODE_DIGITstatic intUNICODE_ESCAPE_SEQUENCEstatic intUNICODE_LETTERstatic intUNTERMINATED_STRING_LITERALstatic intUSPstatic intVARstatic intVOIDstatic intVTstatic intWHILEstatic intWITHstatic intXORstatic intXORASSIGNstatic intZWJstatic intZWNJ
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable Stringdescribe(int kind)Returns a string describing the given token kind.static TokenManager<JavaccToken>newTokenManager(CharStream cs)Returns a new token manager for this language.
-
-
-
Field Detail
-
EOF
public static final int EOF
- See Also:
- Constant Field Values
-
TAB
public static final int TAB
- See Also:
- Constant Field Values
-
VT
public static final int VT
- See Also:
- Constant Field Values
-
FF
public static final int FF
- See Also:
- Constant Field Values
-
SP
public static final int SP
- See Also:
- Constant Field Values
-
NBSP
public static final int NBSP
- See Also:
- Constant Field Values
-
BOM
public static final int BOM
- See Also:
- Constant Field Values
-
USP
public static final int USP
- See Also:
- Constant Field Values
-
LF
public static final int LF
- See Also:
- Constant Field Values
-
CR
public static final int CR
- See Also:
- Constant Field Values
-
LS
public static final int LS
- See Also:
- Constant Field Values
-
PS
public static final int PS
- See Also:
- Constant Field Values
-
EOL
public static final int EOL
- See Also:
- Constant Field Values
-
NO_SKIP_EOL
public static final int NO_SKIP_EOL
- See Also:
- Constant Field Values
-
SINGLE_LINE_COMMENT
public static final int SINGLE_LINE_COMMENT
- See Also:
- Constant Field Values
-
JS_DOC_COMMENT
public static final int JS_DOC_COMMENT
- See Also:
- Constant Field Values
-
MULTI_LINE_COMMENT
public static final int MULTI_LINE_COMMENT
- 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
-
DELETE
public static final int DELETE
- See Also:
- Constant Field Values
-
ELSE
public static final int ELSE
- See Also:
- Constant Field Values
-
FOR
public static final int FOR
- See Also:
- Constant Field Values
-
FUNCTION
public static final int FUNCTION
- See Also:
- Constant Field Values
-
IF
public static final int IF
- See Also:
- Constant Field Values
-
IN
public static final int IN
- See Also:
- Constant Field Values
-
NEW
public static final int NEW
- See Also:
- Constant Field Values
-
RETURN
public static final int RETURN
- See Also:
- Constant Field Values
-
THIS
public static final int THIS
- See Also:
- Constant Field Values
-
TYPEOF
public static final int TYPEOF
- See Also:
- Constant Field Values
-
VAR
public static final int VAR
- See Also:
- Constant Field Values
-
VOID
public static final int VOID
- See Also:
- Constant Field Values
-
WHILE
public static final int WHILE
- See Also:
- Constant Field Values
-
WITH
public static final int WITH
- See Also:
- Constant Field Values
-
CASE
public static final int CASE
- See Also:
- Constant Field Values
-
CATCH
public static final int CATCH
- See Also:
- Constant Field Values
-
CLASS
public static final int CLASS
- See Also:
- Constant Field Values
-
CONST
public static final int CONST
- See Also:
- Constant Field Values
-
DEBUGGER
public static final int DEBUGGER
- See Also:
- Constant Field Values
-
_DEFAULT
public static final int _DEFAULT
- See Also:
- Constant Field Values
-
DO
public static final int DO
- See Also:
- Constant Field Values
-
ENUM
public static final int ENUM
- See Also:
- Constant Field Values
-
EXPORT
public static final int EXPORT
- See Also:
- Constant Field Values
-
EXTENDS
public static final int EXTENDS
- See Also:
- Constant Field Values
-
FINALLY
public static final int FINALLY
- See Also:
- Constant Field Values
-
IMPORT
public static final int IMPORT
- See Also:
- Constant Field Values
-
SUPER
public static final int SUPER
- See Also:
- Constant Field Values
-
SWITCH
public static final int SWITCH
- See Also:
- Constant Field Values
-
THROW
public static final int THROW
- See Also:
- Constant Field Values
-
TRY
public static final int TRY
- See Also:
- Constant Field Values
-
INSTANCEOF
public static final int INSTANCEOF
- See Also:
- Constant Field Values
-
TRUE
public static final int TRUE
- See Also:
- Constant Field Values
-
FALSE
public static final int FALSE
- See Also:
- Constant Field Values
-
NULL
public static final int NULL
- 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
-
DECIMAL_LITERAL
public static final int DECIMAL_LITERAL
- See Also:
- Constant Field Values
-
HEX_LITERAL
public static final int HEX_LITERAL
- See Also:
- Constant Field Values
-
OCTAL_LITERAL
public static final int OCTAL_LITERAL
- See Also:
- Constant Field Values
-
FLOATING_POINT_LITERAL
public static final int FLOATING_POINT_LITERAL
- See Also:
- Constant Field Values
-
EXPONENT
public static final int EXPONENT
- See Also:
- Constant Field Values
-
STRING_LITERAL
public static final int STRING_LITERAL
- See Also:
- Constant Field Values
-
BACKTICK_STRING_LITERAL_BODY
public static final int BACKTICK_STRING_LITERAL_BODY
- See Also:
- Constant Field Values
-
SINGLE_STRING_LITERAL_BODY
public static final int SINGLE_STRING_LITERAL_BODY
- See Also:
- Constant Field Values
-
DOUBLE_STRING_LITERAL_BODY
public static final int DOUBLE_STRING_LITERAL_BODY
- See Also:
- Constant Field Values
-
UNTERMINATED_STRING_LITERAL
public static final int UNTERMINATED_STRING_LITERAL
- See Also:
- Constant Field Values
-
REGULAR_EXPRESSION_LITERAL
public static final int REGULAR_EXPRESSION_LITERAL
- See Also:
- Constant Field Values
-
REGULAR_EXPRESSION_BODY
public static final int REGULAR_EXPRESSION_BODY
- See Also:
- Constant Field Values
-
REGULAR_EXPRESSION_CHAR
public static final int REGULAR_EXPRESSION_CHAR
- See Also:
- Constant Field Values
-
REGULAR_EXPRESSION_FIRST_CHAR
public static final int REGULAR_EXPRESSION_FIRST_CHAR
- See Also:
- Constant Field Values
-
REGULAR_EXPRESSION_BACKSLASH_SEQUENCE
public static final int REGULAR_EXPRESSION_BACKSLASH_SEQUENCE
- See Also:
- Constant Field Values
-
REGULAR_EXPRESSION_CLASS
public static final int REGULAR_EXPRESSION_CLASS
- See Also:
- Constant Field Values
-
REGULAR_EXPRESSION_CLASS_CHAR
public static final int REGULAR_EXPRESSION_CLASS_CHAR
- See Also:
- Constant Field Values
-
IDENTIFIER
public static final int IDENTIFIER
- See Also:
- Constant Field Values
-
IDENTIFIER_START
public static final int IDENTIFIER_START
- See Also:
- Constant Field Values
-
IDENTIFIER_PART
public static final int IDENTIFIER_PART
- See Also:
- Constant Field Values
-
UNICODE_LETTER
public static final int UNICODE_LETTER
- See Also:
- Constant Field Values
-
UNICODE_ESCAPE_SEQUENCE
public static final int UNICODE_ESCAPE_SEQUENCE
- See Also:
- Constant Field Values
-
UNICODE_COMBINING_MARK
public static final int UNICODE_COMBINING_MARK
- See Also:
- Constant Field Values
-
UNICODE_DIGIT
public static final int UNICODE_DIGIT
- See Also:
- Constant Field Values
-
UNICODE_CONNECTOR_PUNCTUATION
public static final int UNICODE_CONNECTOR_PUNCTUATION
- See Also:
- Constant Field Values
-
ZWNJ
public static final int ZWNJ
- See Also:
- Constant Field Values
-
ZWJ
public static final int ZWJ
- See Also:
- Constant Field Values
-
HEX_DIGIT
public static final int HEX_DIGIT
- See Also:
- Constant Field Values
-
LPAREN
public static final int LPAREN
- See Also:
- Constant Field Values
-
RPAREN
public static final int RPAREN
- See Also:
- Constant Field Values
-
LBRACE
public static final int LBRACE
- See Also:
- Constant Field Values
-
RBRACE
public static final int RBRACE
- See Also:
- Constant Field Values
-
LBRACKET
public static final int LBRACKET
- See Also:
- Constant Field Values
-
RBRACKET
public static final int RBRACKET
- See Also:
- Constant Field Values
-
SEMICOLON
public static final int SEMICOLON
- See Also:
- Constant Field Values
-
COMMA
public static final int COMMA
- See Also:
- Constant Field Values
-
DOT
public static final int DOT
- See Also:
- Constant Field Values
-
ASSIGN
public static final int ASSIGN
- See Also:
- Constant Field Values
-
GT
public static final int GT
- See Also:
- Constant Field Values
-
LT
public static final int LT
- See Also:
- Constant Field Values
-
BANG
public static final int BANG
- See Also:
- Constant Field Values
-
TILDE
public static final int TILDE
- 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
-
STRICT_EQ
public static final int STRICT_EQ
- See Also:
- Constant Field Values
-
STRICT_NEQ
public static final int STRICT_NEQ
- See Also:
- Constant Field Values
-
EQ
public static final int EQ
- See Also:
- Constant Field Values
-
LE
public static final int LE
- See Also:
- Constant Field Values
-
GE
public static final int GE
- See Also:
- Constant Field Values
-
NE
public static final int NE
- See Also:
- Constant Field Values
-
SC_OR
public static final int SC_OR
- See Also:
- Constant Field Values
-
SC_AND
public static final int SC_AND
- See Also:
- Constant Field Values
-
INCR
public static final int INCR
- See Also:
- Constant Field Values
-
NL_INCR
public static final int NL_INCR
- See Also:
- Constant Field Values
-
DECR
public static final int DECR
- See Also:
- Constant Field Values
-
NL_DECR
public static final int NL_DECR
- See Also:
- Constant Field Values
-
PLUS
public static final int PLUS
- See Also:
- Constant Field Values
-
MINUS
public static final int MINUS
- See Also:
- Constant Field Values
-
STAR
public static final int STAR
- See Also:
- Constant Field Values
-
SLASH
public static final int SLASH
- See Also:
- Constant Field Values
-
BIT_AND
public static final int BIT_AND
- See Also:
- Constant Field Values
-
BIT_OR
public static final int BIT_OR
- See Also:
- Constant Field Values
-
XOR
public static final int XOR
- See Also:
- Constant Field Values
-
REM
public static final int REM
- See Also:
- Constant Field Values
-
LSHIFT
public static final int LSHIFT
- See Also:
- Constant Field Values
-
RSIGNEDSHIFT
public static final int RSIGNEDSHIFT
- See Also:
- Constant Field Values
-
RUNSIGNEDSHIFT
public static final int RUNSIGNEDSHIFT
- See Also:
- Constant Field Values
-
PLUSASSIGN
public static final int PLUSASSIGN
- See Also:
- Constant Field Values
-
MINUSASSIGN
public static final int MINUSASSIGN
- See Also:
- Constant Field Values
-
STARASSIGN
public static final int STARASSIGN
- See Also:
- Constant Field Values
-
SLASHASSIGN
public static final int SLASHASSIGN
- See Also:
- Constant Field Values
-
ANDASSIGN
public static final int ANDASSIGN
- See Also:
- Constant Field Values
-
ORASSIGN
public static final int ORASSIGN
- See Also:
- Constant Field Values
-
XORASSIGN
public static final int XORASSIGN
- See Also:
- Constant Field Values
-
REMASSIGN
public static final int REMASSIGN
- See Also:
- Constant Field Values
-
LSHIFTASSIGN
public static final int LSHIFTASSIGN
- See Also:
- Constant Field Values
-
RSIGNEDSHIFTASSIGN
public static final int RSIGNEDSHIFTASSIGN
- See Also:
- Constant Field Values
-
RUNSIGNEDSHIFTASSIGN
public static final int RUNSIGNEDSHIFTASSIGN
- See Also:
- Constant Field Values
-
AT
public static final int AT
- See Also:
- Constant Field Values
-
TOKEN_NAMES
public static final List<String> TOKEN_NAMES
Nams of the tokens, each index corresponds to a kind. See alsodescribe(int).
-
-
Method Detail
-
describe
public static @Nullable String describe(int kind)
Returns a string describing the given token kind. Returns null if the kind is unknown.- Parameters:
kind- Kind of token- Returns:
- A string describing the given kind
-
newTokenManager
@InternalApi public static TokenManager<JavaccToken> newTokenManager(CharStream cs)
Returns a new token manager for this language. The CharStream should be configured with the correct language-specific escaping and token document. This is not a published API, it's intended to be used as a basis for a CPD Tokenizer.
-
-