PatternPrecedence class
Opaque representation of pattern precedence.
DartPattern classes return an instance of this class. This allows clients to determine when parentheses are needed (by comparing precedence values).
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator <(
PatternPrecedence other) → bool -
Returns
true
if this precedence represents a looser binding thanother
; that is, parsing ambiguities will be resolved in favor of nesting the pattern having precedenceother
within the pattern having precedencethis
. -
operator <=(
PatternPrecedence other) → bool -
Returns
true
if this precedence represents a looser, or equal, binding thanother
; that is, parsing ambiguities will be resolved in favor of nesting the pattern having precedenceother
within the pattern having precedencethis
, or, if the precedences are equal, parsing ambiguities will be resolved according to the associativity of the pattern precedence. -
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >(
PatternPrecedence other) → bool -
Returns
true
if this precedence represents a tighter binding thanother
; that is, parsing ambiguities will be resolved in favor of nesting the pattern having precedencethis
within the pattern having precedenceother
. -
operator >=(
PatternPrecedence other) → bool -
Returns
true
if this precedence represents a tighter, or equal, binding thanother
; that is, parsing ambiguities will be resolved in favor of nesting the pattern having precedencethis
within the pattern having precedenceother
, or, if the precedences are equal, parsing ambiguities will be resolved according to the associativity of the pattern precedence.
Constants
- logicalAnd → const PatternPrecedence
- logicalOr → const PatternPrecedence
- postfix → const PatternPrecedence
- primary → const PatternPrecedence
- relational → const PatternPrecedence