package syntax¶
Functions¶
func ValidateFile¶
Types¶
type CompositeDecl¶
type ConstraintDecl¶
type EncryptionDecl¶
type FactoryBody¶
type FactoryBody struct {
S parse.Span
Description *parse.StringLit
Inputs []InputDecl
Locals []LocalDecl
Constraints []ConstraintDecl
Imports []ImportDecl
LibraryConfigs []LibraryConfigDecl
StateMoves []StateMoveDecl
Resources []NodeDecl
Data []NodeDecl
Actions []NodeDecl
Outputs []OutputDecl
}
type FactoryFile¶
type File¶
type File struct {
S parse.Span
Kind FileKind
Path string
Factory *FactoryFile
Stack *StackFile
Project *ProjectFile
ProjectLock *ProjectLockFile
Library *LibraryFile
Comments []parse.Comment
}
func LowerFile¶
func LowerParsedSource¶
LowerParsedSource lowers an already parsed UB source file into typed syntax.
func ParseSource¶
type FileKind¶
type Ident¶
type ImportDecl¶
type InputDecl¶
type LibraryConfigDecl¶
type LibraryFile¶
type LocalDecl¶
type NodeDecl¶
type NodeDecl struct {
S parse.Span
Kind NodeKind
Name Ident
Selector NodeSelector
Body *parse.ObjectLit
}
type NodeKind¶
type NodeSelector¶
type OutputDecl¶
type ProjectFile¶
type ProjectFile struct {
S parse.Span
UnobinVersion *parse.StringLit
Requires []ProjectRequire
Replace []ProjectReplace
}
type ProjectLockDep¶
type ProjectLockDep struct {
S parse.Span
ID StringKey
Kind Ident
Version *parse.StringLit
Commit *parse.StringLit
Hash *parse.StringLit
}
type ProjectLockFile¶
type ProjectLockFile struct {
S parse.Span
Version *parse.NumberLit
Toolchain *ProjectLockToolchain
Deps []ProjectLockDep
}
type ProjectLockToolchain¶
type ProjectReplace¶
type ProjectRequire¶
type ProjectRequire struct {
S parse.Span
ID StringKey
Version *parse.StringLit
Indirect *parse.BoolLit
}
type SourceFileSpec¶
type SourceFileSpec struct {
DisplayPath string
LibraryPath string
ProjectRelPath string
PackageRelPath string
LineStarts []int
}
type StackFactoryBlock¶
type StackFile¶
type StackFile struct {
S parse.Span
Factory *StackFactoryBlock
State *StateDecl
Encryption *EncryptionDecl
Locals []LocalDecl
Parallelism parse.Expr
}