Package org.sonar.javascript.lexer
Enum JavaScriptKeyword
- java.lang.Object
-
- java.lang.Enum<JavaScriptKeyword>
-
- org.sonar.javascript.lexer.JavaScriptKeyword
-
- All Implemented Interfaces:
com.sonar.sslr.api.AstNodeType,com.sonar.sslr.api.TokenType,Serializable,Comparable<JavaScriptKeyword>,org.sonar.sslr.grammar.GrammarRuleKey
public enum JavaScriptKeyword extends Enum<JavaScriptKeyword> implements com.sonar.sslr.api.TokenType, org.sonar.sslr.grammar.GrammarRuleKey
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()StringgetValue()booleanhasToBeSkippedFromAst(com.sonar.sslr.api.AstNode node)static String[]keywordValues()static JavaScriptKeywordvalueOf(String name)Returns the enum constant of this type with the specified name.static JavaScriptKeyword[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NULL
public static final JavaScriptKeyword NULL
-
TRUE
public static final JavaScriptKeyword TRUE
-
FALSE
public static final JavaScriptKeyword FALSE
-
BREAK
public static final JavaScriptKeyword BREAK
-
CASE
public static final JavaScriptKeyword CASE
-
CATCH
public static final JavaScriptKeyword CATCH
-
CLASS
public static final JavaScriptKeyword CLASS
-
CONTINUE
public static final JavaScriptKeyword CONTINUE
-
DEBUGGER
public static final JavaScriptKeyword DEBUGGER
-
DEFAULT
public static final JavaScriptKeyword DEFAULT
-
DELETE
public static final JavaScriptKeyword DELETE
-
DO
public static final JavaScriptKeyword DO
-
EXTENDS
public static final JavaScriptKeyword EXTENDS
-
ELSE
public static final JavaScriptKeyword ELSE
-
FINALLY
public static final JavaScriptKeyword FINALLY
-
FOR
public static final JavaScriptKeyword FOR
-
FUNCTION
public static final JavaScriptKeyword FUNCTION
-
IF
public static final JavaScriptKeyword IF
-
IMPORT
public static final JavaScriptKeyword IMPORT
-
IN
public static final JavaScriptKeyword IN
-
INSTANCEOF
public static final JavaScriptKeyword INSTANCEOF
-
NEW
public static final JavaScriptKeyword NEW
-
RETURN
public static final JavaScriptKeyword RETURN
-
SUPER
public static final JavaScriptKeyword SUPER
-
SWITCH
public static final JavaScriptKeyword SWITCH
-
THIS
public static final JavaScriptKeyword THIS
-
THROW
public static final JavaScriptKeyword THROW
-
TRY
public static final JavaScriptKeyword TRY
-
TYPEOF
public static final JavaScriptKeyword TYPEOF
-
VAR
public static final JavaScriptKeyword VAR
-
VOID
public static final JavaScriptKeyword VOID
-
WHILE
public static final JavaScriptKeyword WHILE
-
WITH
public static final JavaScriptKeyword WITH
-
YIELD
public static final JavaScriptKeyword YIELD
-
CONST
public static final JavaScriptKeyword CONST
-
EXPORT
public static final JavaScriptKeyword EXPORT
-
ENUM
public static final JavaScriptKeyword ENUM
-
AWAIT
public static final JavaScriptKeyword AWAIT
-
-
Method Detail
-
values
public static JavaScriptKeyword[] 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 (JavaScriptKeyword c : JavaScriptKeyword.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaScriptKeyword valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getName
public String getName()
- Specified by:
getNamein interfacecom.sonar.sslr.api.TokenType
-
getValue
public String getValue()
- Specified by:
getValuein interfacecom.sonar.sslr.api.TokenType
-
hasToBeSkippedFromAst
public boolean hasToBeSkippedFromAst(com.sonar.sslr.api.AstNode node)
- Specified by:
hasToBeSkippedFromAstin interfacecom.sonar.sslr.api.TokenType
-
keywordValues
public static String[] keywordValues()
-
-