ast

package
v0.0.0-...-bb9b6c8 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PosError

func PosError(n Node, format string, v ...any) error

Types

type Array

type Array struct {
	Array    []Node
	Position Position
}

func (Array) Pos

func (a Array) Pos() Position

type Assignment

type Assignment struct {
	Name     Ident
	Value    Node
	Position Position
}

func (Assignment) Pos

func (a Assignment) Pos() Position

type Bool

type Bool struct {
	Value    bool
	Position Position
}

func (Bool) Pos

func (b Bool) Pos() Position

type EndTag

type EndTag struct {
	Name     Ident
	Position Position
}

func (EndTag) Pos

func (et EndTag) Pos() Position

type Expr

type Expr struct {
	First    Node
	Operator Operator
	Rest     []Expr
	Position Position
}

func (Expr) Pos

func (e Expr) Pos() Position

type ExprTag

type ExprTag struct {
	Value       Node
	IgnoreError bool
	Position    Position
}

func (ExprTag) Pos

func (et ExprTag) Pos() Position

type FieldAccess

type FieldAccess struct {
	Value    Node
	Name     Ident
	Position Position
}

func (FieldAccess) Pos

func (fa FieldAccess) Pos() Position

type Float

type Float struct {
	Value    float64
	Position Position
}

func (Float) Pos

func (f Float) Pos() Position

type FuncCall

type FuncCall struct {
	Name     Ident
	Params   []Node
	Position Position
}

func (FuncCall) Pos

func (fc FuncCall) Pos() Position

type Ident

type Ident struct {
	Value    string
	Position Position
}

func (Ident) Pos

func (id Ident) Pos() Position

type Index

type Index struct {
	Value    Node
	Index    Node
	Position Position
}

func (Index) Pos

func (i Index) Pos() Position

type Integer

type Integer struct {
	Value    int64
	Position Position
}

func (Integer) Pos

func (i Integer) Pos() Position

type Map

type Map struct {
	Map      map[Node]Node
	Position Position
}

func (Map) Pos

func (m Map) Pos() Position

type MethodCall

type MethodCall struct {
	Value    Node
	Name     Ident
	Params   []Node
	Position Position
}

func (MethodCall) Pos

func (mc MethodCall) Pos() Position

type Node

type Node interface {
	Pos() Position
}

type Operator

type Operator struct {
	Value    string
	Position Position
}

func (Operator) Pos

func (op Operator) Pos() Position

type Position

type Position struct {
	Name string
	Line int
	Col  int
}

func (Position) String

func (p Position) String() string

type String

type String struct {
	Value    string
	Position Position
}

func (String) Pos

func (s String) Pos() Position

type Tag

type Tag struct {
	Name     Ident
	Params   []Node
	HasBody  bool
	Position Position
}

func (Tag) Pos

func (t Tag) Pos() Position

type Ternary

type Ternary struct {
	Condition Node
	IfTrue    Node
	Else      Node
	Position  Position
}

func (Ternary) Pos

func (t Ternary) Pos() Position

type Text

type Text struct {
	Data     []byte
	Position Position
}

func (Text) Pos

func (t Text) Pos() Position

type Value

type Value struct {
	Node
	Not bool
}

type VariableOr

type VariableOr struct {
	Variable Ident
	Or       Node
	Position Position
}

func (VariableOr) Pos

func (vo VariableOr) Pos() Position

Jump to

Keyboard shortcuts

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