Documentation
¶
Index ¶
Constants ¶
View Source
const ( InitFunctionName = "init" ExecuteFunctionName = "execute" TransactionWrapperCompositeName = "transaction" TransactionExecuteFunctionName = "transaction.execute" TransactionPrepareFunctionName = "transaction.prepare" // FailPreConditionFunctionName is the name of the function which is used for failing pre-conditions FailPreConditionFunctionName = "$failPreCondition" // FailPostConditionFunctionName is the name of the function which is used for failing post-conditions FailPostConditionFunctionName = "$failPostCondition" GeneratedNameQualifier = "$" ResourceDestroyedEventsFunctionName = GeneratedNameQualifier + ast.ResourceDestructionDefaultEventName ProgramInitFunctionName = "$_init_" TransactionGeneratedParamPrefix = "$_param_" TypeQualifierArrayConstantSized = "$ArrayConstantSized" TypeQualifierArrayVariableSized = "$ArrayVariableSized" TypeQualifierDictionary = "$Dictionary" TypeQualifierFunction = "$Function" TypeQualifierOptional = "$Optional" TypeQualifierInclusiveRange = "$InclusiveRange" )
Variables ¶
View Source
var BuiltinTypes = common.Concat[sema.Type]( sema.AllBuiltinTypes, []sema.Type{ &sema.ConstantSizedType{}, &sema.VariableSizedType{}, &sema.DictionaryType{}, &sema.FunctionType{}, &sema.OptionalType{}, }, )
Functions ¶
func LocationQualifier ¶
func QualifiedName ¶
func TypeQualifier ¶
TypeQualifier returns the prefix to be appended to an identifier (e.g: to a function name), to make it type-qualified. For primitive types, the type-qualifier is the typeID itself. For derived types (e.g: arrays, dictionaries, capabilities, etc.) the type-qualifier is a predefined identifier. TODO: Add other types TODO: Maybe make this a method on the type
Types ¶
type ImportHandler ¶
type ImportHandler func(location common.Location) *bbq.InstructionProgram
type LocationHandler ¶
type LocationHandler = sema.LocationHandlerFunc
type ResolvedLocation ¶
type ResolvedLocation = sema.ResolvedLocation
func ResolveLocation ¶
func ResolveLocation( locationHandler LocationHandler, identifiers []ast.Identifier, location common.Location, ) ([]ResolvedLocation, error)
Click to show internal directories.
Click to hide internal directories.