PHP 클래스 Phan\BlockAnalysisVisitor

상속: extends Phan\AST\AnalysisVisitor
파일 보기 프로젝트 열기: etsy/phan

공개 메소드들

메소드 설명
__construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
__construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
visit ( ast\Node $node ) : Context 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 ) : Context 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 ) : Context
visitClass ( ast\Node\Decl $node ) : Context
visitClosedContext ( ast\Node $node ) : Context 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 ) : Context
visitFuncDecl ( ast\Node\Decl $node ) : Context
visitIf ( ast\Node $node ) : Context
visitIfElem ( ast\Node $node ) : Context
visitMethod ( ast\Node\Decl $node ) : Context
visitTry ( ast\Node $node ) : Context

메소드 상세

__construct() 공개 메소드

public __construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
$code_base CodeBase The code base within which we're operating
$context Phan\Language\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

__construct() 공개 메소드

public __construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
$code_base CodeBase The code base within which we're operating
$context Phan\Language\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

visit() 공개 메소드

│ ▼ ┌──● │ ●──●──● │ ●──┘ │ ▼
public visit ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitBranchedContext() 공개 메소드

│ ▼ ┌──●──┐ │ │ │ ● ● ● │ │ │ └──●──┘ │ ▼
public visitBranchedContext ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitCatchList() 공개 메소드

public visitCatchList ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitClass() 공개 메소드

public visitClass ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitClosedContext() 공개 메소드

│ ▼ ┌──●────┐ │ │ ●──●──● │ ┌────┘ ● │ ▼
public visitClosedContext ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitClosure() 공개 메소드

public visitClosure ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitFuncDecl() 공개 메소드

public visitFuncDecl ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitIf() 공개 메소드

public visitIf ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitIfElem() 공개 메소드

public visitIfElem ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitMethod() 공개 메소드

public visitMethod ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node

visitTry() 공개 메소드

public visitTry ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
리턴 Phan\Language\Context The updated context after visiting the node