ast

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attr

type Attr interface {
	Node
	// contains filtered or unexported methods
}

type BoolValue

type BoolValue struct {
	Value bool
}

func (*BoolValue) String

func (b *BoolValue) String() string

func (*BoolValue) Visit added in v0.0.2

func (b *BoolValue) Visit(v Visitor)

type Comment added in v0.0.3

type Comment struct {
	Value string
}

func (*Comment) String added in v0.0.3

func (c *Comment) String() string

func (*Comment) Visit added in v0.0.3

func (c *Comment) Visit(v Visitor)

type Element

type Element struct {
	Name        string
	Attrs       []Attr
	Children    []Fragment
	SelfClosing bool
}

func (*Element) String

func (e *Element) String() string

func (*Element) Type

func (e *Element) Type() string

func (*Element) Visit added in v0.0.2

func (e *Element) Visit(v Visitor)

type Expr

type Expr struct {
	Fragments []Fragment
}

func (*Expr) String

func (e *Expr) String() string

func (*Expr) Visit added in v0.0.2

func (e *Expr) Visit(v Visitor)

type Field

type Field struct {
	Name  string
	Value Value
}

func (*Field) String

func (f *Field) String() string

func (*Field) Visit added in v0.0.2

func (f *Field) Visit(v Visitor)

type Fragment

type Fragment interface {
	Node
	// contains filtered or unexported methods
}

type Node

type Node interface {
	String() string
	Visit(Visitor)
}

type Script

type Script struct {
	Body []Fragment
}

func (*Script) String

func (s *Script) String() string

func (*Script) Visit added in v0.0.2

func (s *Script) Visit(v Visitor)

type StringValue

type StringValue struct {
	Value string
	Raw   string
}

func (*StringValue) String

func (s *StringValue) String() string

func (*StringValue) Visit added in v0.0.2

func (s *StringValue) Visit(v Visitor)

type Text

type Text struct {
	Value string
}

func (*Text) String

func (r *Text) String() string

func (*Text) Visit added in v0.0.2

func (r *Text) Visit(v Visitor)

type Value

type Value interface {
	Node
	// contains filtered or unexported methods
}

type Visitor added in v0.0.2

type Visitor interface {
	VisitScript(*Script)
	VisitText(*Text)
	VisitField(*Field)
	VisitStringValue(*StringValue)
	VisitExpr(*Expr)
	VisitBoolValue(*BoolValue)
	VisitElement(*Element)
	VisitComment(*Comment)
}

Jump to

Keyboard shortcuts

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