isAssignmentExpression checks if an expression is an assignment (=, ??=, &&=, ||=).
(node *ast.Node)
| 129 | } else if tp.StreamType(t) == nil { |
| 130 | return nil |
| 131 | } |
| 132 | |
| 133 | // Determine if this is strictly an Effect or an Effect-able type |
| 134 | isStrict := tp.StrictIsEffectType(t) |
| 135 | return &floatingEffectResult{ |
| 136 | isStrict: isStrict, |
| 137 | exprType: t, |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | // isAssignmentExpression checks if an expression is an assignment (=, ??=, &&=, ||=). |
| 142 | func isAssignmentExpression(node *ast.Node) bool { |
| 143 | if node == nil || node.Kind != ast.KindBinaryExpression { |
| 144 | return false |
| 145 | } |
| 146 | |
| 147 | binExpr := node.AsBinaryExpression() |
| 148 | if binExpr == nil || binExpr.OperatorToken == nil { |
| 149 | return false |
| 150 | } |
| 151 | |
| 152 | switch binExpr.OperatorToken.Kind { |
| 153 | case ast.KindEqualsToken, |
no outgoing calls
no test coverage detected