ast

package
v0.0.0-...-84c8e1d Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name  string
	Nodes []Node

	Args    []string
	Imports []string
}

type MixinArg

type MixinArg struct {
	Name string
	Type string
}

type Node

type Node interface {
	Position() lexer.Location
}

type NodeComment

type NodeComment struct {
	Pos

	Text string
}

type NodeDoctype

type NodeDoctype struct {
	Pos

	Value string
}

type NodeGoBlock

type NodeGoBlock struct {
	Pos

	Contents string
}

type NodeGoStatement

type NodeGoStatement struct {
	Pos

	Keyword StatementKeyword
	Nodes   []Node

	Argument string
	HasElse  bool
}

type NodeInclude

type NodeInclude struct {
	Pos

	File *File
	Path string
}

type NodeMixinCall

type NodeMixinCall struct {
	Pos

	Name string
	Args []string
}

type NodeMixinDef

type NodeMixinDef struct {
	Pos

	Name  string
	Args  []MixinArg
	Nodes []Node
}

type NodeTag

type NodeTag struct {
	Pos

	Name       string
	Attributes []TagAttribute
	Nodes      []Node

	IsSelfClosing bool
}

type NodeText

type NodeText struct {
	Pos

	Text Value
}

type Pos

type Pos lexer.Location

func (Pos) Position

func (p Pos) Position() lexer.Location

type StatementKeyword

type StatementKeyword string
const (
	KeywordIf   StatementKeyword = "if"
	KeywordElse StatementKeyword = "else"
	KeywordFor  StatementKeyword = "for"
)

type TagAttribute

type TagAttribute struct {
	Pos

	Name  string
	Value Value

	// Only add this attribute if this Go expression evaluates to true
	Condition string
}

type Value

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

type ValueConcat

type ValueConcat struct {
	Pos
	A, B Value
}

type ValueGoExpr

type ValueGoExpr struct {
	Pos
	Contents   string
	EscapeHTML bool
}

type ValueLiteral

type ValueLiteral struct {
	Pos
	Contents string
}

Jump to

Keyboard shortcuts

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