checker

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Bool = &_bool{}
View Source
var Dynamic = &dynamicType{}
View Source
var Float = &float{}
View Source
var Int = &_int{}
View Source
var Str = &str{}
View Source
var Void = &void{}

Functions

func IsMaybe

func IsMaybe(t Type) bool

Types

type And

type And struct {
	Left, Right Expression
}

func (*And) Type

func (a *And) Type() Type

type AsyncPkg added in v0.4.0

type AsyncPkg struct{}

ard/async

func (AsyncPkg) Get added in v0.4.0

func (pkg AsyncPkg) Get(name string) Symbol

func (AsyncPkg) Path added in v0.4.0

func (pkg AsyncPkg) Path() string

func (AsyncPkg) Program added in v0.4.0

func (pkg AsyncPkg) Program() *Program

type Block

type Block struct {
	Stmts []Statement
}

func (*Block) Type

func (b *Block) Type() Type

type BoolLiteral

type BoolLiteral struct {
	Value bool
}

func (*BoolLiteral) String

func (b *BoolLiteral) String() string

func (*BoolLiteral) Type

func (b *BoolLiteral) Type() Type

type BoolMatch

type BoolMatch struct {
	Subject Expression
	True    *Block
	False   *Block
}

func (*BoolMatch) Type

func (b *BoolMatch) Type() Type

type BoolMethod added in v0.3.0

type BoolMethod struct {
	Subject Expression
	Kind    BoolMethodKind
}

func (*BoolMethod) Type added in v0.3.0

func (m *BoolMethod) Type() Type

type BoolMethodKind added in v0.3.0

type BoolMethodKind uint8
const (
	BoolToStr BoolMethodKind = iota
)

type Checker added in v0.3.0

type Checker struct {
	// contains filtered or unexported fields
}

func New added in v0.3.0

func New(filePath string, input *parse.Program, moduleResolver *ModuleResolver) *Checker

func (*Checker) Check added in v0.3.0

func (c *Checker) Check()

func (*Checker) Diagnostics added in v0.3.0

func (c *Checker) Diagnostics() []Diagnostic

func (*Checker) HasErrors added in v0.3.0

func (c *Checker) HasErrors() bool

func (*Checker) Module added in v0.3.0

func (c *Checker) Module() Module

This should only be called after .Check() The returned module could be problematic if there are diagnostic errors.

type ConditionalCase

type ConditionalCase struct {
	Condition Expression // Must be type Bool
	Body      *Block
}

type ConditionalMatch

type ConditionalMatch struct {
	Cases    []ConditionalCase
	CatchAll *Block
}

func (*ConditionalMatch) Type

func (c *ConditionalMatch) Type() Type

type CopyExpression

type CopyExpression struct {
	Expr  Expression
	Type_ Type
}

func (*CopyExpression) Type

func (c *CopyExpression) Type() Type

type Diagnostic

type Diagnostic struct {
	Kind    DiagnosticKind
	Message string
	// contains filtered or unexported fields
}

func (Diagnostic) String

func (d Diagnostic) String() string

type DiagnosticKind

type DiagnosticKind string
const (
	Error DiagnosticKind = "error"
	Warn  DiagnosticKind = "warn"
)

type EmbeddedModule

type EmbeddedModule struct {
	// contains filtered or unexported fields
}

EmbeddedModule represents a standard library module loaded from embedded .ard files

func (EmbeddedModule) Get

func (m EmbeddedModule) Get(name string) Symbol

func (EmbeddedModule) Path

func (m EmbeddedModule) Path() string

func (EmbeddedModule) Program

func (m EmbeddedModule) Program() *Program

type Enum

type Enum struct {
	Name     string
	Private  bool
	Values   []EnumValue // The discriminant values for each variant
	Methods  map[string]*FunctionDef
	Traits   []*Trait
	Location parse.Location
}

func (Enum) NonProducing

func (e Enum) NonProducing()

func (Enum) String

func (e Enum) String() string

func (Enum) Type

func (e Enum) Type() Type

type EnumMatch

type EnumMatch struct {
	Subject  Expression
	Cases    []*Block
	CatchAll *Block
}

func (*EnumMatch) Type

func (e *EnumMatch) Type() Type

type EnumValue added in v0.4.1

type EnumValue struct {
	Name  string
	Value int // The computed integer discriminant
}

type EnumVariant

type EnumVariant struct {
	Variant int8
	// contains filtered or unexported fields
}

func (EnumVariant) String

func (ev EnumVariant) String() string

func (EnumVariant) Type

func (ev EnumVariant) Type() Type

type Equality

type Equality struct {
	Left, Right Expression
}

func (*Equality) Type

func (n *Equality) Type() Type

type Expression

type Expression interface {
	Type() Type
}

type ExternalFunctionDef

type ExternalFunctionDef struct {
	Name            string
	Parameters      []Parameter
	ReturnType      Type
	ExternalBinding string
	Private         bool
}

func (ExternalFunctionDef) String

func (e ExternalFunctionDef) String() string

func (*ExternalFunctionDef) Type

func (e *ExternalFunctionDef) Type() Type

type FiberEval added in v0.4.0

type FiberEval struct {
	// contains filtered or unexported fields
}

func (FiberEval) GetFn added in v0.4.0

func (f FiberEval) GetFn() Expression

func (FiberEval) Type added in v0.4.0

func (f FiberEval) Type() Type

type FiberExecution

type FiberExecution struct {
	// contains filtered or unexported fields
}

func (FiberExecution) GetMainName

func (f FiberExecution) GetMainName() string

func (FiberExecution) GetModule

func (f FiberExecution) GetModule() Module

func (FiberExecution) Type

func (f FiberExecution) Type() Type

type FloatAddition

type FloatAddition struct {
	Left  Expression
	Right Expression
}

func (*FloatAddition) Type

func (n *FloatAddition) Type() Type

type FloatDivision

type FloatDivision struct {
	Left  Expression
	Right Expression
}

func (*FloatDivision) Type

func (n *FloatDivision) Type() Type

type FloatGreater

type FloatGreater struct {
	Left  Expression
	Right Expression
}

func (*FloatGreater) Type

func (n *FloatGreater) Type() Type

type FloatGreaterEqual

type FloatGreaterEqual struct {
	Left  Expression
	Right Expression
}

func (*FloatGreaterEqual) Type

func (n *FloatGreaterEqual) Type() Type

type FloatLess

type FloatLess struct {
	Left  Expression
	Right Expression
}

func (*FloatLess) Type

func (n *FloatLess) Type() Type

type FloatLessEqual

type FloatLessEqual struct {
	Left  Expression
	Right Expression
}

func (*FloatLessEqual) Type

func (n *FloatLessEqual) Type() Type

type FloatLiteral

type FloatLiteral struct {
	Value float64
}

func (*FloatLiteral) String

func (f *FloatLiteral) String() string

func (*FloatLiteral) Type

func (f *FloatLiteral) Type() Type

type FloatMethod added in v0.3.0

type FloatMethod struct {
	Subject Expression
	Kind    FloatMethodKind
}

func (*FloatMethod) Type added in v0.3.0

func (m *FloatMethod) Type() Type

type FloatMethodKind added in v0.3.0

type FloatMethodKind uint8
const (
	FloatToStr FloatMethodKind = iota
	FloatToInt
)

type FloatMultiplication

type FloatMultiplication struct {
	Left  Expression
	Right Expression
}

func (*FloatMultiplication) Type

func (n *FloatMultiplication) Type() Type

type FloatSubtraction

type FloatSubtraction struct {
	Left  Expression
	Right Expression
}

func (*FloatSubtraction) Type

func (n *FloatSubtraction) Type() Type

type ForInList

type ForInList struct {
	Cursor string
	Index  string
	List   Expression
	Body   *Block
}

func (ForInList) NonProducing

func (f ForInList) NonProducing()

type ForInMap

type ForInMap struct {
	Key  string
	Val  string
	Map  Expression
	Body *Block
}

func (ForInMap) NonProducing

func (f ForInMap) NonProducing()

type ForInStr

type ForInStr struct {
	Cursor string
	Index  string
	Value  Expression
	Body   *Block
}

func (ForInStr) NonProducing

func (f ForInStr) NonProducing()

type ForIntRange

type ForIntRange struct {
	Cursor string
	Index  string
	Start  Expression
	End    Expression
	Body   *Block
}

func (ForIntRange) NonProducing

func (f ForIntRange) NonProducing()

type ForLoop

type ForLoop struct {
	Init      *VariableDef
	Condition Expression
	Update    *Reassignment
	Body      *Block
}

func (ForLoop) NonProducing

func (f ForLoop) NonProducing()

type FunctionCall

type FunctionCall struct {
	Name string
	Args []Expression
	// contains filtered or unexported fields
}

