Enum Keywords
- java.lang.Object
-
- java.lang.Enum<Keywords>
-
- com.google.javascript.jscomp.parsing.parser.Keywords
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BREAK
CASE
CATCH
CLASS
CONST
CONTINUE
DEBUGGER
DECLARE
DEFAULT
DELETE
DO
ELSE
ENUM
EXPORT
EXTENDS
FALSE
FINALLY
FOR
FUNCTION
IF
IMPLEMENTS
IMPORT
IN
INSTANCEOF
INTERFACE
LET
MODULE
NAMESPACE
NEW
NULL
PACKAGE
PRIVATE
PROTECTED
PUBLIC
RETURN
STATIC
SUPER
SWITCH
THIS
THROW
TRUE
TRY
TYPE
TYPEOF
VAR
VOID
WHILE
WITH
YIELD
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Keywords
get(TokenType token)
static Keywords
get(java.lang.String value, boolean includeTypeScriptKeywords)
static TokenType
getTokenType(java.lang.String value)
static boolean
isKeyword(TokenType token)
static boolean
isKeyword(java.lang.String value, boolean includeTypeScriptKeywords)
static boolean
isStrictKeyword(TokenType token)
Returns true iftoken
is a "future reserved word" which can be used as a variable identifier, but only in non-strict mode.static boolean
isTypeScriptSpecificKeyword(TokenType type)
java.lang.String
toString()
static Keywords
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Keywords[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BREAK
public static final Keywords BREAK
-
CASE
public static final Keywords CASE
-
CATCH
public static final Keywords CATCH
-
CONTINUE
public static final Keywords CONTINUE
-
DEBUGGER
public static final Keywords DEBUGGER
-
DEFAULT
public static final Keywords DEFAULT
-
DELETE
public static final Keywords DELETE
-
DO
public static final Keywords DO
-
ELSE
public static final Keywords ELSE
-
FINALLY
public static final Keywords FINALLY
-
FOR
public static final Keywords FOR
-
FUNCTION
public static final Keywords FUNCTION
-
IF
public static final Keywords IF
-
IN
public static final Keywords IN
-
INSTANCEOF
public static final Keywords INSTANCEOF
-
NEW
public static final Keywords NEW
-
RETURN
public static final Keywords RETURN
-
SWITCH
public static final Keywords SWITCH
-
THIS
public static final Keywords THIS
-
THROW
public static final Keywords THROW
-
TRY
public static final Keywords TRY
-
TYPEOF
public static final Keywords TYPEOF
-
VAR
public static final Keywords VAR
-
VOID
public static final Keywords VOID
-
WHILE
public static final Keywords WHILE
-
WITH
public static final Keywords WITH
-
CLASS
public static final Keywords CLASS
-
CONST
public static final Keywords CONST
-
ENUM
public static final Keywords ENUM
-
EXPORT
public static final Keywords EXPORT
-
EXTENDS
public static final Keywords EXTENDS
-
IMPORT
public static final Keywords IMPORT
-
SUPER
public static final Keywords SUPER
-
IMPLEMENTS
public static final Keywords IMPLEMENTS
-
INTERFACE
public static final Keywords INTERFACE
-
LET
public static final Keywords LET
-
PACKAGE
public static final Keywords PACKAGE
-
PRIVATE
public static final Keywords PRIVATE
-
PROTECTED
public static final Keywords PROTECTED
-
PUBLIC
public static final Keywords PUBLIC
-
STATIC
public static final Keywords STATIC
-
YIELD
public static final Keywords YIELD
-
NULL
public static final Keywords NULL
-
TRUE
public static final Keywords TRUE
-
FALSE
public static final Keywords FALSE
-
DECLARE
public static final Keywords DECLARE
-
TYPE
public static final Keywords TYPE
-
MODULE
public static final Keywords MODULE
-
NAMESPACE
public static final Keywords NAMESPACE
-
-
Field Detail
-
value
public final java.lang.String value
-
type
public final TokenType type
-
-
Method Detail
-
values
public static Keywords[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Keywords c : Keywords.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Keywords valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<Keywords>
-
isKeyword
public static boolean isKeyword(java.lang.String value, boolean includeTypeScriptKeywords)
-
isKeyword
public static boolean isKeyword(TokenType token)
-
isTypeScriptSpecificKeyword
public static boolean isTypeScriptSpecificKeyword(TokenType type)
-
isStrictKeyword
public static boolean isStrictKeyword(TokenType token)
Returns true iftoken
is a "future reserved word" which can be used as a variable identifier, but only in non-strict mode.
-
getTokenType
public static TokenType getTokenType(java.lang.String value)
-
get
public static Keywords get(java.lang.String value, boolean includeTypeScriptKeywords)
-
-