syntax

package
v0.8.0-a.5 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FactoryBodyObject

func FactoryBodyObject(body FactoryBody) *parse.ObjectLit

FactoryBodyObject returns the generic AST object for a lowered factory body.

func RuntimeFactoryBodyObject

func RuntimeFactoryBodyObject(body FactoryBody) *parse.ObjectLit

RuntimeFactoryBodyObject returns the generic AST object runtime code reads.

func StackFileObject

func StackFileObject(stack *StackFile) *parse.ObjectLit

StackFileObject returns the generic AST object for a lowered stack file.

func ValidateFile

func ValidateFile(f *File) *parse.ErrorList

Types

type CompositeDecl

type CompositeDecl struct {
	S    parse.Span
	Name Ident
	Kind NodeKind
	Body FactoryBody
}

type ConfigurationDecl

type ConfigurationDecl struct {
	S        parse.Span
	Name     *Ident
	Selector Ident
	Body     *parse.ObjectLit
	Value    parse.Expr
}

type ConfigurationValue

type ConfigurationValue struct {
	S        parse.Span
	Name     *Ident
	Selector Ident
	Body     *parse.ObjectLit
	Value    parse.Expr
}

type ConstraintDecl

type ConstraintDecl struct {
	S     parse.Span
	Value parse.Expr
}

type EncryptionDecl

type EncryptionDecl struct {
	S        parse.Span
	Selector Ident
	Body     *parse.ObjectLit
}

type FactoryBody

type FactoryBody struct {
	S              parse.Span
	Description    *parse.StringLit
	Inputs         []InputDecl
	Locals         []LocalDecl
	Constraints    []ConstraintDecl
	Imports        []ImportDecl
	Configurations []ConfigurationDecl
	Resources      []NodeDecl
	Data           []NodeDecl
	Actions        []NodeDecl
	Outputs        []OutputDecl
}

type FactoryFile

type FactoryFile struct {
	S    parse.Span
	Body FactoryBody
}

type File

type File struct {
	S        parse.Span
	Kind     FileKind
	Path     string
	Factory  *FactoryFile
	Stack    *StackFile
	Manifest *ManifestFile
	Lock     *LockFile
	Library  *LibraryFile
	Comments []parse.Comment
}

func LowerFile

func LowerFile(f *parse.File) (*File, *parse.ErrorList)

func ParseSource

func ParseSource(path string, b []byte) (*File, error)

type FileKind

type FileKind int
const (
	FileUnknown FileKind = iota
	FileFactory
	FileStack
	FileManifest
	FileLock
	FileLibrary
)

type Ident

type Ident struct {
	S    parse.Span
	Name string
}

type ImportDecl

type ImportDecl struct {
	S     parse.Span
	Alias Ident
	Ref   *parse.StringLit
}

type InputDecl

type InputDecl struct {
	S    parse.Span
	Name Ident
	Body *parse.ObjectLit
	Type parse.TypeExpr
}

type LibraryFile

type LibraryFile struct {
	S       parse.Span
	Exports []CompositeDecl
}

type LocalDecl

type LocalDecl struct {
	S     parse.Span
	Name  Ident
	Value parse.Expr
}

type LockDep

type LockDep struct {
	S       parse.Span
	ID      StringKey
	Kind    Ident
	Version *parse.StringLit
	Commit  *parse.StringLit
	Hash    *parse.StringLit
}

type LockFile

type LockFile struct {
	S         parse.Span
	Version   *parse.NumberLit
	Toolchain *LockToolchain
	Deps      []LockDep
}

type LockToolchain

type LockToolchain struct {
	S             parse.Span
	UnobinVersion *parse.StringLit
}

type ManifestFile

type ManifestFile struct {
	S             parse.Span
	UnobinVersion *parse.StringLit
	Requires      []ManifestRequire
	Replace       []ManifestReplace
}

type ManifestReplace

type ManifestReplace struct {
	S    parse.Span
	ID   StringKey
	Path *parse.StringLit
}

type ManifestRequire

type ManifestRequire struct {
	S       parse.Span
	ID      StringKey
	Version *parse.StringLit
}

type NodeDecl

type NodeDecl struct {
	S        parse.Span
	Kind     NodeKind
	Name     Ident
	Selector NodeSelector
	Body     *parse.ObjectLit
}

type NodeKind

type NodeKind string
const (
	NodeResource NodeKind = "resource"
	NodeData     NodeKind = "data"
	NodeAction   NodeKind = "action"
)

type NodeSelector

type NodeSelector struct {
	S      parse.Span
	Alias  Ident
	Export Ident
}

type OutputDecl

type OutputDecl struct {
	S    parse.Span
	Name Ident
	Body *parse.ObjectLit
}

type StackFactoryBlock

type StackFactoryBlock struct {
	S              parse.Span
	Pin            *parse.ObjectLit
	Inputs         *parse.ObjectLit
	Configurations []ConfigurationValue
}

type StackFile

type StackFile struct {
	S           parse.Span
	Factory     *StackFactoryBlock
	State       *StateDecl
	Encryption  *EncryptionDecl
	Locals      []LocalDecl
	Parallelism parse.Expr
}

type StateDecl

type StateDecl struct {
	S        parse.Span
	Selector Ident
	Body     *parse.ObjectLit
}

type StringKey

type StringKey struct {
	S     parse.Span
	Value string
}

Jump to

Keyboard shortcuts

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