RichCheckFromNode analyzes the passed `ast.Node` to see if it generates a rich check effect. If it does, that effect is returned along with the boolean true If it does not, then `nil, false` is returned.
(rootNode *RootAssertionNode, nonceGenerator *guard.NonceGenerator, node ast.Node)
| 251 | // If it does, that effect is returned along with the boolean true |
| 252 | // If it does not, then `nil, false` is returned. |
| 253 | func RichCheckFromNode(rootNode *RootAssertionNode, nonceGenerator *guard.NonceGenerator, node ast.Node) ([]RichCheckEffect, bool) { |
| 254 | var effects []RichCheckEffect |
| 255 | someEffects := false |
| 256 | if okReadEffects, ok := NodeTriggersOkRead(rootNode, nonceGenerator, node); ok { |
| 257 | effects, someEffects = append(effects, okReadEffects...), true |
| 258 | } |
| 259 | if funcEffects, ok := NodeTriggersFuncErrRet(rootNode, nonceGenerator, node); ok { |
| 260 | effects, someEffects = append(effects, funcEffects...), true |
| 261 | } |
| 262 | return effects, someEffects |
| 263 | } |
| 264 | |
| 265 | // parseExpr wraps a call to ParseExprAsProducer with two additional bits of useful handling: |
| 266 | // 1. check for the empty expression and return nil when passed it |
no test coverage detected