func CreateCall

func CreateCall(name string, args []Expression, fn FunctionDef) *FunctionCall

func (*FunctionCall) Type

func (f *FunctionCall) Type() Type

type FunctionDef

type FunctionDef struct {
	Name       string
	Parameters []Parameter
	ReturnType Type
	Mutates    bool
	Body       *Block
	Private    bool
}

func (FunctionDef) String

func (f FunctionDef) String() string

func (*FunctionDef) Type

func (f *FunctionDef) Type() Type

type GenericContext

type GenericContext = map[string]*TypeVar

GenericContext maps generic parameter names to their TypeVar instances The TypeVar instances are mutable - binding happens by setting TypeVar.actual and TypeVar.bound

type Identifier

type Identifier struct {
	Name string
	// contains filtered or unexported fields
}

func (*Identifier) Type

func (i *Identifier) Type() Type

type If

type If struct {
	Condition Expression
	Body      *Block
	ElseIf    *If
	Else      *Block
}

func (*If) Type

func (i *If) Type() Type

type InstanceMethod

type InstanceMethod struct {
	Subject Expression
	Method  *FunctionCall
}

func (*InstanceMethod) String added in v0.3.0

func (i *InstanceMethod) String() string

func (*InstanceMethod) Type

func (i *InstanceMethod) Type() Type

type InstanceProperty

type InstanceProperty struct {
	Subject  Expression
	Property string

	Kind SubjectKind // Pre-computed by checker based on subject type
	// contains filtered or unexported fields
}

func (*InstanceProperty) String

func (i *InstanceProperty) String() string

String returns a string representation of the instance property

func (*InstanceProperty) Type

func (i *InstanceProperty) Type() Type

type IntAddition

type IntAddition struct {
	Left  Expression
	Right Expression
}

func (*IntAddition) Type

func (n *IntAddition) Type() Type

type IntDivision

type IntDivision struct {
	Left  Expression
	Right Expression
}

func (*IntDivision) Type

func (n *IntDivision) Type() Type

type IntGreater

type IntGreater struct {
	Left  Expression
	Right Expression
}

func (*IntGreater) Type

func (n *IntGreater) Type() Type

type IntGreaterEqual

type IntGreaterEqual struct {
	Left  Expression
	Right Expression
}

func (*IntGreaterEqual) Type

func (n *IntGreaterEqual) Type() Type

type IntLess

type IntLess struct {
	Left  Expression
	Right Expression
}

func (*IntLess) Type

func (n *IntLess) Type() Type

type IntLessEqual

type IntLessEqual struct {
	Left  Expression
	Right Expression
}

func (*IntLessEqual) Type

func (n *IntLessEqual) Type() Type

type IntLiteral

type IntLiteral struct {
	Value int
}

func (*IntLiteral) String

func (i *IntLiteral) String() string

func (*IntLiteral) Type

func (i *IntLiteral) Type() Type

type IntMatch

type IntMatch struct {
	Subject    Expression
	IntCases   map[int]*Block      // keys are integer values
	RangeCases map[IntRange]*Block // keys are integer ranges
	CatchAll   *Block
}

func (*IntMatch) Type

func (i *IntMatch) Type() Type

type IntMethod added in v0.3.0

type IntMethod struct {
	Subject Expression
	Kind    IntMethodKind
}

func (*IntMethod) Type added in v0.3.0

func (m *IntMethod) Type() Type

type IntMethodKind added in v0.3.0

type IntMethodKind uint8
const (
	IntToStr IntMethodKind = iota
)

type IntModulo

type IntModulo struct {
	Left  Expression
	Right Expression
}

func (*IntModulo) Type

func (n *IntModulo) Type() Type

type IntMultiplication

type IntMultiplication struct {
	Left  Expression
	Right Expression
}

func (*IntMultiplication) Type

func (n *IntMultiplication) Type() Type

type IntRange

type IntRange struct {
	Start int
	End   int
}

type IntSubtraction

type IntSubtraction struct {
	Left  Expression
	Right Expression
}

func (*IntSubtraction) Type

func (n *IntSubtraction) Type() Type

type List

type List struct {
	// contains filtered or unexported fields
}

func MakeList

func MakeList(of Type) *List

func (List) Of

func (l List) Of() Type

func (List) String

func (l List) String() string

type ListLiteral

type ListLiteral struct {
	Elements []Expression
	// contains filtered or unexported fields
}

