MCPcopy
hub / github.com/expr-lang/expr / derefInNeeded

Method derefInNeeded

compiler/compiler.go:1315–1323  ·  view source on GitHub ↗
(node ast.Node)

Source from the content-addressed store, hash-verified

1313}
1314
1315func (c *compiler) derefInNeeded(node ast.Node) {
1316 if node.Nature().Nil {
1317 return
1318 }
1319 switch node.Type().Kind() {
1320 case reflect.Ptr, reflect.Interface:
1321 c.emit(OpDeref)
1322 }
1323}
1324
1325func (c *compiler) derefParam(in reflect.Type, param ast.Node) {
1326 if param.Nature().Nil {

Callers 7

UnaryNodeMethod · 0.95
BinaryNodeMethod · 0.95
equalBinaryNodeMethod · 0.95
MemberNodeMethod · 0.95
SliceNodeMethod · 0.95
BuiltinNodeMethod · 0.95
ConditionalNodeMethod · 0.95

Calls 3

emitMethod · 0.95
NatureMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected