Addcontext
This file contains the code to propagate context, using the following node functions:
- ctx_right($node, $ctx)
-
Called when
$nodeappears in right-hand context$ctx.ctx_rightshould propagate the appropriate context to child nodes. - ctx_left($node, $other, $ctx)
-
Called when
$nodeappears as the lvalue in an expression whose rvalue is$other, and whose context is$ctx.$othermay beundefif the rvalue is not known, such as when$nodeis a member of a tuple to which an array is being assigned (e.g.($a, $node) = @some_things). If$otheris defined,ctx_leftshould call itsctx_rightmethod with the appropriate context. Otherwise, it should return the desired right context.
This file also defines the contexts for built-in increment, binary, and unary operators, and for "magic" things like guards and loop.