normalized

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LastDefinitionId = uint64(0)

Functions

This section is empty.

Types

type Access

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

func (Access) Location

func (e Access) Location() ast.Location

func (Access) Successor

func (e Access) Successor() typed.Statement

type Apply

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

func (*Apply) Func

func (e *Apply) Func() Expression

func (Apply) Location

func (e Apply) Location() ast.Location

func (Apply) Successor

func (e Apply) Successor() typed.Statement

type Call

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

func (Call) Location

func (e Call) Location() ast.Location

func (Call) Successor

func (e Call) Successor() typed.Statement

type Const

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

func (Const) Location

func (e Const) Location() ast.Location

func (Const) Successor

func (e Const) Successor() typed.Statement

type Constructor

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

func (Constructor) Location

func (e Constructor) Location() ast.Location

func (Constructor) Successor

func (e Constructor) Successor() typed.Statement

type DataOption

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

func NewDataOption

func NewDataOption(name ast.Identifier, hidden bool, values []Type) *DataOption

type Definition

type Definition interface {
	Statement
	FlattenLambdas(params map[ast.Identifier]Pattern, o *Module)

	Params() []Pattern
	// contains filtered or unexported methods
}

func NewDefinition

func NewDefinition(
	location ast.Location, id uint64, hidden bool,
	name ast.Identifier, nameLocation ast.Location,
	params []Pattern, body Expression, declaredType Type,
) Definition

type Expression

type Expression interface {
	Statement
	// contains filtered or unexported methods
}

func NewAccess

func NewAccess(loc ast.Location, record Expression, fieldName ast.Identifier) Expression

func NewApply

func NewApply(loc ast.Location, fn Expression, args []Expression) Expression

func NewConst

func NewConst(loc ast.Location, value ast.ConstValue) Expression

func NewConstructor

func NewConstructor(
	loc ast.Location,
	moduleName ast.QualifiedIdentifier,
	dataName ast.Identifier,
	optionName ast.Identifier,
	args []Expression,
) Expression

func NewFunction

func NewFunction(
	loc ast.Location,
	name ast.Identifier,
	params []Pattern,
	body Expression,
	fnType Type,
	nested Expression,
	predecessor WithSuccessor,
) Expression

func NewGlobal

func NewGlobal(
	loc ast.Location,
	moduleName ast.QualifiedIdentifier,
	definitionName ast.Identifier,
) Expression

func NewLambda

func NewLambda(loc ast.Location, params []Pattern, body Expression) Expression

func NewLet

func NewLet(loc ast.Location, pattern Pattern, value Expression, nested Expression) Expression

func NewList

func NewList(loc ast.Location, items []Expression) Expression

func NewLocal

func NewLocal(loc ast.Location, name ast.Identifier, target Pattern, predecessor WithSuccessor) Expression

func NewNativeCall

func NewNativeCall(loc ast.Location, name ast.FullIdentifier, args []Expression) Expression

func NewRecord

func NewRecord(loc ast.Location, fields []*RecordField) Expression

func NewSelect

func NewSelect(loc ast.Location, condition Expression, cases []*SelectCase) Expression

func NewTuple

func NewTuple(loc ast.Location, items []Expression) Expression

func NewUpdateGlobal

func NewUpdateGlobal(
	loc ast.Location,
	moduleName ast.QualifiedIdentifier,
	definitionName ast.Identifier,
	fields []*RecordField,
) Expression

func NewUpdateLocal

func NewUpdateLocal(loc ast.Location, recordName ast.Identifier, target Pattern, fields []*RecordField) Expression

type Function

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

func (Function) Location

func (e Function) Location() ast.Location

func (Function) Successor

func (e Function) Successor() typed.Statement

type Global

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

func (*Global) DefinitionName

func (e *Global) DefinitionName() (ast.QualifiedIdentifier, ast.Identifier)

func (Global) Location

func (e Global) Location() ast.Location

func (Global) Successor

func (e Global) Successor() typed.Statement

type Lambda

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

func (Lambda) Location

func (e Lambda) Location() ast.Location

func (Lambda) Successor

func (e Lambda) Successor() typed.Statement

type Let

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

func (Let) Location

func (e Let) Location() ast.Location

func (*Let) Pattern

func (e *Let) Pattern() Pattern

func (Let) Successor

func (e Let) Successor() typed.Statement

type List

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

func (List) Location

func (e List) Location() ast.Location

func (List) Successor

func (e List) Successor() typed.Statement

type Local

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

func (Local) Location

func (e Local) Location() ast.Location

func (Local) Successor

func (e Local) Successor() typed.Statement

func (*Local) Target

func (e *Local) Target() Pattern

type Module

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

func NewModule

func NewModule(location ast.Location, name ast.QualifiedIdentifier, definitions []Definition) *Module

func (*Module) AddDefinition

func (module *Module) AddDefinition(definition Definition)

func (*Module) AddDependencies

func (module *Module) AddDependencies(modName ast.QualifiedIdentifier, identName ast.Identifier)

func (*Module) Annotate

func (module *Module) Annotate(
	modules map[ast.QualifiedIdentifier]*Module,
	typedModules map[ast.QualifiedIdentifier]*typed.Module,
) (errors []error)

func (*Module) Dependencies

func (module *Module) Dependencies() []ast.QualifiedIdentifier

func (*Module) Location

func (module *Module) Location() ast.Location

type PAlias

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

func (*PAlias) Alias

func (e *PAlias) Alias() ast.Identifier

func (PAlias) Location

func (p PAlias) Location() ast.Location

func (*PAlias) Nested

func (e *PAlias) Nested() Pattern

func (PAlias) Successor

func (p PAlias) Successor() typed.Statement

type PAny

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

func (PAny) Location

func (p PAny) Location() ast.Location

func (PAny) Successor

func (p PAny) Successor() typed.Statement

type PCons

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

func (*PCons) Head

func (e *PCons) Head() Pattern

func (PCons) Location

func (p PCons) Location() ast.Location

func (PCons) Successor

func (p PCons) Successor() typed.Statement

func (*PCons) Tail

func (e *PCons) Tail() Pattern

type PConst

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

func (PConst) Location

func (p PConst) Location() ast.Location

func (PConst) Successor

func (p PConst) Successor() typed.Statement

type PList

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

func (*PList) Items

func (e *PList) Items() []Pattern

func (PList) Location

func (p PList) Location() ast.Location

func (PList) Successor

func (p PList) Successor() typed.Statement

type PNamed

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

func (PNamed) Location

func (p PNamed) Location() ast.Location

func (*PNamed) Name

func (e *PNamed) Name() ast.Identifier

func (PNamed) Successor

func (p PNamed) Successor() typed.Statement

type POption

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

func (*POption) DefinitionName

func (e *POption) DefinitionName() (ast.QualifiedIdentifier, ast.Identifier)

func (POption) Location

func (p POption) Location() ast.Location

func (POption) Successor

func (p POption) Successor() typed.Statement

func (*POption) Values

func (e *POption) Values() []Pattern

type PRecord

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

func (*PRecord) Fields

func (e *PRecord) Fields() []*PRecordField

func (PRecord) Location

func (p PRecord) Location() ast.Location

func (PRecord) Successor

func (p PRecord) Successor() typed.Statement

type PRecordField

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

func NewPRecordField

func NewPRecordField(loc ast.Location, name ast.Identifier) *PRecordField

func (PRecordField) Name

func (f PRecordField) Name() ast.Identifier

type PTuple

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

func (*PTuple) Items

func (e *PTuple) Items() []Pattern

func (PTuple) Location

func (p PTuple) Location() ast.Location

func (PTuple) Successor

func (p PTuple) Successor() typed.Statement

type Pattern

type Pattern interface {
	Statement
	// contains filtered or unexported methods
}

func NewPAlias

func NewPAlias(loc ast.Location, declaredType Type, alias ast.Identifier, nested Pattern) Pattern

func NewPAny

func NewPAny(loc ast.Location, declaredType Type) Pattern

func NewPCons

func NewPCons(loc ast.Location, declaredType Type, head, tail Pattern) Pattern

func NewPConst

func NewPConst(loc ast.Location, type_ Type, value ast.ConstValue) Pattern

func NewPList

func NewPList(loc ast.Location, declaredType Type, items []Pattern) Pattern

func NewPNamed

func NewPNamed(loc ast.Location, declaredType Type, name ast.Identifier) Pattern

func NewPOption

func NewPOption(
	loc ast.Location,
	declaredType Type,
	moduleName ast.QualifiedIdentifier,
	definitionName ast.Identifier,
	values []Pattern,
) Pattern

func NewPRecord

func NewPRecord(loc ast.Location, declaredType Type, fields []*PRecordField) Pattern

func NewPTuple

func NewPTuple(loc ast.Location, declaredType Type, items []Pattern) Pattern

type Record

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

func (Record) Location

func (e Record) Location() ast.Location

func (Record) Successor

func (e Record) Successor() typed.Statement

type RecordField

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

func NewRecordField

func NewRecordField(loc ast.Location, name ast.Identifier, value Expression) *RecordField

type Select

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

func (*Select) Cases

func (e *Select) Cases() []*SelectCase

func (Select) Location

func (e Select) Location() ast.Location

func (Select) Successor

func (e Select) Successor() typed.Statement

type SelectCase

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

func NewSelectCase

func NewSelectCase(loc ast.Location, pattern Pattern, expression Expression) *SelectCase

func (SelectCase) Location

func (c SelectCase) Location() ast.Location

func (SelectCase) Pattern

func (c SelectCase) Pattern() Pattern

type Statement

type Statement interface {
	Location() ast.Location
	Successor() typed.Statement
}

type TData

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

func (TData) Location

func (t TData) Location() ast.Location

func (TData) SetSuccessor

func (t TData) SetSuccessor(typedType typed.Type) typed.Type

func (TData) Successor

func (t TData) Successor() typed.Statement

type TFunc

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

func (TFunc) Location

func (t TFunc) Location() ast.Location

func (TFunc) SetSuccessor

func (t TFunc) SetSuccessor(typedType typed.Type) typed.Type

func (TFunc) Successor

func (t TFunc) Successor() typed.Statement

type TNative

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

func (TNative) Location

func (t TNative) Location() ast.Location

func (TNative) SetSuccessor

func (t TNative) SetSuccessor(typedType typed.Type) typed.Type

func (TNative) Successor

func (t TNative) Successor() typed.Statement

type TParameter

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

func (TParameter) Location

func (t TParameter) Location() ast.Location

func (TParameter) SetSuccessor

func (t TParameter) SetSuccessor(typedType typed.Type) typed.Type

func (TParameter) Successor

func (t TParameter) Successor() typed.Statement

type TPlaceholder

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

func (TPlaceholder) Location

func (t TPlaceholder) Location() ast.Location

func (TPlaceholder) SetSuccessor

func (t TPlaceholder) SetSuccessor(typedType typed.Type) typed.Type

func (TPlaceholder) Successor

func (t TPlaceholder) Successor() typed.Statement

type TRecord

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

func (TRecord) Location

func (t TRecord) Location() ast.Location

func (TRecord) SetSuccessor

func (t TRecord) SetSuccessor(typedType typed.Type) typed.Type

func (TRecord) Successor

func (t TRecord) Successor() typed.Statement

type TTuple

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

func (TTuple) Location

func (t TTuple) Location() ast.Location

func (TTuple) SetSuccessor

func (t TTuple) SetSuccessor(typedType typed.Type) typed.Type

func (TTuple) Successor

func (t TTuple) Successor() typed.Statement

type TUnit

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

func (TUnit) Location

func (t TUnit) Location() ast.Location

func (TUnit) SetSuccessor

func (t TUnit) SetSuccessor(typedType typed.Type) typed.Type

func (TUnit) Successor

func (t TUnit) Successor() typed.Statement

type Tuple

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

func (Tuple) Location

func (e Tuple) Location() ast.Location

func (Tuple) Successor

func (e Tuple) Successor() typed.Statement

type Type

type Type interface {
	Statement

	SetSuccessor(typedType typed.Type) typed.Type
	// contains filtered or unexported methods
}

func NewTData

func NewTData(loc ast.Location, name ast.FullIdentifier, args []Type, options []*DataOption) Type

func NewTFunc

func NewTFunc(loc ast.Location, params []Type, ret Type) Type

func NewTNative

func NewTNative(loc ast.Location, name ast.FullIdentifier, args []Type) Type

func NewTParameter

func NewTParameter(loc ast.Location, name ast.Identifier) Type

func NewTPlaceholder

func NewTPlaceholder(name ast.FullIdentifier) Type

func NewTRecord

func NewTRecord(loc ast.Location, fields map[ast.Identifier]Type) Type

func NewTTuple

func NewTTuple(loc ast.Location, items []Type) Type

func NewTUnit

func NewTUnit(loc ast.Location) Type

type Update

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

func (Update) Location

func (e Update) Location() ast.Location

func (Update) Successor

func (e Update) Successor() typed.Statement

type WithSuccessor

type WithSuccessor interface {
	SetSuccessor(s Expression)
}

Jump to

Keyboard shortcuts

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