MCPcopy
hub / github.com/uber-go/nilaway / IsEmptyExpr

Function IsEmptyExpr

util/asthelper/asthelper.go:190–197  ·  view source on GitHub ↗

IsEmptyExpr checks if an expression is the empty identifier

(expr ast.Expr)

Source from the content-addressed store, hash-verified

188
189// IsEmptyExpr checks if an expression is the empty identifier
190func IsEmptyExpr(expr ast.Expr) bool {
191 if id, ok := expr.(*ast.Ident); ok {
192 if id.Name == "_" {
193 return true
194 }
195 }
196 return false
197}
198
199// GetFieldVal returns the assigned value for the field at index. compElts holds the elements of the composite literal expression
200// for struct initialization

Callers 14

ParseExprAsProducerMethod · 0.92
parseExprFunction · 0.92
computeAndConsumeResultsFunction · 0.92
isErrorReturnNilFunction · 0.92
exprAsAssignmentConsumerFunction · 0.92
backpropAcrossAssignmentFunction · 0.92
backpropAcrossRangeFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected