PluralAndGenderVisitor class
A visitor to extract information from Intl.plural/gender sends. Note that this is a SimpleAstVisitor, so it doesn't automatically recurse. So this needs to be called where we expect a plural or gender immediately below.
- Inheritance
-
- Object
- SimpleAstVisitor
- PluralAndGenderVisitor
Constructors
- PluralAndGenderVisitor(List pieces, ComplexMessage? parent, MessageExtraction extraction)
Properties
- extraction → MessageExtraction
-
The message extraction in which we are running.
final
- foundPluralOrGender ↔ bool
-
This will be set to true if we find a plural or gender.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- parent → ComplexMessage?
-
A plural or gender always exists in the context of a parent message,
which could in turn also be a plural or gender.
final
- pieces ↔ List
-
The pieces of the message. We are given an initial version of this
from our parent and we add to it as we find additional information.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkValidity(
MethodInvocation? node) → String? - Returns a String describing why the node is invalid, or null if no reason is found, so it's presumed valid.
-
looksLikePluralOrGender(
Expression expression) → bool -
Return true if
node
matches the pattern for plural or gender message. -
messageFromMethodInvocation(
MethodInvocation node) → Message? -
Create a MainMessage from
node
using the name and parameters of the last function/method declaration we encountered and the parameters to the Intl.message call. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
visitAdjacentStrings(
AdjacentStrings node) → dynamic -
inherited
-
visitAnnotation(
Annotation node) → dynamic -
inherited
-
visitArgumentList(
ArgumentList node) → dynamic -
inherited
-
visitAsExpression(
AsExpression node) → dynamic -
inherited
-
visitAssertInitializer(
AssertInitializer node) → dynamic -
inherited
-
visitAssertStatement(
AssertStatement node) → dynamic -
inherited
-
visitAssignedVariablePattern(
AssignedVariablePattern node) → dynamic -
inherited
-
visitAssignmentExpression(
AssignmentExpression node) → dynamic -
inherited
-
visitAugmentationImportDirective(
AugmentationImportDirective node) → dynamic -
inherited
-
visitAwaitExpression(
AwaitExpression node) → dynamic -
inherited
-
visitBinaryExpression(
BinaryExpression node) → dynamic -
inherited
-
visitBlock(
Block node) → dynamic -
inherited
-
visitBlockFunctionBody(
BlockFunctionBody node) → dynamic -
inherited
-
visitBooleanLiteral(
BooleanLiteral node) → dynamic -
inherited
-
visitBreakStatement(
BreakStatement node) → dynamic -
inherited
-
visitCascadeExpression(
CascadeExpression node) → dynamic -
inherited
-
visitCaseClause(
CaseClause node) → dynamic -
inherited
-
visitCastPattern(
CastPattern node) → dynamic -
inherited
-
visitCatchClause(
CatchClause node) → dynamic -
inherited
-
visitCatchClauseParameter(
CatchClauseParameter node) → dynamic -
inherited
-
visitClassDeclaration(
ClassDeclaration node) → dynamic -
inherited
-
visitClassTypeAlias(
ClassTypeAlias node) → dynamic -
inherited
-
visitComment(
Comment node) → dynamic -
inherited
-
visitCommentReference(
CommentReference node) → dynamic -
inherited
-
visitCompilationUnit(
CompilationUnit node) → dynamic -
inherited
-
visitConditionalExpression(
ConditionalExpression node) → dynamic -
inherited
-
visitConfiguration(
Configuration node) → dynamic -
inherited
-
visitConstantPattern(
ConstantPattern node) → dynamic -
inherited
-
visitConstructorDeclaration(
ConstructorDeclaration node) → dynamic -
inherited
-
visitConstructorFieldInitializer(
ConstructorFieldInitializer node) → dynamic -
inherited
-
visitConstructorName(
ConstructorName node) → dynamic -
inherited
-
visitConstructorReference(
ConstructorReference node) → dynamic -
inherited
-
visitConstructorSelector(
ConstructorSelector node) → dynamic -
inherited
-
visitContinueStatement(
ContinueStatement node) → dynamic -
inherited
-
visitDeclaredIdentifier(
DeclaredIdentifier node) → dynamic -
inherited
-
visitDeclaredVariablePattern(
DeclaredVariablePattern node) → dynamic -
inherited
-
visitDefaultFormalParameter(
DefaultFormalParameter node) → dynamic -
inherited
-
visitDoStatement(
DoStatement node) → dynamic -
inherited
-
visitDottedName(
DottedName node) → dynamic -
inherited
-
visitDoubleLiteral(
DoubleLiteral node) → dynamic -
inherited
-
visitEmptyFunctionBody(
EmptyFunctionBody node) → dynamic -
inherited
-
visitEmptyStatement(
EmptyStatement node) → dynamic -
inherited
-
visitEnumConstantArguments(
EnumConstantArguments node) → dynamic -
inherited
-
visitEnumConstantDeclaration(
EnumConstantDeclaration node) → dynamic -
inherited
-
visitEnumDeclaration(
EnumDeclaration node) → dynamic -
inherited
-
visitExportDirective(
ExportDirective node) → dynamic -
inherited
-
visitExpressionFunctionBody(
ExpressionFunctionBody node) → dynamic -
inherited
-
visitExpressionStatement(
ExpressionStatement node) → dynamic -
inherited
-
visitExtendsClause(
ExtendsClause node) → dynamic -
inherited
-
visitExtensionDeclaration(
ExtensionDeclaration node) → dynamic -
inherited
-
visitExtensionOverride(
ExtensionOverride node) → dynamic -
inherited
-
visitFieldDeclaration(
FieldDeclaration node) → dynamic -
inherited
-
visitFieldFormalParameter(
FieldFormalParameter node) → dynamic -
inherited
-
visitForEachPartsWithDeclaration(
ForEachPartsWithDeclaration node) → dynamic -
inherited
-
visitForEachPartsWithIdentifier(
ForEachPartsWithIdentifier node) → dynamic -
inherited
-
visitForEachPartsWithPattern(
ForEachPartsWithPattern node) → dynamic -
inherited
-
visitForElement(
ForElement node) → dynamic -
inherited
-
visitFormalParameterList(
FormalParameterList node) → dynamic -
inherited
-
visitForPartsWithDeclarations(
ForPartsWithDeclarations node) → dynamic -
inherited
-
visitForPartsWithExpression(
ForPartsWithExpression node) → dynamic -
inherited
-
visitForPartsWithPattern(
ForPartsWithPattern node) → dynamic -
inherited
-
visitForStatement(
ForStatement node) → dynamic -
inherited
-
visitFunctionDeclaration(
FunctionDeclaration node) → dynamic -
inherited
-
visitFunctionDeclarationStatement(
FunctionDeclarationStatement node) → dynamic -
inherited
-
visitFunctionExpression(
FunctionExpression node) → dynamic -
inherited
-
visitFunctionExpressionInvocation(
FunctionExpressionInvocation node) → dynamic -
inherited
-
visitFunctionReference(
FunctionReference node) → dynamic -
inherited
-
visitFunctionTypeAlias(
FunctionTypeAlias node) → dynamic -
inherited
-
visitFunctionTypedFormalParameter(
FunctionTypedFormalParameter node) → dynamic -
inherited
-
visitGenericFunctionType(
GenericFunctionType node) → dynamic -
inherited
-
visitGenericTypeAlias(
GenericTypeAlias node) → dynamic -
inherited
-
visitGuardedPattern(
GuardedPattern node) → dynamic -
inherited
-
visitHideCombinator(
HideCombinator node) → dynamic -
inherited
-
visitIfElement(
IfElement node) → dynamic -
inherited
-
visitIfStatement(
IfStatement node) → dynamic -
inherited
-
visitImplementsClause(
ImplementsClause node) → dynamic -
inherited
-
visitImplicitCallReference(
ImplicitCallReference node) → dynamic -
inherited
-
visitImportDirective(
ImportDirective node) → dynamic -
inherited
-
visitImportPrefixReference(
ImportPrefixReference node) → dynamic -
inherited
-
visitIndexExpression(
IndexExpression node) → dynamic -
inherited
-
visitInstanceCreationExpression(
InstanceCreationExpression node) → dynamic -
inherited
-
visitIntegerLiteral(
IntegerLiteral node) → dynamic -
inherited
-
visitInterpolationExpression(
InterpolationExpression node) → dynamic -
override
-
visitInterpolationString(
InterpolationString node) → dynamic -
inherited
-
visitIsExpression(
IsExpression node) → dynamic -
inherited
-
visitLabel(
Label node) → dynamic -
inherited
-
visitLabeledStatement(
LabeledStatement node) → dynamic -
inherited
-
visitLibraryAugmentationDirective(
LibraryAugmentationDirective node) → dynamic -
inherited
-
visitLibraryDirective(
LibraryDirective node) → dynamic -
inherited
-
visitLibraryIdentifier(
LibraryIdentifier node) → dynamic -
inherited
-
visitListLiteral(
ListLiteral node) → dynamic -
inherited
-
visitListPattern(
ListPattern node) → dynamic -
inherited
-
visitLogicalAndPattern(
LogicalAndPattern node) → dynamic -
inherited
-
visitLogicalOrPattern(
LogicalOrPattern node) → dynamic -
inherited
-
visitMapLiteralEntry(
MapLiteralEntry node) → dynamic -
inherited
-
visitMapPattern(
MapPattern node) → dynamic -
inherited
-
visitMapPatternEntry(
MapPatternEntry node) → dynamic -
inherited
-
visitMethodDeclaration(
MethodDeclaration node) → dynamic -
inherited
-
visitMethodInvocation(
MethodInvocation node) → dynamic -
override
-
visitMixinDeclaration(
MixinDeclaration node) → dynamic -
inherited
-
visitNamedExpression(
NamedExpression node) → dynamic -
inherited
-
visitNamedType(
NamedType node) → dynamic -
inherited
-
visitNativeClause(
NativeClause node) → dynamic -
inherited
-
visitNativeFunctionBody(
NativeFunctionBody node) → dynamic -
inherited
-
visitNullAssertPattern(
NullAssertPattern node) → dynamic -
inherited
-
visitNullCheckPattern(
NullCheckPattern node) → dynamic -
inherited
-
visitNullLiteral(
NullLiteral node) → dynamic -
inherited
-
visitObjectPattern(
ObjectPattern node) → dynamic -
inherited
-
visitOnClause(
OnClause node) → dynamic -
inherited
-
visitParenthesizedExpression(
ParenthesizedExpression node) → dynamic -
inherited
-
visitParenthesizedPattern(
ParenthesizedPattern node) → dynamic -
inherited
-
visitPartDirective(
PartDirective node) → dynamic -
inherited
-
visitPartOfDirective(
PartOfDirective node) → dynamic -
inherited
-
visitPatternAssignment(
PatternAssignment node) → dynamic -
inherited
-
visitPatternField(
PatternField node) → dynamic -
inherited
-
visitPatternFieldName(
PatternFieldName node) → dynamic -
inherited
-
visitPatternVariableDeclaration(
PatternVariableDeclaration node) → dynamic -
inherited
-
visitPatternVariableDeclarationStatement(
PatternVariableDeclarationStatement node) → dynamic -
inherited
-
visitPostfixExpression(
PostfixExpression node) → dynamic -
inherited
-
visitPrefixedIdentifier(
PrefixedIdentifier node) → dynamic -
inherited
-
visitPrefixExpression(
PrefixExpression node) → dynamic -
inherited
-
visitPropertyAccess(
PropertyAccess node) → dynamic -
inherited
-
visitRecordLiteral(
RecordLiteral node) → dynamic -
inherited
-
visitRecordPattern(
RecordPattern node) → dynamic -
inherited
-
visitRecordTypeAnnotation(
RecordTypeAnnotation node) → dynamic -
inherited
-
visitRecordTypeAnnotationNamedField(
RecordTypeAnnotationNamedField node) → dynamic -
inherited
-
visitRecordTypeAnnotationNamedFields(
RecordTypeAnnotationNamedFields node) → dynamic -
inherited
-
visitRecordTypeAnnotationPositionalField(
RecordTypeAnnotationPositionalField node) → dynamic -
inherited
-
visitRedirectingConstructorInvocation(
RedirectingConstructorInvocation node) → dynamic -
inherited
-
visitRelationalPattern(
RelationalPattern node) → dynamic -
inherited
-
visitRestPatternElement(
RestPatternElement node) → dynamic -
inherited
-
visitRethrowExpression(
RethrowExpression node) → dynamic -
inherited
-
visitReturnStatement(
ReturnStatement node) → dynamic -
inherited
-
visitScriptTag(
ScriptTag node) → dynamic -
inherited
-
visitSetOrMapLiteral(
SetOrMapLiteral node) → dynamic -
inherited
-
visitShowCombinator(
ShowCombinator node) → dynamic -
inherited
-
visitSimpleFormalParameter(
SimpleFormalParameter node) → dynamic -
inherited
-
visitSimpleIdentifier(
SimpleIdentifier node) → dynamic -
inherited
-
visitSimpleStringLiteral(
SimpleStringLiteral node) → dynamic -
inherited
-
visitSpreadElement(
SpreadElement node) → dynamic -
inherited
-
visitStringInterpolation(
StringInterpolation node) → dynamic -
inherited
-
visitSuperConstructorInvocation(
SuperConstructorInvocation node) → dynamic -
inherited
-
visitSuperExpression(
SuperExpression node) → dynamic -
inherited
-
visitSuperFormalParameter(
SuperFormalParameter node) → dynamic -
inherited
-
visitSwitchCase(
SwitchCase node) → dynamic -
inherited
-
visitSwitchDefault(
SwitchDefault node) → dynamic -
inherited
-
visitSwitchExpression(
SwitchExpression node) → dynamic -
inherited
-
visitSwitchExpressionCase(
SwitchExpressionCase node) → dynamic -
inherited
-
visitSwitchPatternCase(
SwitchPatternCase node) → dynamic -
inherited
-
visitSwitchStatement(
SwitchStatement node) → dynamic -
inherited
-
visitSymbolLiteral(
SymbolLiteral node) → dynamic -
inherited
-
visitThisExpression(
ThisExpression node) → dynamic -
inherited
-
visitThrowExpression(
ThrowExpression node) → dynamic -
inherited
-
visitTopLevelVariableDeclaration(
TopLevelVariableDeclaration node) → dynamic -
inherited
-
visitTryStatement(
TryStatement node) → dynamic -
inherited
-
visitTypeArgumentList(
TypeArgumentList node) → dynamic -
inherited
-
visitTypeLiteral(
TypeLiteral node) → dynamic -
inherited
-
visitTypeParameter(
TypeParameter node) → dynamic -
inherited
-
visitTypeParameterList(
TypeParameterList node) → dynamic -
inherited
-
visitVariableDeclaration(
VariableDeclaration node) → dynamic -
inherited
-
visitVariableDeclarationList(
VariableDeclarationList node) → dynamic -
inherited
-
visitVariableDeclarationStatement(
VariableDeclarationStatement node) → dynamic -
inherited
-
visitWhenClause(
WhenClause node) → dynamic -
inherited
-
visitWhileStatement(
WhileStatement node) → dynamic -
inherited
-
visitWildcardPattern(
WildcardPattern node) → dynamic -
inherited
-
visitWithClause(
WithClause node) → dynamic -
inherited
-
visitYieldStatement(
YieldStatement node) → dynamic -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited