doxygen

package
v0.0.0-...-e0b5cce Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Lexer = lexer.Must(stateful.New(stateful.Rules{
		"Root": {
			{"Func", `(@|\\)\w+`, nil},
			{"Text", `[^\s]+`, nil},
			{"Newline", `\n`, nil},
			{"whitespace", `\s+`, nil},
		},
	}))
	Parser = participle.MustBuild(
		&CommentBlock{},
		participle.Lexer(Lexer),
	)
)

Functions

This section is empty.

Types

type Command

type Command struct {
	Pos   lexer.Position
	Func  *Func  `parser:"@@"`
	Words []Word `parser:"@@*"`
}

type Comment

type Comment struct {
	Pos     lexer.Position
	Doc     *Doc     `parser:"( @@"`
	Command *Command `parser:"| @@"`
	Newline *string  `parser:"| @Newline )"`
}

type CommentBlock

type CommentBlock struct {
	Pos      lexer.Position
	Comments []Comment `parser:"@@*"`
}

type Doc

type Doc struct {
	Pos   lexer.Position
	Words []Word `parser:"@@+"`
}

type ErrAtToken

type ErrAtToken struct {
	Pos     lexer.Position
	Message string
}

func (ErrAtToken) Error

func (e ErrAtToken) Error() string

type Func

type Func struct {
	Pos  lexer.Position
	Name string `parser:"@Func"`
}

type Group

type Group struct {
	Doc    string
	Params []Param
	Return Return
}

func Parse

func Parse(r io.Reader) (*Group, error)

func (*Group) AddCommand

func (g *Group) AddCommand(fun *Func, words []string) error

type Param

type Param struct {
	Name        string
	Description string
}

type Return

type Return struct {
	Description string
}

type Word

type Word struct {
	Pos  lexer.Position
	Text string `parser:"@Text"`
}

Jump to

Keyboard shortcuts

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