func (*ListLiteral) Type

func (l *ListLiteral) Type() Type

type ListMethod added in v0.3.0

type ListMethod struct {
	Subject     Expression
	Kind        ListMethodKind
	Args        []Expression
	ElementType Type // Pre-computed element type
	// contains filtered or unexported fields
}

func (*ListMethod) Type added in v0.3.0

func (m *ListMethod) Type() Type

type ListMethodKind added in v0.3.0

type ListMethodKind uint8
const (
	ListAt ListMethodKind = iota
	ListPrepend
	ListPush
	ListSet
	ListSize
	ListSort
	ListSwap
)

type Map

type Map struct {
	// contains filtered or unexported fields
}

func MakeMap

func MakeMap(key, value Type) *Map

func (*Map) Key

func (m *Map) Key() Type

func (Map) String

func (m Map) String() string

func (*Map) Value

func (m *Map) Value() Type

type MapLiteral

type MapLiteral struct {
	Keys   []Expression
	Values []Expression

	KeyType   Type // Pre-computed by checker
	ValueType Type // Pre-computed by checker
	// contains filtered or unexported fields
}

func (*MapLiteral) Type

func (m *MapLiteral) Type() Type

type MapMethod added in v0.3.0

type MapMethod struct {
	Subject   Expression
	Kind      MapMethodKind
	Args      []Expression
	KeyType   Type // Pre-computed key type
	ValueType Type // Pre-computed value type
	// contains filtered or unexported fields
}

func (*MapMethod) Type added in v0.3.0

func (m *MapMethod) Type() Type

type MapMethodKind added in v0.3.0

type MapMethodKind uint8
const (
	MapKeys MapMethodKind = iota
	MapSize
	MapGet
	MapSet
	MapDrop
	MapHas
)

type Match

type Match struct {
	Pattern *Identifier
	Body    *Block
}

type Maybe

type Maybe struct {
	// contains filtered or unexported fields
}

func MakeMaybe

func MakeMaybe(of Type) *Maybe

func (*Maybe) Of

func (m *Maybe) Of() Type

func (*Maybe) String

func (m *Maybe) String() string

type MaybeMethod added in v0.3.0

type MaybeMethod struct {
	Subject   Expression
	Kind      MaybeMethodKind
	Args      []Expression
	InnerType Type // Pre-computed inner type
	// contains filtered or unexported fields
}

func (*MaybeMethod) Type added in v0.3.0

func (m *MaybeMethod) Type() Type

type MaybeMethodKind added in v0.3.0

type MaybeMethodKind uint8
const (
	MaybeExpect MaybeMethodKind = iota
	MaybeIsNone
	MaybeIsSome
	MaybeOr
)

type MaybePkg

type MaybePkg struct{}

ard/maybe

func (MaybePkg) Get

func (pkg MaybePkg) Get(name string) Symbol

func (MaybePkg) Path

func (pkg MaybePkg) Path() string

func (MaybePkg) Program

func (pkg MaybePkg) Program() *Program

type Module

type Module interface {
	Path() string
	Get(name string) Symbol
	Program() *Program
}

func FindEmbeddedModule

func FindEmbeddedModule(path string) (Module, bool)

findEmbeddedModule loads a .ard standard library module from embedded files

type ModuleFunctionCall

type ModuleFunctionCall struct {
	Module string
	Call   *FunctionCall
}

func (*ModuleFunctionCall) Type

func (p *ModuleFunctionCall) Type() Type

type ModuleResolver

type ModuleResolver struct {
	// contains filtered or unexported fields
}

ModuleResolver handles finding and loading user modules

func NewModuleResolver

func NewModuleResolver(workingDir string) (*ModuleResolver, error)

NewModuleResolver creates a new module resolver for the given working directory

func (*ModuleResolver) GetProjectInfo

func (mr *ModuleResolver) GetProjectInfo() *ProjectInfo

GetProjectInfo returns the current project information

func (*ModuleResolver) LoadModule

func (mr *ModuleResolver) LoadModule(importPath string) (*parse.Program, error)

LoadModule loads and parses a module file from the given import path

func (*ModuleResolver) LoadModuleWithDependencies

func (mr *ModuleResolver) LoadModuleWithDependencies(importPath string) (*parse.Program, error)

LoadModuleWithDependencies loads a module and all its dependencies, detecting circular dependencies

func (*ModuleResolver) ResolveImportPath

