PHP Класс Phan\Analysis\PreOrderAnalysisVisitor

Наследование: extends ScopeVisitor
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( CodeBase $code_base, Context $context )
analyzeFunctionLikeIsGenerator ( ast\Node $node ) : boolean
analyzeNodeHasYield ( ast\Node $node )
visit ( ast\Node $node ) : Context
visitCall ( ast\Node $node ) : Context
visitCatch ( ast\Node $node ) : Context
visitClass ( ast\Node\Decl $node ) : Context Visit a node with kind \ast\AST_CLASS
visitClosure ( ast\Node\Decl $node ) : Context Visit a node with kind \ast\AST_CLOSURE
visitForeach ( ast\Node $node ) : Context
visitFuncDecl ( ast\Node\Decl $node ) : Context Visit a node with kind \ast\AST_FUNC_DECL
visitIfElem ( ast\Node $node ) : Context
visitMethod ( ast\Node\Decl $node ) : Context Visit a node with kind \ast\AST_METHOD

Приватные методы

Метод Описание
getContextClass ( ) : Clazz
setReturnTypeOfGenerator ( Phan\Language\Element\FunctionInterface $func, ast\Node $node ) : void The return type of the given FunctionInterface to a Generator.

Описание методов

__construct() публичный Метод

public __construct ( CodeBase $code_base, Context $context )
$code_base Phan\CodeBase
$context Phan\Language\Context The context of the parser at the node for which we'd like to determine a type

analyzeFunctionLikeIsGenerator() публичный статический Метод

public static analyzeFunctionLikeIsGenerator ( ast\Node $node ) : boolean
$node ast\Node A node to parse This must be called before visitReturn is called within a function.
Результат boolean A new or an unchanged context resulting from parsing the node

analyzeNodeHasYield() публичный статический Метод

public static analyzeNodeHasYield ( ast\Node $node )
$node ast\Node

visit() публичный Метод

public visit ( ast\Node $node ) : Context
$node ast\Node
Результат Phan\Language\Context

visitCall() публичный Метод

public visitCall ( ast\Node $node ) : Context
$node ast\Node A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitCatch() публичный Метод

public visitCatch ( ast\Node $node ) : Context
$node ast\Node A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitClass() публичный Метод

Visit a node with kind \ast\AST_CLASS
public visitClass ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitClosure() публичный Метод

Visit a node with kind \ast\AST_CLOSURE
public visitClosure ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitForeach() публичный Метод

public visitForeach ( ast\Node $node ) : Context
$node ast\Node A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitFuncDecl() публичный Метод

Visit a node with kind \ast\AST_FUNC_DECL
public visitFuncDecl ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitIfElem() публичный Метод

public visitIfElem ( ast\Node $node ) : Context
$node ast\Node A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitMethod() публичный Метод

Visit a node with kind \ast\AST_METHOD
public visitMethod ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node