Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefineExpr ¶
func DefineExpr(ctx *context.Ctx) ([]*definition.Definition, error)
Types ¶
type ClassConstantProvider ¶
type ClassConstantProvider struct{}
ClassConstantProvider resolves the definition of a class constant, Foo::BAR.
func NewClassConstant ¶
func NewClassConstant() *ClassConstantProvider
func (*ClassConstantProvider) Define ¶
func (p *ClassConstantProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
type CommentsProvider ¶
type CommentsProvider struct{}
func NewComments ¶
func NewComments() *CommentsProvider
func (*CommentsProvider) Define ¶
func (p *CommentsProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
type ConstantProvider ¶
type ConstantProvider struct{}
ConstantProvider resolves the definition of constant fetches.
func NewConstant ¶
func NewConstant() *ConstantProvider
func (*ConstantProvider) Define ¶
func (c *ConstantProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
TODO: return non-array.
type FunctionProvider ¶
type FunctionProvider struct{}
FunctionProvider resolves the definition of a function call. It first looks for it in the current scope (a local function declaration). if it can't find it, the function will be looked for in the global scope.
func NewFunction ¶
func NewFunction() *FunctionProvider
func (*FunctionProvider) Define ¶
func (p *FunctionProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
type MethodProvider ¶
type MethodProvider struct{}
MethodProvider resolves the definition of a method call. $this->test(), $this->test->test(), $foo->bar() etc. for example.
func NewMethod ¶
func NewMethod() *MethodProvider
func (*MethodProvider) Define ¶
func (p *MethodProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
type NameProvider ¶
type NameProvider struct{}
NameProvider resolves the definition of a class-like name. This defines the name part of 'new Name()', 'Name::method()', 'extends Name' etc.
func NewName ¶
func NewName() *NameProvider
func (*NameProvider) Define ¶
func (p *NameProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
TODO: use DefineExpr.
type PropertyProvider ¶
type PropertyProvider struct{}
PropertyProvider resolves the definition of a property accessed like $a->property. Where $a can also be $this, $a->foo->bar()->property etc.
func NewProperty ¶
func NewProperty() *PropertyProvider
func (*PropertyProvider) Define ¶
func (p *PropertyProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
type StaticProvider ¶
type StaticProvider struct{}
StaticProvider provides definitions for static method calls like Foo::bar().
func NewStatic ¶
func NewStatic() *StaticProvider
func (*StaticProvider) Define ¶
func (p *StaticProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
type ThisProvider ¶
type ThisProvider struct{}
ThisProvider resolves the definition of the current class scope for '$this' variables.
func NewThis ¶
func NewThis() *ThisProvider
func (*ThisProvider) Define ¶
func (p *ThisProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
TODO: use DefineExpr. TODO: merge with variable provider.
type UseProvider ¶
type UseProvider struct{}
UseProvider resolves the definition of 'use Foo/Bar/FooBar' statements. It is a separate provider than the NameProvider because the NameProvider will resolve any alias, in this case we want the source of the alias instead.
func NewUse ¶
func NewUse() *UseProvider
func (*UseProvider) Define ¶
func (p *UseProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
type VariableProvider ¶
type VariableProvider struct{}
VariableProvider resolves the definition of a simple variable. It looks for it being assigned, as a parameter, or a global.
func NewVariable ¶
func NewVariable() *VariableProvider
func (*VariableProvider) Define ¶
func (p *VariableProvider) Define(ctx *context.Ctx) ([]*definition.Definition, error)
TODO: use DefineExpr.