/** @var associative-array<int,Closure(Node):void> maps values of ast\Node->kind to closures that can be used to generate annotations (on the ast\Node instance) for that node kind */
privatestatic$closures_for_kind;
/**
* Initialize the map of kinds to closures that add annotations to the corresponding node kind.
* This is called when the class is loaded.
*/
publicstaticfunctioninit():void
{
if(\is_array(self::$closures_for_kind)){
return;
}
self::initInner();
}
publicconstFLAGS_NODE_TYPE_SET=[
ast\AST_VAR=>true,
ast\AST_DIM=>true,
ast\AST_PROP=>true,
ast\AST_STATIC_PROP=>true,
ast\AST_ASSIGN=>true,
ast\AST_ASSIGN_REF=>true,
];
/**
* @param array<mixed,?(Node|string|float|int)> $children (should all be Nodes or null)