ast

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 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 Attribute

type Attribute struct {
	Name      string
	Arguments []AttributeArg
	SpanRange Span
}

func (*Attribute) Span

func (n *Attribute) Span() Span

type AttributeArg

type AttributeArg struct {
	Name  string
	Value Value
}

type ConstructorDecl

type ConstructorDecl struct {
	Attrs     []*Attribute
	Params    []Param
	Result    TypeExpr
	SpanRange Span
}

func (*ConstructorDecl) Span

func (n *ConstructorDecl) Span() Span

type Decl

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

type EnumDecl

type EnumDecl struct {
	Attrs     []*Attribute
	Name      Name
	Cases     []Name
	SpanRange Span
}

func (*EnumDecl) Span

func (n *EnumDecl) Span() Span

type ExportDecl

type ExportDecl struct {
	Attrs      []*Attribute
	ExternalID *Name
	Name       Name
	Extern     ExternType
	SpanRange  Span
}

func (*ExportDecl) Span

func (n *ExportDecl) Span() Span

type ExternPath

type ExternPath struct {
	Path      Path
	SpanRange Span
}

func (*ExternPath) Span

func (n *ExternPath) Span() Span

type ExternType

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

type Field

type Field struct {
	Name      Name
	Type      TypeExpr
	SpanRange Span
}

type File

type File struct {
	Package *PackageDecl
	Uses    []*UseDecl
	Decls   []Decl
}

func (*File) Span

func (n *File) Span() Span

type FlagsDecl

type FlagsDecl struct {
	Attrs     []*Attribute
	Name      Name
	Flags     []Name
	SpanRange Span
}

func (*FlagsDecl) Span

func (n *FlagsDecl) Span() Span

type FuncDecl

type FuncDecl struct {
	Attrs     []*Attribute
	Name      Name
	Params    []Param
	Result    TypeExpr
	Async     bool
	Static    bool
	SpanRange Span
}

func (*FuncDecl) Span

func (n *FuncDecl) Span() Span

type FuncType

type FuncType struct {
	Func      *FuncDecl
	SpanRange Span
}

func (*FuncType) Span

func (n *FuncType) Span() Span

type GenericType

type GenericType struct {
	Name      string
	Args      []TypeExpr
	SpanRange Span
}

func (*GenericType) Span

func (n *GenericType) Span() Span

type ImportDecl

type ImportDecl struct {
	Attrs      []*Attribute
	ExternalID *Name
	Name       Name
	Extern     ExternType
	SpanRange  Span
}

func (*ImportDecl) Span

func (n *ImportDecl) Span() Span

type IncludeDecl

type IncludeDecl struct {
	Attrs     []*Attribute
	Path      Path
	Renames   []IncludeName
	SpanRange Span
}

func (*IncludeDecl) Span

func (n *IncludeDecl) Span() Span

type IncludeName

type IncludeName struct {
	From Name
	To   Name
}

type InlineInterface

type InlineInterface struct {
	Items     []InterfaceItem
	SpanRange Span
}

func (*InlineInterface) Span

func (n *InlineInterface) Span() Span

type IntValue

type IntValue struct {
	Value     string
	SpanRange Span
}

func (*IntValue) Span

func (n *IntValue) Span() Span

type InterfaceDecl

type InterfaceDecl struct {
	Attrs     []*Attribute
	Name      Name
	Items     []InterfaceItem
	SpanRange Span
}

func (*InterfaceDecl) Span

func (n *InterfaceDecl) Span() Span

type InterfaceItem

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

type Name

type Name struct {
	Text      string
	Explicit  bool
	SpanRange Span
}

func (Name) Span

func (n Name) Span() Span

type NamedType

type NamedType struct {
	Name      Name
	Wildcard  bool
	SpanRange Span
}

func (*NamedType) Span

func (n *NamedType) Span() Span

type Node

type Node interface {
	Span() Span
	// contains filtered or unexported methods
}

type PackageDecl

type PackageDecl struct {
	Namespace string
	Name      string
	Version   string
	Attrs     []*Attribute
	SpanRange Span
}

func (*PackageDecl) Span

func (n *PackageDecl) Span() Span

type PackagePath

type PackagePath struct {
	Namespace string
	Name      string
	SpanRange Span
}

func (*PackagePath) Span

func (n *PackagePath) Span() Span

type Param

type Param struct {
	Name string
	Type TypeExpr
	Span Span
}

type Path

type Path struct {
	Package   *PackagePath
	Segments  []Name
	SpanRange Span
}

func (*Path) Span

func (n *Path) Span() Span

type PrimitiveType

type PrimitiveType struct {
	Name      string
	SpanRange Span
}

func (*PrimitiveType) Span

func (n *PrimitiveType) Span() Span

type RecordDecl

type RecordDecl struct {
	Attrs     []*Attribute
	Name      Name
	Fields    []Field
	SpanRange Span
}

func (*RecordDecl) Span

func (n *RecordDecl) Span() Span

type ResourceDecl

type ResourceDecl struct {
	Attrs     []*Attribute
	Name      Name
	Items     []ResourceItem
	SpanRange Span
}

func (*ResourceDecl) Span

func (n *ResourceDecl) Span() Span

type ResourceItem

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

type Span

type Span struct {
	Start token.Position
	End   token.Position
}

type StringValue

type StringValue struct {
	Value     string
	Raw       string
	SpanRange Span
}

func (*StringValue) Span

func (n *StringValue) Span() Span

type TupleType

type TupleType struct {
	Items     []TypeExpr
	SpanRange Span
}

func (*TupleType) Span

func (n *TupleType) Span() Span

type TypeDecl

type TypeDecl struct {
	Attrs     []*Attribute
	Name      Name
	Type      TypeExpr
	SpanRange Span
}

func (*TypeDecl) Span

func (n *TypeDecl) Span() Span

type TypeDef

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

type TypeExpr

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

type UseDecl

type UseDecl struct {
	From      Path
	Names     []UseName
	SpanRange Span
}

func (*UseDecl) Span

func (n *UseDecl) Span() Span

type UseName

type UseName struct {
	Name  Name
	Alias *Name
}

type Value

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

type VariantCase

type VariantCase struct {
	Name      Name
	Type      TypeExpr
	SpanRange Span
}

type VariantDecl

type VariantDecl struct {
	Attrs     []*Attribute
	Name      Name
	Cases     []VariantCase
	SpanRange Span
}

func (*VariantDecl) Span

func (n *VariantDecl) Span() Span

type WorldDecl

type WorldDecl struct {
	Attrs     []*Attribute
	Name      Name
	Items     []WorldItem
	SpanRange Span
}

func (*WorldDecl) Span

func (n *WorldDecl) Span() Span

type WorldItem

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

Jump to

Keyboard shortcuts

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