메소드 | 설명 | |
---|---|---|
__construct ( |
||
__construct ( |
||
visit ( ast\Node $node ) : |
For non-special nodes, we propagate the context and scope from the parent, through the children and return the modified scope | |
visitBranchedContext ( ast\Node $node ) : |
For nodes that are the root of mutually exclusive child nodes (if, try), we analyze each child in the parent context and then merge them together to try to guess what happens after the branching finishes. | |
visitCatchList ( ast\Node $node ) : |
||
visitClass ( ast\Node\Decl $node ) : |
||
visitClosedContext ( ast\Node $node ) : |
For 'closed context' items (classes, methods, functions, closures), we analyze children in the parent context, but then return the parent context itself unmodified by the children. | |
visitClosure ( ast\Node\Decl $node ) : |
||
visitFuncDecl ( ast\Node\Decl $node ) : |
||
visitIf ( ast\Node $node ) : |
||
visitIfElem ( ast\Node $node ) : |
||
visitMethod ( ast\Node\Decl $node ) : |
||
visitTry ( ast\Node $node ) : |
public __construct ( |
||
$code_base | The code base within which we're operating | |
$context | The context of the parser at the node for which we'd like to determine a type | |
$parent_node | ast\Node | The parent of the node being analyzed |
$depth | integer | The depth of the node being analyzed in the AST |
public __construct ( |
||
$code_base | The code base within which we're operating | |
$context | The context of the parser at the node for which we'd like to determine a type | |
$parent_node | ast\Node | The parent of the node being analyzed |
$depth | integer | The depth of the node being analyzed in the AST |
public visit ( ast\Node $node ) : |
||
$node | ast\Node | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitBranchedContext ( ast\Node $node ) : |
||
$node | ast\Node | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitCatchList ( ast\Node $node ) : |
||
$node | ast\Node | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitClass ( ast\Node\Decl $node ) : |
||
$node | ast\Node\Decl | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitClosedContext ( ast\Node $node ) : |
||
$node | ast\Node | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitClosure ( ast\Node\Decl $node ) : |
||
$node | ast\Node\Decl | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitFuncDecl ( ast\Node\Decl $node ) : |
||
$node | ast\Node\Decl | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitIf ( ast\Node $node ) : |
||
$node | ast\Node | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitIfElem ( ast\Node $node ) : |
||
$node | ast\Node | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitMethod ( ast\Node\Decl $node ) : |
||
$node | ast\Node\Decl | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |
public visitTry ( ast\Node $node ) : |
||
$node | ast\Node | An AST node we'd like to determine the UnionType for |
리턴 | The updated context after visiting the node |