func (mr *ModuleResolver) ResolveImportPath(importPath string) (string, error)

ResolveImportPath converts an import path to a file system path Example: "my_project/utils" -> "utils.ard" Example: "my_project/math/operations" -> "math/operations.ard"

type ModuleStructInstance

type ModuleStructInstance struct {
	Module     string
	Property   *StructInstance
	FieldTypes map[string]Type // Pre-computed by checker
}

func (*ModuleStructInstance) Type

func (p *ModuleStructInstance) Type() Type

type ModuleSymbol

type ModuleSymbol struct {
	Module string
	Symbol Symbol
}

func (*ModuleSymbol) Type

func (p *ModuleSymbol) Type() Type

type Negation

type Negation struct {
	Value Expression
}

func (*Negation) String

func (n *Negation) String() string

func (*Negation) Type

func (n *Negation) Type() Type

type NonProducing

type NonProducing interface {
	NonProducing()
}

type Not

type Not struct {
	Value Expression
}

func (*Not) String

func (n *Not) String() string

func (*Not) Type

func (n *Not) Type() Type

type OptionMatch

type OptionMatch struct {
	Subject   Expression
	Some      *Match
	None      *Block
	InnerType Type // Pre-computed inner type of Maybe
}

func (*OptionMatch) Type

func (o *OptionMatch) Type() Type

type Or

type Or struct {
	Left, Right Expression
}

func (*Or) Type

func (o *Or) Type() Type

type Panic

type Panic struct {
	Message Expression
	// contains filtered or unexported fields
}

func (Panic) GetLocation

func (p Panic) GetLocation() parse.Location

func (Panic) Type

func (p Panic) Type() Type

type Parameter

type Parameter struct {
	Name    string
	Type    Type
	Mutable bool
}

type Program

type Program struct {
	Imports    map[string]Module
	Statements []Statement
}

type ProjectInfo

type ProjectInfo struct {
	RootPath    string // absolute path to project root
	ProjectName string // project name from ard.toml or directory name
}

ProjectInfo holds information about the current project

type Reassignment

type Reassignment struct {
	Target Expression
	Value  Expression
}

func (*Reassignment) NonProducing

func (r *Reassignment) NonProducing()

func (*Reassignment) Type added in v0.3.0

func (r *Reassignment) Type() Type

type Result

type Result struct {
	// contains filtered or unexported fields
}

func MakeResult

func MakeResult(val, err Type) *Result

func (*Result) Err

func (r *Result) Err() Type

func (Result) String

func (r Result) String() string

func (*Result) Val

func (r *Result) Val() Type

type ResultMatch

type ResultMatch struct {
	Subject Expression
	Ok      *Match
	Err     *Match
}

func (ResultMatch) Type

func (r ResultMatch) Type() Type

type ResultMethod added in v0.3.0

type ResultMethod struct {
	Subject Expression
	Kind    ResultMethodKind
	Args    []Expression
	OkType  Type // Pre-computed OK type
	ErrType Type // Pre-computed Error type
	// contains filtered or unexported fields
}

func (*ResultMethod) Type added in v0.3.0

func (m *ResultMethod) Type() Type

type ResultMethodKind added in v0.3.0

type ResultMethodKind uint8
const (
	ResultExpect ResultMethodKind = iota
	ResultOr
	ResultIsOk
	ResultIsErr
)

type ResultPkg

type ResultPkg struct {
}

func (ResultPkg) Get

func (pkg ResultPkg) Get(name string) Symbol

func (ResultPkg) Path

func (pkg ResultPkg) Path() string

func (ResultPkg) Program

func (pkg ResultPkg) Program() *Program

type Statement

type Statement struct {
	Break bool
	Expr  Expression
	Stmt  NonProducing
}

can either produce a value or not

type StrAddition

type StrAddition struct {
	Left  Expression
	Right Expression
}

func (*StrAddition) Type

func (n *StrAddition) Type() Type

type StrLiteral

type StrLiteral struct {
	Value string
}

func (*StrLiteral) String

func (s *StrLiteral) String() string

func (*StrLiteral) Type

func (s *StrLiteral) Type() Type

type StrMethod added in v0.3.0

type StrMethod struct {
	Subject Expression
	Kind    StrMethodKind
	Args    []Expression
}

func (*StrMethod) Type added in v0.3.0

func (s *StrMethod) Type() Type

type StrMethodKind added in v0.3.0

