comment

package
v0.0.0-...-8d342a7 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pretty

func Pretty(pretty bool) func(*Comment) error

func Size

func Size(size int) func(*Comment) error

Types

type Comment

type Comment struct {
	Buffer string

	Pretty bool
	// contains filtered or unexported fields
}

func (*Comment) AST

func (t *Comment) AST() *node32

func (*Comment) Add

func (t *Comment) Add(rule pegRule, begin, end, index uint32)

func (*Comment) Init

func (p *Comment) Init(options ...func(*Comment) error) error

func (*Comment) Parse

func (p *Comment) Parse(rule ...int) error

func (*Comment) PrettyPrintSyntaxTree

func (t *Comment) PrettyPrintSyntaxTree(buffer string)

func (*Comment) Print

func (t *Comment) Print()

func (*Comment) PrintSyntaxTree

func (p *Comment) PrintSyntaxTree()

func (*Comment) Reset

func (p *Comment) Reset()

func (*Comment) SprintSyntaxTree

func (p *Comment) SprintSyntaxTree() string

func (*Comment) Tokens

func (t *Comment) Tokens() []token32

func (*Comment) Trim

func (t *Comment) Trim(length uint32)

func (*Comment) WriteSyntaxTree

func (p *Comment) WriteSyntaxTree(w io.Writer)

type Def

type Def struct {
	Buffer     string
	Directives []Span
	Typedef    Span
}

func FromPath

func FromPath(path string) ([]Def, error)

TODO: i think this should be in the codegen package. (os stuff)

type Span

type Span struct {
	Node       *node32
	Begin, End uint32
}

func (*Span) Text

func (s *Span) Text(buffer string) string

Jump to

Keyboard shortcuts

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