PHP Class Phan\Parse\ParseVisitor

Inheritance: extends Phan\Analysis\ScopeVisitor
Show file Open project: etsy/phan

Public Methods

Method Description
__construct ( CodeBase $code_base, Context $context )
visitCall ( ast\Node $node ) : Context Visit a node with kind \ast\AST_CALL
visitClass ( ast\Node\Decl $node ) : Context Visit a node with kind \ast\AST_CLASS
visitClassConstDecl ( ast\Node $node ) : Context Visit a node with kind \ast\AST_CLASS_CONST_DECL
visitConstDecl ( ast\Node $node ) : Context Visit a node with kind \ast\AST_CONST
visitDeclare ( ast\Node $node ) : Context Visit a node with kind \ast\AST_DECLARE
visitEcho ( ast\Node $node ) : Context Visit a node with kind \ast\AST_ECHO
visitFuncDecl ( ast\Node\Decl $node ) : Context Visit a node with kind \ast\AST_FUNC_DECL
visitMethod ( ast\Node\Decl $node ) : Context Visit a node with kind \ast\AST_METHOD
visitMethodCall ( ast\Node $node ) : Context Visit a node with kind \ast\AST_METHOD_CALL
visitPrint ( ast\Node $node ) : Context Visit a node with kind \ast\AST_PRINT
visitPropDecl ( ast\Node $node ) : Context Visit a node with kind \ast\AST_PROP_DECL
visitReturn ( ast\Node $node ) : Context Visit a node with kind \ast\AST_RETURN
visitStaticCall ( ast\Node $node ) : Context Visit a node with kind \ast\AST_STATIC_CALL
visitUseTrait ( ast\Node $node ) : Context Visit a node with kind \ast\AST_USE_TRAIT

Private Methods

Method Description
addConstant ( ast\Node $node, string $name, ast\Node | mixed $value, integer $flags ) : void
getContextClass ( ) : Clazz

Method Details

__construct() public method

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

visitCall() public method

Visit a node with kind \ast\AST_CALL
public visitCall ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitClass() public method

Visit a node with kind \ast\AST_CLASS
public visitClass ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitClassConstDecl() public method

Visit a node with kind \ast\AST_CLASS_CONST_DECL
public visitClassConstDecl ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitConstDecl() public method

Visit a node with kind \ast\AST_CONST
public visitConstDecl ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitDeclare() public method

Visit a node with kind \ast\AST_DECLARE
public visitDeclare ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitEcho() public method

Visit a node with kind \ast\AST_ECHO
public visitEcho ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitFuncDecl() public method

Visit a node with kind \ast\AST_FUNC_DECL
public visitFuncDecl ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitMethod() public method

Visit a node with kind \ast\AST_METHOD
public visitMethod ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitMethodCall() public method

Visit a node with kind \ast\AST_METHOD_CALL
public visitMethodCall ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitPrint() public method

Visit a node with kind \ast\AST_PRINT
public visitPrint ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitPropDecl() public method

Visit a node with kind \ast\AST_PROP_DECL
public visitPropDecl ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitReturn() public method

Visit a node with kind \ast\AST_RETURN
public visitReturn ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitStaticCall() public method

Visit a node with kind \ast\AST_STATIC_CALL
public visitStaticCall ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitUseTrait() public method

Visit a node with kind \ast\AST_USE_TRAIT
public visitUseTrait ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node