FunctionMatcher returns an ExprMatcher which will match NavigableExpr nodes of CallKind type whose function name is equal to `funcName`.
(funcName string)
| 84 | // FunctionMatcher returns an ExprMatcher which will match NavigableExpr nodes of CallKind type whose |
| 85 | // function name is equal to `funcName`. |
| 86 | func FunctionMatcher(funcName string) ExprMatcher { |
| 87 | return func(e NavigableExpr) bool { |
| 88 | if e.Kind() != CallKind { |
| 89 | return false |
| 90 | } |
| 91 | return e.AsCall().FunctionName() == funcName |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | // AllMatcher returns true for all descendants of a NavigableExpr, effectively flattening them into a list. |
| 96 | // |