Keyword class

The keywords in the Dart programming language.

Clients may not extend, implement or mix-in this class.

Inheritance

Constructors

Keyword(int index, String lexeme, String name, KeywordStyle keywordStyle, {bool isModifier = false, bool isTopLevelKeyword = false, int precedence = NO_PRECEDENCE})
Initialize a newly created keyword.
const

Properties

binaryOperatorOfCompoundAssignment TokenType?
The binary operator that is invoked by this compound assignment operator, or null otherwise.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
index int
A unique index identifying this TokenType.
finalinherited
isAdditiveOperator bool
Return true if this type of token represents an additive operator.
no setterinherited
isAssignmentOperator bool
Return true if this type of token represents an assignment operator.
no setterinherited
isAssociativeOperator bool
Return true if this type of token represents an associative operator. An associative operator is an operator for which the following equality is true: (a * b) * c == a * (b * c). In other words, if the result of applying the operator to multiple operands does not depend on the order in which those applications occur.
no setterinherited
isBinaryOperator bool
true if this token type represents a binary operator.
finalinherited
isBuiltIn bool
A flag indicating whether the keyword is a "built-in" identifier.
no setteroverride
isBuiltInOrPseudo bool
no setter
isEqualityOperator bool
Return true if this type of token represents an equality operator.
no setterinherited
isIncrementOperator bool
Return true if this type of token represents an increment operator.
no setterinherited
isKeyword bool
Return true if this type of token is a keyword.
no setterinherited
isModifier bool
true if this token type represents a modifier such as abstract or const.
finalinherited
isMultiplicativeOperator bool
Return true if this type of token represents a multiplicative operator.
no setterinherited
isOperator bool
true if this token type represents an operator.
finalinherited
isPseudo bool
A flag indicating whether the keyword can be used as an identifier in some situations.
no setteroverride
isRelationalOperator bool
Return true if this type of token represents a relational operator.
no setterinherited
isReservedWord bool
A flag indicating whether the keyword is a "reserved word".
no setteroverride
isSelectorOperator bool
Return true if this type of token represents a selector operator (starting token of a selector).
no setterinherited
isShiftOperator bool
Return true if this type of token represents a shift operator.
no setterinherited
isTopLevelKeyword bool
true if this token type represents a keyword starting a top level declaration such as class, enum, import, etc.
finalinherited
isUnaryPostfixOperator bool
Return true if this type of token represents a unary postfix operator.
no setterinherited
isUnaryPrefixOperator bool
Return true if this type of token represents a unary prefix operator.
no setterinherited
isUserDefinableOperator bool
true if this token type represents an operator that can be defined by users.
finalinherited
keywordStyle → KeywordStyle
final
kind int
finalinherited
lexeme String
The lexeme that defines this type of token, or null if there is more than one possible lexeme for this type of token.
finalinherited
name String
The name of the keyword type.
no setteroverride
precedence int
The precedence of this type of token, or 0 if the token does not represent an operator.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringValue String?
See Token.stringValue for an explanation.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

keywords Map<String, Keyword>
A table mapping the lexemes of keywords to the corresponding keyword.
final

Constants

ABSTRACT → const Keyword
AS → const Keyword
ASSERT → const Keyword
ASYNC → const Keyword
AUGMENT → const Keyword
AWAIT → const Keyword
BASE → const Keyword
BREAK → const Keyword
CASE → const Keyword
CATCH → const Keyword
CLASS → const Keyword
CONST → const Keyword
CONTINUE → const Keyword
COVARIANT → const Keyword
DEFAULT → const Keyword
DEFERRED → const Keyword
DO → const Keyword
DYNAMIC → const Keyword
ELSE → const Keyword
ENUM → const Keyword
EXPORT → const Keyword
EXTENDS → const Keyword
EXTENSION → const Keyword
EXTERNAL → const Keyword
FACTORY → const Keyword
FALSE → const Keyword
FINAL → const Keyword
FINALLY → const Keyword
FOR → const Keyword
FUNCTION → const Keyword
GET → const Keyword
HIDE → const Keyword
IF → const Keyword
IMPLEMENTS → const Keyword
IMPORT → const Keyword
IN → const Keyword
INOUT → const Keyword
INTERFACE → const Keyword
IS → const Keyword
LATE → const Keyword
LIBRARY → const Keyword
MIXIN → const Keyword
NATIVE → const Keyword
NEW → const Keyword
NULL → const Keyword
OF → const Keyword
ON → const Keyword
OPERATOR → const Keyword
OUT → const Keyword
PART → const Keyword
PATCH → const Keyword
REQUIRED → const Keyword
RETHROW → const Keyword
RETURN → const Keyword
SEALED → const Keyword
SET → const Keyword
SHOW → const Keyword
SOURCE → const Keyword
STATIC → const Keyword
SUPER → const Keyword
SWITCH → const Keyword
SYNC → const Keyword
THIS → const Keyword
THROW → const Keyword
TRUE → const Keyword
TRY → const Keyword
TYPEDEF → const Keyword
values → const List<Keyword>
VAR → const Keyword
VOID → const Keyword
WHEN → const Keyword
WHILE → const Keyword
WITH → const Keyword
YIELD → const Keyword