parser

package
v0.0.0-...-b74dff7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindMargoNode = ast.NewNodeKind("MargoNode")

Functions

func BlockParser

func BlockParser() parser.BlockParser

Types

type ComponentNode

type ComponentNode struct {
	Name string
	// contains filtered or unexported fields
}

func (*ComponentNode) Attributes

func (n *ComponentNode) Attributes() []ast.Attribute

func (*ComponentNode) Children

func (n *ComponentNode) Children() []Node

type Document

type Document struct {
	ast.BaseBlock
	Children []Node
}

func (*Document) Dump

func (n *Document) Dump(source []byte, level int)

Dump implements Node.Dump

func (*Document) Kind

func (n *Document) Kind() ast.NodeKind

Kind implements Node.Kind.

type Node

type Node interface {
	Children() []Node
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewMargoParser

func NewMargoParser(content string) *Parser

func (*Parser) Parse

func (p *Parser) Parse() ([]Node, error)

type Props

type Props map[string]any

type TextNode

type TextNode struct {
	Value string
}

func (*TextNode) Children

func (t *TextNode) Children() []Node

Jump to

Keyboard shortcuts

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