Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommentPart ¶
type CommentPart struct {
Line int // Comment part location inside phpdoc comment
Name string // e.g. "param" for "* @param something bla-bla-bla"
Params []string // {"something", "bla-bla-bla"} in example above
ParamsText string // "something bla-bla-bla" in example above
}
func Parse ¶
func Parse(doc string) (res []CommentPart)
Parse returns parsed doc comment with interesting parts (ones that start "* @")
func (*CommentPart) ContainsParam ¶
func (part *CommentPart) ContainsParam(name string) bool
ContainsParam reports whether comment part contains param of specified name.
type InterType ¶ added in v0.2.0
type InterType struct{ X, Y TypeExpr }
InterType is `x&y` type. Intersection type requires a type to "implement" both X and Y.
type NamedType ¶ added in v0.2.0
type NamedType struct{ Name string }
NamedType is a type that is identified by its name.
type NullableType ¶ added in v0.2.0
type NullableType struct{ Expr TypeExpr }
NullableType is `?expr` type.
func (*NullableType) String ¶ added in v0.2.0
func (typ *NullableType) String() string
type TypeExpr ¶ added in v0.2.0
type TypeExpr interface {
// String returns a textual representation of a type.
String() string
// contains filtered or unexported methods
}
TypeExpr is an arbitrary type expression.
type TypeParser ¶ added in v0.2.0
type TypeParser struct {
// contains filtered or unexported fields
}
TypeParser handles phpdoc type expressions parsing.
See https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#abnf
Click to show internal directories.
Click to hide internal directories.