Package org.sonar.python.api
Enum PythonKeyword
- java.lang.Object
-
- java.lang.Enum<PythonKeyword>
-
- org.sonar.python.api.PythonKeyword
-
- All Implemented Interfaces:
com.sonar.sslr.api.AstNodeType,com.sonar.sslr.api.TokenType,Serializable,Comparable<PythonKeyword>
public enum PythonKeyword extends Enum<PythonKeyword> implements com.sonar.sslr.api.TokenType
http://docs.python.org/reference/lexical_analysis.html#keywords
-
-
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 PythonKeywordvalueOf(String name)Returns the enum constant of this type with the specified name.static PythonKeyword[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final PythonKeyword NONE
-
AND
public static final PythonKeyword AND
Logical AND.
-
AS
public static final PythonKeyword AS
-
ASSERT
public static final PythonKeyword ASSERT
-
BREAK
public static final PythonKeyword BREAK
-
CLASS
public static final PythonKeyword CLASS
-
CONTINUE
public static final PythonKeyword CONTINUE
-
DEF
public static final PythonKeyword DEF
-
DEL
public static final PythonKeyword DEL
-
ELIF
public static final PythonKeyword ELIF
-
ELSE
public static final PythonKeyword ELSE
-
EXCEPT
public static final PythonKeyword EXCEPT
-
FINALLY
public static final PythonKeyword FINALLY
-
FOR
public static final PythonKeyword FOR
-
FROM
public static final PythonKeyword FROM
-
GLOBAL
public static final PythonKeyword GLOBAL
-
IF
public static final PythonKeyword IF
-
IMPORT
public static final PythonKeyword IMPORT
-
IN
public static final PythonKeyword IN
-
IS
public static final PythonKeyword IS
-
LAMBDA
public static final PythonKeyword LAMBDA
-
NONLOCAL
public static final PythonKeyword NONLOCAL
-
NOT
public static final PythonKeyword NOT
-
OR
public static final PythonKeyword OR
Logical OR.
-
PASS
public static final PythonKeyword PASS
-
RAISE
public static final PythonKeyword RAISE
-
RETURN
public static final PythonKeyword RETURN
-
TRY
public static final PythonKeyword TRY
-
WHILE
public static final PythonKeyword WHILE
-
WITH
public static final PythonKeyword WITH
-
YIELD
public static final PythonKeyword YIELD
-
-
Method Detail
-
values
public static PythonKeyword[] 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 (PythonKeyword c : PythonKeyword.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PythonKeyword 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()
-
-