type StrMethodKind uint8
const (
	StrSize StrMethodKind = iota
	StrIsEmpty
	StrContains
	StrReplace
	StrReplaceAll
	StrSplit
	StrStartsWith
	StrToStr
	StrTrim
)

type StructDef

type StructDef struct {
	Name    string
	Fields  map[string]Type
	Methods map[string]*FunctionDef
	Self    string
	Traits  []*Trait
	Private bool
}

func (StructDef) NonProducing

func (def StructDef) NonProducing()

func (StructDef) String

func (def StructDef) String() string

type StructInstance

type StructInstance struct {
	Name   string
	Fields map[string]Expression

	FieldTypes map[string]Type // Pre-computed by checker
	// contains filtered or unexported fields
}

func (StructInstance) Type

func (s StructInstance) Type() Type

type SubjectKind added in v0.3.0

type SubjectKind uint8
const (
	StructSubject SubjectKind = iota
)

type Symbol

type Symbol struct {
	Name string
	Type Type
	// contains filtered or unexported fields
}

func (Symbol) IsZero

func (s Symbol) IsZero() bool

type SymbolTable

type SymbolTable struct {
	// contains filtered or unexported fields
}

type TemplateStr

type TemplateStr struct {
	Chunks []Expression
}

func (*TemplateStr) String

func (t *TemplateStr) String() string

func (*TemplateStr) Type

func (t *TemplateStr) Type() Type

type Trait

type Trait struct {
	Name string
	// contains filtered or unexported fields
}

func (Trait) GetMethods

func (t Trait) GetMethods() []FunctionDef

func (Trait) String

func (t Trait) String() string

type TryKind added in v0.3.0

type TryKind uint8
const (
	TryResult TryKind = iota
	TryMaybe
)

type TryOp

type TryOp struct {
	CatchBlock *Block
	CatchVar   string
	Kind       TryKind // Pre-computed by checker: TryResult or TryMaybe
	// contains filtered or unexported fields
}

func (TryOp) Expr

func (t TryOp) Expr() Expression

func (TryOp) Type

func (t TryOp) Type() Type

type Type

type Type interface {
	String() string
	// contains filtered or unexported methods
}

type TypeVar added in v0.3.0

type TypeVar struct {
	// contains filtered or unexported fields
}

func (TypeVar) Actual added in v0.3.0

func (a TypeVar) Actual() Type

func (TypeVar) String added in v0.3.0

func (a TypeVar) String() string

type Union

type Union struct {
	Name  string
	Types []Type
}

func (Union) NonProducing

func (u Union) NonProducing()

func (Union) String

func (u Union) String() string

func (Union) Type

func (u Union) Type() Type

type UnionMatch

type UnionMatch struct {
	Subject   Expression
	TypeCases map[string]*Match
	CatchAll  *Block
}

func (*UnionMatch) Type

func (u *UnionMatch) Type() Type

type UserModule

type UserModule struct {
	// contains filtered or unexported fields
}

UserModule represents a user-defined module that implements the Module interface

func NewUserModule

func NewUserModule(filePath string, program *Program, globalScope *SymbolTable) *UserModule

NewUserModule creates a UserModule from a checked program, extracting only public symbols

func (*UserModule) Get

func (m *UserModule) Get(name string) Symbol

Get returns a public symbol by name, or nil if not found or private

func (*UserModule) Path

func (m *UserModule) Path() string

Path returns the file path for this module

func (*UserModule) Program

func (m *UserModule) Program() *Program

Program returns the checked program for this module

type Variable

type Variable struct {
	// contains filtered or unexported fields
}

func (Variable) Name

func (v Variable) Name() string

func (Variable) String

func (v Variable) String() string

func (Variable) Type

func (v Variable) Type() Type

type VariableDef

type VariableDef struct {
	Mutable bool
	Name    string

	Value Expression
	// contains filtered or unexported fields
}

func (*VariableDef) NonProducing

func (v *VariableDef) NonProducing()

func (*VariableDef) Type

func (v *VariableDef) Type() Type

type VoidLiteral

type VoidLiteral struct{}

func (*VoidLiteral) String

func (v *VoidLiteral) String() string

func (*VoidLiteral) Type

func (v *VoidLiteral) Type() Type

type WhileLoop

type WhileLoop struct {
	Condition Expression
	Body      *Block
}

func (WhileLoop) NonProducing

func (w WhileLoop) NonProducing()

Jump to

Keyboard shortcuts

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