phpdoc

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPHPDoc

func IsPHPDoc(doc string) bool

IsPHPDoc checks if the string is a doc comment

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL