Documentation
¶
Overview ¶
Package asm implements the Ale assembler
Index ¶
Constants ¶
View Source
const ( // ErrBadNameResolution is raised when an attempt is made to bind a local // using an argument to the encoder that is not a Local symbol ErrBadNameResolution = "encoder argument is not a name: %s" // ErrUnknownLocalType is raised when a local or private is declared that // doesn't have a proper disposition (var, ref, rest) ErrUnknownLocalType = "unexpected local type: %s, expected: %s" // ErrExpectedType is raised when a value of a certain type is expected, // but not provided at the current position ErrExpectedType = "expected %s, got: %s" )
View Source
const ( Const = data.Local("const") Evaluate = data.Local("eval") Local = data.Local("local") Private = data.Local("private") Resolve = data.Local("resolve") PopLocals = data.Local("locals-pop") PushLocals = data.Local("locals-push") )
View Source
const ( // ErrUnexpectedName is raised when a local name is referenced that hasn't // been declared as part of the assembler encoder's scope ErrUnexpectedName = "unexpected local name: %s" // ErrUnexpectedLabel is raised when a jump or cond-jump instruction refers // to a label that hasn't been anchored in the assembler block ErrUnexpectedLabel = "unexpected label: %s" )
View Source
const ( // ErrUnknownDirective is raised when an unknown directive is called ErrUnknownDirective = "unknown directive: %s" // ErrUnexpectedForm is raised when an unexpected form is encountered in // the assembler block ErrUnexpectedForm = "unexpected form: %s" // ErrTooFewArguments is raised when an instruction is encountered in the // assembler block not accompanied by enough operands ErrTooFewArguments = "incomplete %s instruction, args expected: %d" // ErrExpectedEndOfBlock is raised when an end-of-block marker is expected // but an end of stream is encountered instead ErrExpectedEndOfBlock = "expected end of block" )
View Source
const (
EndBlock = data.Local("end")
)
View Source
const ( // ErrPairExpected is raised when a vector is provided, but does not // contain exactly two elements ErrPairExpected = "binding pair expected, got %d elements" )
Error messages
View Source
const ( // ErrUnexpectedParameter is raised when an encoder parameter is not found. // These are declared using the special* built-in ErrUnexpectedParameter = "unexpected parameter name: %s" )
Error messages
View Source
const (
ForEach = data.Local("for-each")
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EmitBuilder ¶
func MakeAsm ¶
func MakeAsm(args ...ale.Value) EmitBuilder
func MakeSpecial ¶
func MakeSpecial(pc *params.ParamCases) EmitBuilder
Click to show internal directories.
Click to hide internal directories.