shouldWrapParenthesisBeforeAnd property
bool
get
shouldWrapParenthesisBeforeAnd
Whether this Expression should be wrapped with parentheses when we want
to use it as operand of a logical and-expression.
Implementation
bool get shouldWrapParenthesisBeforeAnd {
final self = this;
if (self is! BinaryExpression) {
return false;
}
final precedence = self.operator.type.precedence;
return precedence < TokenClass.LOGICAL_AND_OPERATOR.precedence;
}