Documentation ¶
Index ¶
- Constants
- Variables
- func AreCompatibleEquatableTypes(leftType, rightType Type) bool
- func CheckAddressLiteral(expression *ast.IntegerExpression, report func(error)) bool
- func CheckFixedPointLiteral(expression *ast.FixedPointExpression, targetType Type, report func(error)) bool
- func CheckIntegerLiteral(expression *ast.IntegerExpression, targetType Type, report func(error)) bool
- func FailableCastCanSucceed(subType, superType Type) bool
- func FunctionEntryPointDeclaration(program *ast.Program) *ast.FunctionDeclaration
- func IsNilType(ty Type) bool
- func IsSubType(subType Type, superType Type) bool
- func IsValidAssignmentTargetExpression(expression ast.Expression) bool
- func IsValidDictionaryKeyType(keyType Type) bool
- func IsValidEventParameterType(t Type, results map[*Member]bool) bool
- func RequiredArgumentCount(count int) *int
- func VisitThisAndNested(t Type, visit func(ty Type))
- type AccessCheckMode
- type AddressType
- func (*AddressType) Equal(other Type) bool
- func (t *AddressType) GetMembers() map[string]MemberResolver
- func (*AddressType) ID() TypeID
- func (*AddressType) IsEquatable() bool
- func (*AddressType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (*AddressType) IsInvalidType() bool
- func (*AddressType) IsResourceType() bool
- func (*AddressType) IsStorable(_ map[*Member]bool) bool
- func (*AddressType) IsType()
- func (*AddressType) MaxInt() *big.Int
- func (*AddressType) MinInt() *big.Int
- func (*AddressType) QualifiedString() string
- func (t *AddressType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *AddressType) RewriteWithRestrictedTypes() (Type, bool)
- func (*AddressType) String() string
- func (*AddressType) TypeAnnotationState() TypeAnnotationState
- func (*AddressType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type AlwaysFailingNonResourceCastingTypeError
- type AlwaysFailingResourceCastingTypeError
- type AlwaysSucceedingFailableCastHint
- type AlwaysSucceedingForceCastHint
- type AmbiguousRestrictedTypeError
- type ArgumentCountError
- type ArgumentExpressionsCheck
- type ArrayType
- type AssignmentToConstantError
- type AssignmentToConstantMemberError
- type AstPositionResourceUseOrderedMap
- func (om *AstPositionResourceUseOrderedMap) Clear()
- func (om *AstPositionResourceUseOrderedMap) Delete(key ast.Position) (oldValue ResourceUse, present bool)
- func (om *AstPositionResourceUseOrderedMap) Foreach(f func(key ast.Position, value ResourceUse))
- func (om *AstPositionResourceUseOrderedMap) Get(key ast.Position) (result ResourceUse, present bool)
- func (om *AstPositionResourceUseOrderedMap) GetPair(key ast.Position) *AstPositionResourceUsePair
- func (om *AstPositionResourceUseOrderedMap) Len() int
- func (om *AstPositionResourceUseOrderedMap) Newest() *AstPositionResourceUsePair
- func (om *AstPositionResourceUseOrderedMap) Oldest() *AstPositionResourceUsePair
- func (om *AstPositionResourceUseOrderedMap) Set(key ast.Position, value ResourceUse) (oldValue ResourceUse, present bool)
- type AstPositionResourceUsePair
- type BeforeExtractor
- func (e *BeforeExtractor) ExtractBefore(expression ast.Expression) ast.ExpressionExtraction
- func (e *BeforeExtractor) ExtractFunction(_ *ast.ExpressionExtractor, expression *ast.FunctionExpression) ast.ExpressionExtraction
- func (e *BeforeExtractor) ExtractInvocation(extractor *ast.ExpressionExtractor, expression *ast.InvocationExpression) ast.ExpressionExtraction
- type BinaryOperationKind
- type CapabilityType
- func (t *CapabilityType) BaseType() Type
- func (t *CapabilityType) Equal(other Type) bool
- func (t *CapabilityType) GetMembers() map[string]MemberResolver
- func (t *CapabilityType) ID() TypeID
- func (t *CapabilityType) Instantiate(typeArguments []Type, _ func(err error)) Type
- func (*CapabilityType) IsEquatable() bool
- func (*CapabilityType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *CapabilityType) IsInvalidType() bool
- func (*CapabilityType) IsResourceType() bool
- func (*CapabilityType) IsStorable(_ map[*Member]bool) bool
- func (*CapabilityType) IsType()
- func (t *CapabilityType) QualifiedString() string
- func (t *CapabilityType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *CapabilityType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *CapabilityType) String() string
- func (t *CapabilityType) TypeAnnotationState() TypeAnnotationState
- func (t *CapabilityType) TypeArguments() []Type
- func (t *CapabilityType) TypeParameters() []*TypeParameter
- func (t *CapabilityType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type CheckHandlerFunc
- type Checker
- func (checker *Checker) Check() error
- func (checker *Checker) CheckerError() *CheckerError
- func (checker *Checker) ConvertType(t ast.Type) Type
- func (checker *Checker) ConvertTypeAnnotation(typeAnnotation *ast.TypeAnnotation) *TypeAnnotation
- func (checker *Checker) EntryPointParameters() []*Parameter
- func (checker *Checker) Hints() []Hint
- func (checker *Checker) IsChecked() bool
- func (checker *Checker) ResetErrors()
- func (checker *Checker) ResetHints()
- func (checker *Checker) SubChecker(program *ast.Program, location common.Location) (*Checker, error)
- func (checker *Checker) TypeActivationDepth() int
- func (checker *Checker) UserDefinedValues() map[string]*Variable
- func (checker *Checker) ValueActivationDepth() int
- func (checker *Checker) VisitArrayExpression(expression *ast.ArrayExpression) ast.Repr
- func (checker *Checker) VisitAssignmentStatement(assignment *ast.AssignmentStatement) ast.Repr
- func (checker *Checker) VisitBinaryExpression(expression *ast.BinaryExpression) ast.Repr
- func (checker *Checker) VisitBlock(block *ast.Block) ast.Repr
- func (checker *Checker) VisitBoolExpression(_ *ast.BoolExpression) ast.Repr
- func (checker *Checker) VisitBreakStatement(statement *ast.BreakStatement) ast.Repr
- func (checker *Checker) VisitCastingExpression(expression *ast.CastingExpression) ast.Repr
- func (checker *Checker) VisitCompositeDeclaration(declaration *ast.CompositeDeclaration) ast.Repr
- func (checker *Checker) VisitConditionalExpression(expression *ast.ConditionalExpression) ast.Repr
- func (checker *Checker) VisitContinueStatement(statement *ast.ContinueStatement) ast.Repr
- func (checker *Checker) VisitCreateExpression(expression *ast.CreateExpression) ast.Repr
- func (checker *Checker) VisitDestroyExpression(expression *ast.DestroyExpression) (resultType ast.Repr)
- func (checker *Checker) VisitDictionaryExpression(expression *ast.DictionaryExpression) ast.Repr
- func (checker *Checker) VisitEmitStatement(statement *ast.EmitStatement) ast.Repr
- func (checker *Checker) VisitEnumCaseDeclaration(_ *ast.EnumCaseDeclaration) ast.Repr
- func (checker *Checker) VisitExpressionStatement(statement *ast.ExpressionStatement) ast.Repr
- func (checker *Checker) VisitFieldDeclaration(_ *ast.FieldDeclaration) ast.Repr
- func (checker *Checker) VisitFixedPointExpression(expression *ast.FixedPointExpression) ast.Repr
- func (checker *Checker) VisitForStatement(statement *ast.ForStatement) ast.Repr
- func (checker *Checker) VisitForceExpression(expression *ast.ForceExpression) ast.Repr
- func (checker *Checker) VisitFunctionBlock(functionBlock *ast.FunctionBlock) ast.Repr
- func (checker *Checker) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) ast.Repr
- func (checker *Checker) VisitFunctionExpression(expression *ast.FunctionExpression) ast.Repr
- func (checker *Checker) VisitIdentifierExpression(expression *ast.IdentifierExpression) ast.Repr
- func (checker *Checker) VisitIfStatement(statement *ast.IfStatement) ast.Repr
- func (checker *Checker) VisitImportDeclaration(_ *ast.ImportDeclaration) ast.Repr
- func (checker *Checker) VisitIndexExpression(expression *ast.IndexExpression) ast.Repr
- func (checker *Checker) VisitIntegerExpression(_ *ast.IntegerExpression) ast.Repr
- func (checker *Checker) VisitInterfaceDeclaration(declaration *ast.InterfaceDeclaration) ast.Repr
- func (checker *Checker) VisitInvocationExpression(invocationExpression *ast.InvocationExpression) ast.Repr
- func (checker *Checker) VisitMemberExpression(expression *ast.MemberExpression) ast.Repr
- func (checker *Checker) VisitNilExpression(_ *ast.NilExpression) ast.Repr
- func (checker *Checker) VisitPathExpression(expression *ast.PathExpression) ast.Repr
- func (checker *Checker) VisitPragmaDeclaration(p *ast.PragmaDeclaration) ast.Repr
- func (checker *Checker) VisitProgram(program *ast.Program) ast.Repr
- func (checker *Checker) VisitReferenceExpression(referenceExpression *ast.ReferenceExpression) ast.Repr
- func (checker *Checker) VisitReturnStatement(statement *ast.ReturnStatement) ast.Repr
- func (checker *Checker) VisitStringExpression(_ *ast.StringExpression) ast.Repr
- func (checker *Checker) VisitSwapStatement(swap *ast.SwapStatement) ast.Repr
- func (checker *Checker) VisitSwitchStatement(statement *ast.SwitchStatement) ast.Repr
- func (checker *Checker) VisitTransactionDeclaration(declaration *ast.TransactionDeclaration) ast.Repr
- func (checker *Checker) VisitUnaryExpression(expression *ast.UnaryExpression) ast.Repr
- func (checker *Checker) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ast.Repr
- func (checker *Checker) VisitWhileStatement(statement *ast.WhileStatement) ast.Repr
- type CheckerError
- type CompositeKindMismatchError
- type CompositeKindedType
- type CompositeType
- func (t *CompositeType) Equal(other Type) bool
- func (t *CompositeType) ExplicitInterfaceConformanceSet() *InterfaceSet
- func (t *CompositeType) GetCompositeKind() common.CompositeKind
- func (t *CompositeType) GetContainerType() Type
- func (t *CompositeType) GetLocation() common.Location
- func (t *CompositeType) GetMembers() map[string]MemberResolver
- func (t *CompositeType) GetNestedTypes() *StringTypeOrderedMap
- func (t *CompositeType) ID() TypeID
- func (t *CompositeType) InterfaceType() *InterfaceType
- func (t *CompositeType) IsEquatable() bool
- func (t *CompositeType) IsExternallyReturnable(results map[*Member]bool) bool
- func (*CompositeType) IsInvalidType() bool
- func (t *CompositeType) IsResourceType() bool
- func (t *CompositeType) IsStorable(results map[*Member]bool) bool
- func (*CompositeType) IsType()
- func (t *CompositeType) QualifiedIdentifier() string
- func (t *CompositeType) QualifiedString() string
- func (t *CompositeType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *CompositeType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
- func (t *CompositeType) String() string
- func (*CompositeType) TypeAnnotationState() TypeAnnotationState
- func (t *CompositeType) TypeRequirements() []*CompositeType
- func (*CompositeType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type ConformanceError
- type ConstantSizedArrayLiteralSizeError
- type ConstantSizedType
- func (*ConstantSizedType) AllowsValueIndexingAssignment() bool
- func (t *ConstantSizedType) ElementType(_ bool) Type
- func (t *ConstantSizedType) Equal(other Type) bool
- func (t *ConstantSizedType) GetMembers() map[string]MemberResolver
- func (t *ConstantSizedType) ID() TypeID
- func (t *ConstantSizedType) IndexingType() Type
- func (*ConstantSizedType) IsEquatable() bool
- func (t *ConstantSizedType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *ConstantSizedType) IsInvalidType() bool
- func (t *ConstantSizedType) IsResourceType() bool
- func (t *ConstantSizedType) IsStorable(results map[*Member]bool) bool
- func (*ConstantSizedType) IsType()
- func (t *ConstantSizedType) QualifiedString() string
- func (t *ConstantSizedType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *ConstantSizedType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *ConstantSizedType) String() string
- func (t *ConstantSizedType) TypeAnnotationState() TypeAnnotationState
- func (t *ConstantSizedType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type ConstructorFunctionType
- type ContainedType
- type ContainerKind
- type ContainerType
- type ControlStatementError
- type CryptoAlgorithm
- type CyclicImportsError
- type DeclarationKindMismatchError
- type DictionaryEntryType
- type DictionaryType
- func (*DictionaryType) AllowsValueIndexingAssignment() bool
- func (t *DictionaryType) ElementType(_ bool) Type
- func (t *DictionaryType) Equal(other Type) bool
- func (t *DictionaryType) GetMembers() map[string]MemberResolver
- func (t *DictionaryType) ID() TypeID
- func (t *DictionaryType) IndexingType() Type
- func (*DictionaryType) IsEquatable() bool
- func (t *DictionaryType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *DictionaryType) IsInvalidType() bool
- func (t *DictionaryType) IsResourceType() bool
- func (t *DictionaryType) IsStorable(results map[*Member]bool) bool
- func (*DictionaryType) IsType()
- func (t *DictionaryType) QualifiedString() string
- func (t *DictionaryType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *DictionaryType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *DictionaryType) String() string
- func (t *DictionaryType) TypeAnnotationState() TypeAnnotationState
- func (t *DictionaryType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type DuplicateConformanceError
- type Elaboration
- type ElaborationImport
- func (i ElaborationImport) AllTypeElements() *StringImportElementOrderedMap
- func (i ElaborationImport) AllValueElements() *StringImportElementOrderedMap
- func (i ElaborationImport) IsChecking() bool
- func (i ElaborationImport) IsImportableType(name string) bool
- func (i ElaborationImport) IsImportableValue(name string) bool
- type EmitImportedEventError
- type EmitNonEventError
- type EnumInfo
- type FieldTypeNotStorableError
- type FieldUninitializedError
- type FixedPointNumericType
- func (t *FixedPointNumericType) Equal(other Type) bool
- func (t *FixedPointNumericType) GetMembers() map[string]MemberResolver
- func (t *FixedPointNumericType) ID() TypeID
- func (*FixedPointNumericType) IsEquatable() bool
- func (*FixedPointNumericType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (*FixedPointNumericType) IsInvalidType() bool
- func (*FixedPointNumericType) IsResourceType() bool
- func (*FixedPointNumericType) IsStorable(_ map[*Member]bool) bool
- func (*FixedPointNumericType) IsType()
- func (t *FixedPointNumericType) MaxFractional() *big.Int
- func (t *FixedPointNumericType) MaxInt() *big.Int
- func (t *FixedPointNumericType) MinFractional() *big.Int
- func (t *FixedPointNumericType) MinInt() *big.Int
- func (t *FixedPointNumericType) QualifiedString() string
- func (t *FixedPointNumericType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *FixedPointNumericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
- func (t *FixedPointNumericType) Scale() uint
- func (t *FixedPointNumericType) String() string
- func (t *FixedPointNumericType) SupportsSaturatingAdd() bool
- func (t *FixedPointNumericType) SupportsSaturatingDivide() bool
- func (t *FixedPointNumericType) SupportsSaturatingMultiply() bool
- func (t *FixedPointNumericType) SupportsSaturatingSubtract() bool
- func (*FixedPointNumericType) TypeAnnotationState() TypeAnnotationState
- func (*FixedPointNumericType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- func (t *FixedPointNumericType) WithFractionalRange(minFractional *big.Int, maxFractional *big.Int) *FixedPointNumericType
- func (t *FixedPointNumericType) WithIntRange(minInt *big.Int, maxInt *big.Int) *FixedPointNumericType
- func (t *FixedPointNumericType) WithSaturatingAdd() *FixedPointNumericType
- func (t *FixedPointNumericType) WithSaturatingDivide() *FixedPointNumericType
- func (t *FixedPointNumericType) WithSaturatingMultiply() *FixedPointNumericType
- func (t *FixedPointNumericType) WithSaturatingSubtract() *FixedPointNumericType
- func (t *FixedPointNumericType) WithScale(scale uint) *FixedPointNumericType
- type FractionalRangedType
- type FunctionActivation
- type FunctionActivations
- func (a *FunctionActivations) Current() *FunctionActivation
- func (a *FunctionActivations) EnterFunction(functionType *FunctionType, valueActivationDepth int)
- func (a *FunctionActivations) IsLocal() bool
- func (a *FunctionActivations) LeaveFunction()
- func (a *FunctionActivations) WithFunction(functionType *FunctionType, valueActivationDepth int, f func())
- func (a *FunctionActivations) WithLoop(f func())
- func (a *FunctionActivations) WithSwitch(f func())
- type FunctionExpressionInConditionError
- type FunctionType
- func (t *FunctionType) ArgumentLabels() (argumentLabels []string)
- func (t *FunctionType) CheckArgumentExpressions(checker *Checker, argumentExpressions []ast.Expression, ...)
- func (t *FunctionType) Equal(other Type) bool
- func (t *FunctionType) GetMembers() map[string]MemberResolver
- func (t *FunctionType) HasSameArgumentLabels(other *FunctionType) bool
- func (t *FunctionType) ID() TypeID
- func (t *FunctionType) InvocationFunctionType() *FunctionType
- func (*FunctionType) IsEquatable() bool
- func (t *FunctionType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *FunctionType) IsInvalidType() bool
- func (*FunctionType) IsResourceType() bool
- func (t *FunctionType) IsStorable(_ map[*Member]bool) bool
- func (*FunctionType) IsType()
- func (t *FunctionType) QualifiedString() string
- func (t *FunctionType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *FunctionType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *FunctionType) String() string
- func (t *FunctionType) TypeAnnotationState() TypeAnnotationState
- func (t *FunctionType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) (result bool)
- type GenericType
- func (t *GenericType) Equal(other Type) bool
- func (t *GenericType) GetMembers() map[string]MemberResolver
- func (t *GenericType) ID() TypeID
- func (*GenericType) IsEquatable() bool
- func (*GenericType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (*GenericType) IsInvalidType() bool
- func (*GenericType) IsResourceType() bool
- func (*GenericType) IsStorable(_ map[*Member]bool) bool
- func (*GenericType) IsType()
- func (t *GenericType) QualifiedString() string
- func (t *GenericType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *GenericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
- func (t *GenericType) String() string
- func (*GenericType) TypeAnnotationState() TypeAnnotationState
- func (t *GenericType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type HashAlgorithm
- type Hint
- type Import
- type ImportElement
- type ImportHandlerFunc
- type ImportedProgramError
- type IncorrectArgumentLabelError
- type IncorrectTransferOperationError
- type InitializationInfo
- type InitializerMismatch
- type IntegerRangedType
- type InterfaceResourceInfoOrderedMap
- func (om *InterfaceResourceInfoOrderedMap) Clear()
- func (om *InterfaceResourceInfoOrderedMap) Delete(key interface{}) (oldValue ResourceInfo, present bool)
- func (om *InterfaceResourceInfoOrderedMap) Foreach(f func(key interface{}, value ResourceInfo))
- func (om *InterfaceResourceInfoOrderedMap) Get(key interface{}) (result ResourceInfo, present bool)
- func (om *InterfaceResourceInfoOrderedMap) GetPair(key interface{}) *InterfaceResourceInfoPair
- func (om *InterfaceResourceInfoOrderedMap) Len() int
- func (om *InterfaceResourceInfoOrderedMap) Newest() *InterfaceResourceInfoPair
- func (om *InterfaceResourceInfoOrderedMap) Oldest() *InterfaceResourceInfoPair
- func (om *InterfaceResourceInfoOrderedMap) Set(key interface{}, value ResourceInfo) (oldValue ResourceInfo, present bool)
- type InterfaceResourceInfoPair
- type InterfaceSet
- type InterfaceType
- func (t *InterfaceType) Equal(other Type) bool
- func (t *InterfaceType) GetCompositeKind() common.CompositeKind
- func (t *InterfaceType) GetContainerType() Type
- func (t *InterfaceType) GetLocation() common.Location
- func (t *InterfaceType) GetMembers() map[string]MemberResolver
- func (t *InterfaceType) GetNestedTypes() *StringTypeOrderedMap
- func (t *InterfaceType) ID() TypeID
- func (*InterfaceType) IsEquatable() bool
- func (t *InterfaceType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *InterfaceType) IsInvalidType() bool
- func (t *InterfaceType) IsResourceType() bool
- func (t *InterfaceType) IsStorable(results map[*Member]bool) bool
- func (*InterfaceType) IsType()
- func (t *InterfaceType) QualifiedIdentifier() string
- func (t *InterfaceType) QualifiedString() string
- func (t *InterfaceType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *InterfaceType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *InterfaceType) String() string
- func (*InterfaceType) TypeAnnotationState() TypeAnnotationState
- func (*InterfaceType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type InterfaceTypeStructOrderedMap
- func (om *InterfaceTypeStructOrderedMap) Clear()
- func (om *InterfaceTypeStructOrderedMap) Delete(key *InterfaceType) (oldValue struct{}, present bool)
- func (om *InterfaceTypeStructOrderedMap) Foreach(f func(key *InterfaceType, value struct{}))
- func (om *InterfaceTypeStructOrderedMap) Get(key *InterfaceType) (result struct{}, present bool)
- func (om *InterfaceTypeStructOrderedMap) GetPair(key *InterfaceType) *InterfaceTypeStructPair
- func (om *InterfaceTypeStructOrderedMap) Len() int
- func (om *InterfaceTypeStructOrderedMap) Newest() *InterfaceTypeStructPair
- func (om *InterfaceTypeStructOrderedMap) Oldest() *InterfaceTypeStructPair
- func (om *InterfaceTypeStructOrderedMap) Set(key *InterfaceType, value struct{}) (oldValue struct{}, present bool)
- type InterfaceTypeStructPair
- type InvalidAccessError
- type InvalidAccessModifierError
- type InvalidAddressLiteralError
- type InvalidAssignmentAccessError
- type InvalidAssignmentTargetError
- type InvalidBinaryOperandError
- type InvalidBinaryOperandsError
- type InvalidCharacterLiteralError
- type InvalidConformanceError
- type InvalidConstantSizedTypeBaseError
- type InvalidConstantSizedTypeSizeError
- type InvalidConstructionError
- type InvalidDeclarationError
- type InvalidDestructionError
- type InvalidDestructorError
- type InvalidDestructorParametersError
- type InvalidDictionaryKeyTypeError
- type InvalidEntryPointTypeError
- type InvalidEnumCaseError
- type InvalidEnumConformancesError
- type InvalidEnumRawTypeError
- type InvalidEventParameterTypeError
- type InvalidEventUsageError
- type InvalidFailableResourceDowncastOutsideOptionalBindingError
- type InvalidFixedPointLiteralRangeError
- type InvalidFixedPointLiteralScaleError
- type InvalidImplementationError
- type InvalidIndexingError
- type InvalidIntegerLiteralRangeError
- type InvalidInterfaceDeclarationError
- type InvalidInterfaceTypeError
- type InvalidMoveError
- type InvalidMoveOperationError
- type InvalidNameError
- type InvalidNestedDeclarationError
- type InvalidNestedResourceMoveError
- type InvalidNestedTypeError
- type InvalidNilCoalescingRightResourceOperandError
- type InvalidNonConformanceRestrictionError
- type InvalidNonEnumCaseError
- type InvalidNonIdentifierFailableResourceDowncast
- type InvalidNonStorableTransactionParameterTypeError
- type InvalidOptionalChainingError
- type InvalidPathDomainError
- type InvalidPragmaError
- type InvalidResourceAnnotationError
- type InvalidResourceArrayMemberError
- type InvalidResourceAssignmentError
- type InvalidResourceCreationError
- type InvalidResourceDictionaryMemberError
- type InvalidResourceFieldError
- type InvalidResourceOptionalMemberError
- type InvalidResourceTransactionParameterError
- type InvalidRestrictedTypeError
- type InvalidRestrictedTypeMemberAccessError
- type InvalidRestrictionTypeDuplicateError
- type InvalidRestrictionTypeError
- type InvalidReturnValueError
- type InvalidSelfInvalidationError
- type InvalidSwapExpressionError
- type InvalidTopLevelDeclarationError
- type InvalidTransactionBlockError
- type InvalidTransactionFieldAccessModifierError
- type InvalidTransactionPrepareParameterTypeError
- type InvalidTypeArgumentCountError
- type InvalidUnaryOperandError
- type InvalidVariableKindError
- type InvokableType
- type LocatedType
- type LocationHandlerFunc
- type Member
- func NewPublicConstantFieldMember(containerType Type, identifier string, fieldType Type, docString string) *Member
- func NewPublicEnumCaseMember(caseType Type, identifier string, docString string) *Member
- func NewPublicFunctionMember(containerType Type, identifier string, invokableType InvokableType, ...) *Member
- type MemberAccess
- type MemberAccesses
- type MemberAstFieldDeclarationOrderedMap
- func (om *MemberAstFieldDeclarationOrderedMap) Clear()
- func (om *MemberAstFieldDeclarationOrderedMap) Delete(key *Member) (oldValue *ast.FieldDeclaration, present bool)
- func (om *MemberAstFieldDeclarationOrderedMap) Foreach(f func(key *Member, value *ast.FieldDeclaration))
- func (om *MemberAstFieldDeclarationOrderedMap) Get(key *Member) (result *ast.FieldDeclaration, present bool)
- func (om *MemberAstFieldDeclarationOrderedMap) GetPair(key *Member) *MemberAstFieldDeclarationPair
- func (om *MemberAstFieldDeclarationOrderedMap) Len() int
- func (om *MemberAstFieldDeclarationOrderedMap) Newest() *MemberAstFieldDeclarationPair
- func (om *MemberAstFieldDeclarationOrderedMap) Oldest() *MemberAstFieldDeclarationPair
- func (om *MemberAstFieldDeclarationOrderedMap) Set(key *Member, value *ast.FieldDeclaration) (oldValue *ast.FieldDeclaration, present bool)
- type MemberAstFieldDeclarationPair
- type MemberInfo
- type MemberMismatch
- type MemberMismatchNote
- type MemberResolver
- type MemberSet
- type MemberStructOrderedMap
- func (om *MemberStructOrderedMap) Clear()
- func (om *MemberStructOrderedMap) Delete(key *Member) (oldValue struct{}, present bool)
- func (om *MemberStructOrderedMap) Foreach(f func(key *Member, value struct{}))
- func (om *MemberStructOrderedMap) Get(key *Member) (result struct{}, present bool)
- func (om *MemberStructOrderedMap) GetPair(key *Member) *MemberStructPair
- func (om *MemberStructOrderedMap) Len() int
- func (om *MemberStructOrderedMap) Newest() *MemberStructPair
- func (om *MemberStructOrderedMap) Oldest() *MemberStructPair
- func (om *MemberStructOrderedMap) Set(key *Member, value struct{}) (oldValue struct{}, present bool)
- type MemberStructPair
- type MissingAccessModifierError
- type MissingArgumentLabelError
- type MissingConformanceError
- type MissingCreateError
- type MissingDestructorError
- type MissingEntryPointError
- type MissingEnumRawTypeError
- type MissingFunctionBodyError
- type MissingInitializerError
- type MissingLocationError
- type MissingMoveOperationError
- type MissingResourceAnnotationError
- type MissingReturnStatementError
- type MissingReturnValueError
- type MissingSwitchCaseStatementsError
- type NonReferenceTypeReferenceError
- type NonResourceTypeError
- type NotCallableError
- type NotDeclaredError
- type NotDeclaredMemberError
- type NotEquatableTypeError
- type NotExportedError
- type NotIndexableTypeError
- type NotIndexingAssignableTypeError
- type NotIndexingTypeError
- type NumericType
- func (t *NumericType) Equal(other Type) bool
- func (t *NumericType) GetMembers() map[string]MemberResolver
- func (t *NumericType) ID() TypeID
- func (*NumericType) IsEquatable() bool
- func (*NumericType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (*NumericType) IsInvalidType() bool
- func (*NumericType) IsResourceType() bool
- func (*NumericType) IsStorable(_ map[*Member]bool) bool
- func (*NumericType) IsType()
- func (t *NumericType) MaxInt() *big.Int
- func (t *NumericType) MinInt() *big.Int
- func (t *NumericType) QualifiedString() string
- func (t *NumericType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *NumericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
- func (t *NumericType) String() string
- func (t *NumericType) SupportsSaturatingAdd() bool
- func (t *NumericType) SupportsSaturatingDivide() bool
- func (t *NumericType) SupportsSaturatingMultiply() bool
- func (t *NumericType) SupportsSaturatingSubtract() bool
- func (*NumericType) TypeAnnotationState() TypeAnnotationState
- func (*NumericType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- func (t *NumericType) WithIntRange(min *big.Int, max *big.Int) *NumericType
- func (t *NumericType) WithSaturatingAdd() *NumericType
- func (t *NumericType) WithSaturatingDivide() *NumericType
- func (t *NumericType) WithSaturatingMultiply() *NumericType
- func (t *NumericType) WithSaturatingSubtract() *NumericType
- type Occurrence
- type Occurrences
- type Option
- func WithAccessCheckMode(mode AccessCheckMode) Option
- func WithCheckHandler(handler CheckHandlerFunc) Option
- func WithImportHandler(handler ImportHandlerFunc) Option
- func WithLocationHandler(handler LocationHandlerFunc) Option
- func WithOriginsAndOccurrencesEnabled(enabled bool) Option
- func WithPredeclaredTypes(predeclaredTypes []TypeDeclaration) Option
- func WithPredeclaredValues(predeclaredValues []ValueDeclaration) Option
- func WithValidTopLevelDeclarationsHandler(handler ValidTopLevelDeclarationsHandlerFunc) Option
- type OptionalType
- func (t *OptionalType) Equal(other Type) bool
- func (t *OptionalType) GetMembers() map[string]MemberResolver
- func (t *OptionalType) ID() TypeID
- func (t *OptionalType) IsEquatable() bool
- func (t *OptionalType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *OptionalType) IsInvalidType() bool
- func (t *OptionalType) IsResourceType() bool
- func (t *OptionalType) IsStorable(results map[*Member]bool) bool
- func (*OptionalType) IsType()
- func (t *OptionalType) QualifiedString() string
- func (t *OptionalType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *OptionalType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *OptionalType) String() string
- func (t *OptionalType) TypeAnnotationState() TypeAnnotationState
- func (t *OptionalType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type OptionalTypeReferenceError
- type Origin
- type Parameter
- type ParameterizedType
- type Position
- type PostConditionsRewrite
- type ReadOnlyTargetAssignmentError
- type RedeclarationError
- type RedeclarationNote
- type ReferenceType
- func (t *ReferenceType) AllowsValueIndexingAssignment() bool
- func (t *ReferenceType) ElementType(isAssignment bool) Type
- func (t *ReferenceType) Equal(other Type) bool
- func (t *ReferenceType) GetMembers() map[string]MemberResolver
- func (t *ReferenceType) ID() TypeID
- func (t *ReferenceType) IndexingType() Type
- func (*ReferenceType) IsEquatable() bool
- func (t *ReferenceType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *ReferenceType) IsInvalidType() bool
- func (t *ReferenceType) IsResourceType() bool
- func (t *ReferenceType) IsStorable(_ map[*Member]bool) bool
- func (*ReferenceType) IsType()
- func (t *ReferenceType) QualifiedString() string
- func (t *ReferenceType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *ReferenceType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *ReferenceType) String() string
- func (*ReferenceType) TypeAnnotationState() TypeAnnotationState
- func (*ReferenceType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type RemovalHint
- type ReplacementHint
- type ResolvedLocation
- type ResourceCapturingError
- type ResourceFieldNotInvalidatedError
- type ResourceInfo
- type ResourceInvalidation
- type ResourceInvalidationKind
- type ResourceInvalidationNote
- type ResourceInvalidationStructOrderedMap
- func (om *ResourceInvalidationStructOrderedMap) Clear()
- func (om *ResourceInvalidationStructOrderedMap) Delete(key ResourceInvalidation) (oldValue struct{}, present bool)
- func (om *ResourceInvalidationStructOrderedMap) Foreach(f func(key ResourceInvalidation, value struct{}))
- func (om *ResourceInvalidationStructOrderedMap) Get(key ResourceInvalidation) (result struct{}, present bool)
- func (om *ResourceInvalidationStructOrderedMap) GetPair(key ResourceInvalidation) *ResourceInvalidationStructPair
- func (om *ResourceInvalidationStructOrderedMap) Len() int
- func (om *ResourceInvalidationStructOrderedMap) Newest() *ResourceInvalidationStructPair
- func (om *ResourceInvalidationStructOrderedMap) Oldest() *ResourceInvalidationStructPair
- func (om *ResourceInvalidationStructOrderedMap) Set(key ResourceInvalidation, value struct{}) (oldValue struct{}, present bool)
- type ResourceInvalidationStructPair
- type ResourceInvalidations
- func (ris *ResourceInvalidations) Add(invalidation ResourceInvalidation)
- func (ris ResourceInvalidations) All() (result []ResourceInvalidation)
- func (ris *ResourceInvalidations) Clone() ResourceInvalidations
- func (ris ResourceInvalidations) Contains(invalidation ResourceInvalidation) bool
- func (ris *ResourceInvalidations) DeleteLocally(invalidation ResourceInvalidation)
- func (ris *ResourceInvalidations) ForEach(cb func(invalidation ResourceInvalidation) error) error
- func (ris ResourceInvalidations) IsEmpty() bool
- func (ris *ResourceInvalidations) Merge(other ResourceInvalidations)
- func (ris ResourceInvalidations) Size() int
- type ResourceLossError
- type ResourceMethodBindingError
- type ResourceUse
- type ResourceUseAfterInvalidationError
- func (e *ResourceUseAfterInvalidationError) Cause() (wasMoved, wasDestroyed bool)
- func (e *ResourceUseAfterInvalidationError) EndPosition() ast.Position
- func (e *ResourceUseAfterInvalidationError) Error() string
- func (e *ResourceUseAfterInvalidationError) ErrorNotes() (notes []errors.ErrorNote)
- func (e *ResourceUseAfterInvalidationError) HasInvalidationInPreviousLoopIteration() (result bool)
- func (e *ResourceUseAfterInvalidationError) SecondaryError() string
- func (e *ResourceUseAfterInvalidationError) StartPosition() ast.Position
- type ResourceUses
- func (rus *ResourceUses) Add(pos ast.Position)
- func (rus *ResourceUses) Clone() ResourceUses
- func (rus ResourceUses) Contains(pos ast.Position) bool
- func (rus *ResourceUses) ForEach(cb func(pos ast.Position, use ResourceUse) error) error
- func (rus ResourceUses) IsUseAfterInvalidationReported(pos ast.Position) bool
- func (rus *ResourceUses) MarkUseAfterInvalidationReported(pos ast.Position)
- func (rus *ResourceUses) Merge(other ResourceUses)
- func (rus ResourceUses) Size() int
- type Resources
- func (ris *Resources) AddInvalidation(resource interface{}, invalidation ResourceInvalidation)
- func (ris *Resources) AddUse(resource interface{}, use ast.Position)
- func (ris *Resources) Clone() *Resources
- func (ris *Resources) ForEach(f func(resource interface{}, info ResourceInfo))
- func (ris *Resources) Get(resource interface{}) ResourceInfo
- func (ris *Resources) IsUseAfterInvalidationReported(resource interface{}, pos ast.Position) bool
- func (ris *Resources) MarkUseAfterInvalidationReported(resource interface{}, pos ast.Position)
- func (ris *Resources) MergeBranches(thenResources *Resources, elseResources *Resources)
- func (ris *Resources) RemoveTemporaryMoveInvalidation(resource interface{}, invalidation ResourceInvalidation)
- func (ris *Resources) Size() int
- func (ris *Resources) String() string
- type RestrictedType
- func (t *RestrictedType) Equal(other Type) bool
- func (t *RestrictedType) GetMembers() map[string]MemberResolver
- func (t *RestrictedType) ID() TypeID
- func (*RestrictedType) IsEquatable() bool
- func (t *RestrictedType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *RestrictedType) IsInvalidType() bool
- func (t *RestrictedType) IsResourceType() bool
- func (t *RestrictedType) IsStorable(results map[*Member]bool) bool
- func (*RestrictedType) IsType()
- func (t *RestrictedType) QualifiedString() string
- func (t *RestrictedType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *RestrictedType) RestrictionSet() *InterfaceSet
- func (t *RestrictedType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *RestrictedType) String() string
- func (*RestrictedType) TypeAnnotationState() TypeAnnotationState
- func (*RestrictedType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type RestrictionCompositeKindMismatchError
- type RestrictionMemberClashError
- type ReturnInfo
- type SaturatingArithmeticType
- type SemanticError
- type SignatureAlgorithm
- type SimpleType
- func (t *SimpleType) AllowsValueIndexingAssignment() bool
- func (t *SimpleType) ElementType(isAssignment bool) Type
- func (t *SimpleType) Equal(other Type) bool
- func (t *SimpleType) GetMembers() map[string]MemberResolver
- func (t *SimpleType) GetNestedTypes() *StringTypeOrderedMap
- func (t *SimpleType) ID() TypeID
- func (t *SimpleType) IndexingType() Type
- func (t *SimpleType) IsEquatable() bool
- func (t *SimpleType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *SimpleType) IsInvalidType() bool
- func (t *SimpleType) IsResourceType() bool
- func (t *SimpleType) IsStorable(_ map[*Member]bool) bool
- func (*SimpleType) IsType()
- func (t *SimpleType) QualifiedString() string
- func (t *SimpleType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *SimpleType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *SimpleType) String() string
- func (*SimpleType) TypeAnnotationState() TypeAnnotationState
- func (*SimpleType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type StringImportElementOrderedMap
- func (om *StringImportElementOrderedMap) Clear()
- func (om *StringImportElementOrderedMap) Delete(key string) (oldValue ImportElement, present bool)
- func (om *StringImportElementOrderedMap) Foreach(f func(key string, value ImportElement))
- func (om *StringImportElementOrderedMap) Get(key string) (result ImportElement, present bool)
- func (om *StringImportElementOrderedMap) GetPair(key string) *StringImportElementPair
- func (om *StringImportElementOrderedMap) Len() int
- func (om *StringImportElementOrderedMap) Newest() *StringImportElementPair
- func (om *StringImportElementOrderedMap) Oldest() *StringImportElementPair
- func (om *StringImportElementOrderedMap) Set(key string, value ImportElement) (oldValue ImportElement, present bool)
- type StringImportElementPair
- type StringMemberOrderedMap
- func (om *StringMemberOrderedMap) Clear()
- func (om *StringMemberOrderedMap) Delete(key string) (oldValue *Member, present bool)
- func (om *StringMemberOrderedMap) Foreach(f func(key string, value *Member))
- func (om *StringMemberOrderedMap) Get(key string) (result *Member, present bool)
- func (om *StringMemberOrderedMap) GetPair(key string) *StringMemberPair
- func (om *StringMemberOrderedMap) Len() int
- func (om *StringMemberOrderedMap) Newest() *StringMemberPair
- func (om *StringMemberOrderedMap) Oldest() *StringMemberPair
- func (om *StringMemberOrderedMap) Set(key string, value *Member) (oldValue *Member, present bool)
- type StringMemberPair
- type StringTypeOrderedMap
- func (om *StringTypeOrderedMap) Clear()
- func (om *StringTypeOrderedMap) Delete(key string) (oldValue Type, present bool)
- func (om *StringTypeOrderedMap) Foreach(f func(key string, value Type))
- func (om *StringTypeOrderedMap) Get(key string) (result Type, present bool)
- func (om *StringTypeOrderedMap) GetPair(key string) *StringTypePair
- func (om *StringTypeOrderedMap) Len() int
- func (om *StringTypeOrderedMap) Newest() *StringTypePair
- func (om *StringTypeOrderedMap) Oldest() *StringTypePair
- func (om *StringTypeOrderedMap) Set(key string, value Type) (oldValue Type, present bool)
- type StringTypePair
- type StringValueDeclarationOrderedMap
- func (om *StringValueDeclarationOrderedMap) Clear()
- func (om *StringValueDeclarationOrderedMap) Delete(key string) (oldValue ValueDeclaration, present bool)
- func (om *StringValueDeclarationOrderedMap) Foreach(f func(key string, value ValueDeclaration))
- func (om *StringValueDeclarationOrderedMap) Get(key string) (result ValueDeclaration, present bool)
- func (om *StringValueDeclarationOrderedMap) GetPair(key string) *StringValueDeclarationPair
- func (om *StringValueDeclarationOrderedMap) Len() int
- func (om *StringValueDeclarationOrderedMap) Newest() *StringValueDeclarationPair
- func (om *StringValueDeclarationOrderedMap) Oldest() *StringValueDeclarationPair
- func (om *StringValueDeclarationOrderedMap) Set(key string, value ValueDeclaration) (oldValue ValueDeclaration, present bool)
- type StringValueDeclarationPair
- type StringVariableOrderedMap
- func (om *StringVariableOrderedMap) Clear()
- func (om *StringVariableOrderedMap) Delete(key string) (oldValue *Variable, present bool)
- func (om *StringVariableOrderedMap) Foreach(f func(key string, value *Variable))
- func (om *StringVariableOrderedMap) Get(key string) (result *Variable, present bool)
- func (om *StringVariableOrderedMap) GetPair(key string) *StringVariablePair
- func (om *StringVariableOrderedMap) Len() int
- func (om *StringVariableOrderedMap) Newest() *StringVariablePair
- func (om *StringVariableOrderedMap) Oldest() *StringVariablePair
- func (om *StringVariableOrderedMap) Set(key string, value *Variable) (oldValue *Variable, present bool)
- type StringVariablePair
- type SwitchDefaultPositionError
- type TransactionMissingPrepareError
- type TransactionType
- func (t *TransactionType) EntryPointFunctionType() *FunctionType
- func (*TransactionType) Equal(other Type) bool
- func (*TransactionType) ExecuteFunctionType() *ConstructorFunctionType
- func (t *TransactionType) GetMembers() map[string]MemberResolver
- func (*TransactionType) ID() TypeID
- func (*TransactionType) IsEquatable() bool
- func (*TransactionType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (*TransactionType) IsInvalidType() bool
- func (*TransactionType) IsResourceType() bool
- func (*TransactionType) IsStorable(_ map[*Member]bool) bool
- func (*TransactionType) IsType()
- func (t *TransactionType) PrepareFunctionType() *ConstructorFunctionType
- func (*TransactionType) QualifiedString() string
- func (t *TransactionType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *TransactionType) RewriteWithRestrictedTypes() (Type, bool)
- func (*TransactionType) String() string
- func (*TransactionType) TypeAnnotationState() TypeAnnotationState
- func (*TransactionType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type Type
- type TypeAnnotation
- type TypeAnnotationRequiredError
- type TypeAnnotationState
- type TypeCheckFunc
- type TypeDeclaration
- type TypeID
- type TypeMismatchError
- type TypeMismatchWithDescriptionError
- type TypeParameter
- type TypeParameterTypeInferenceError
- type TypeParameterTypeMismatchError
- type TypeParameterTypeOrderedMap
- func (om *TypeParameterTypeOrderedMap) Clear()
- func (om *TypeParameterTypeOrderedMap) Delete(key *TypeParameter) (oldValue Type, present bool)
- func (om *TypeParameterTypeOrderedMap) Foreach(f func(key *TypeParameter, value Type))
- func (om *TypeParameterTypeOrderedMap) Get(key *TypeParameter) (result Type, present bool)
- func (om *TypeParameterTypeOrderedMap) GetPair(key *TypeParameter) *TypeParameterTypePair
- func (om *TypeParameterTypeOrderedMap) Len() int
- func (om *TypeParameterTypeOrderedMap) Newest() *TypeParameterTypePair
- func (om *TypeParameterTypeOrderedMap) Oldest() *TypeParameterTypePair
- func (om *TypeParameterTypeOrderedMap) Set(key *TypeParameter, value Type) (oldValue Type, present bool)
- type TypeParameterTypePair
- type UninitializedFieldAccessError
- type UninitializedUseError
- type UnknownSpecialFunctionError
- type UnparameterizedTypeInstantiationError
- type UnreachableStatementError
- type UnresolvedImportError
- type UnsupportedOptionalChainingAssignmentError
- type UnsupportedOverloadingError
- type UnsupportedResourceForLoopError
- type ValidTopLevelDeclarationsHandlerFunc
- type ValueDeclaration
- type ValueIndexableType
- type ValueIndexingInfo
- type Variable
- type VariableActivation
- func (a *VariableActivation) Clear()
- func (a *VariableActivation) Find(name string) *Variable
- func (a *VariableActivation) ForEach(cb func(string, *Variable) error) error
- func (a *VariableActivation) Set(name string, variable *Variable)
- func (a *VariableActivation) SetParent(parent *VariableActivation)
- type VariableActivations
- func (a *VariableActivations) Current() *VariableActivation
- func (a *VariableActivations) Declare(declaration variableDeclaration) (variable *Variable, err error)
- func (a *VariableActivations) DeclareImplicitConstant(identifier string, ty Type, kind common.DeclarationKind) (*Variable, error)
- func (a *VariableActivations) DeclareType(declaration typeDeclaration) (*Variable, error)
- func (a *VariableActivations) Depth() int
- func (a *VariableActivations) Enter()
- func (a *VariableActivations) Find(name string) *Variable
- func (a *VariableActivations) ForEachVariablesDeclaredInAndBelow(depth int, f func(name string, value *Variable))
- func (a *VariableActivations) Leave()
- func (a *VariableActivations) Set(name string, variable *Variable)
- type VariableSizedType
- func (*VariableSizedType) AllowsValueIndexingAssignment() bool
- func (t *VariableSizedType) ElementType(_ bool) Type
- func (t *VariableSizedType) Equal(other Type) bool
- func (t *VariableSizedType) GetMembers() map[string]MemberResolver
- func (t *VariableSizedType) ID() TypeID
- func (t *VariableSizedType) IndexingType() Type
- func (*VariableSizedType) IsEquatable() bool
- func (t *VariableSizedType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *VariableSizedType) IsInvalidType() bool
- func (t *VariableSizedType) IsResourceType() bool
- func (t *VariableSizedType) IsStorable(results map[*Member]bool) bool
- func (*VariableSizedType) IsType()
- func (t *VariableSizedType) QualifiedString() string
- func (t *VariableSizedType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *VariableSizedType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *VariableSizedType) String() string
- func (t *VariableSizedType) TypeAnnotationState() TypeAnnotationState
- func (t *VariableSizedType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type VirtualImport
Constants ¶
const ( NumberTypeName = "Number" SignedNumberTypeName = "SignedNumber" IntegerTypeName = "Integer" SignedIntegerTypeName = "SignedInteger" FixedPointTypeName = "FixedPoint" SignedFixedPointTypeName = "SignedFixedPoint" IntTypeName = "Int" Int8TypeName = "Int8" Int16TypeName = "Int16" Int32TypeName = "Int32" Int64TypeName = "Int64" Int128TypeName = "Int128" Int256TypeName = "Int256" UIntTypeName = "UInt" UInt8TypeName = "UInt8" UInt16TypeName = "UInt16" UInt32TypeName = "UInt32" UInt64TypeName = "UInt64" UInt128TypeName = "UInt128" UInt256TypeName = "UInt256" Word8TypeName = "Word8" Word16TypeName = "Word16" Word32TypeName = "Word32" Word64TypeName = "Word64" Fix64TypeName = "Fix64" UFix64TypeName = "UFix64" )
const AccountKeyHashAlgoField = "hashAlgorithm"
const AccountKeyIsRevokedField = "isRevoked"
const AccountKeyKeyIndexField = "keyIndex"
const AccountKeyPublicKeyField = "publicKey"
const AccountKeyTypeName = "AccountKey"
const AccountKeyWeightField = "weight"
const AccountKeysAddFunctionName = "add"
const AccountKeysGetFunctionName = "get"
const AccountKeysRevokeFunctionName = "revoke"
const AccountKeysTypeName = "Keys"
const AddressTypeToBytesFunctionName = `toBytes`
const ArgumentLabelNotRequired = "_"
const AuthAccountAddPublicKeyField = "addPublicKey"
const AuthAccountAddressField = "address"
const AuthAccountAvailableBalanceField = "availableBalance"
const AuthAccountBalanceField = "balance"
const AuthAccountBorrowField = "borrow"
const AuthAccountContractsField = "contracts"
const AuthAccountContractsTypeAddFunctionName = "add"
const AuthAccountContractsTypeGetFunctionName = "get"
const AuthAccountContractsTypeName = "Contracts"
const AuthAccountContractsTypeRemoveFunctionName = "remove"
const AuthAccountContractsTypeUpdateExperimentalFunctionName = "update__experimental"
const AuthAccountCopyField = "copy"
const AuthAccountGetCapabilityField = "getCapability"
const AuthAccountGetLinkTargetField = "getLinkTarget"
const AuthAccountKeysField = "keys"
const AuthAccountLinkField = "link"
const AuthAccountLoadField = "load"
const AuthAccountRemovePublicKeyField = "removePublicKey"
const AuthAccountSaveField = "save"
const AuthAccountStorageCapacityField = "storageCapacity"
const AuthAccountStorageUsedField = "storageUsed"
const AuthAccountTypeName = "AuthAccount"
const AuthAccountUnlinkField = "unlink"
const BeforeIdentifier = "before"
const BlockIDSize = 32
const DeployedContractTypeAddressFieldName = "address"
const DeployedContractTypeCodeFieldName = "code"
const DeployedContractTypeNameFieldName = "name"
const EnumRawValueFieldName = "rawValue"
const Fix64Factor = fixedpoint.Fix64Factor
const Fix64Scale = fixedpoint.Fix64Scale
const Fix64TypeMaxFractional = fixedpoint.Fix64TypeMaxFractional
const Fix64TypeMaxInt = fixedpoint.Fix64TypeMaxInt
const Fix64TypeMinFractional = fixedpoint.Fix64TypeMinFractional
const Fix64TypeMinInt = fixedpoint.Fix64TypeMinInt
const FunctionEntryPointName = "main"
const GetTypeFunctionName = "getType"
const HashAlgorithmDocStringSHA2_256 = `
SHA2_256 is Secure Hashing Algorithm 2 (SHA-2) with a 256-bit digest
`
const HashAlgorithmDocStringSHA2_384 = `
SHA2_384 is Secure Hashing Algorithm 2 (SHA-2) with a 384-bit digest
`
const HashAlgorithmDocStringSHA3_256 = `
SHA3_256 is Secure Hashing Algorithm 3 (SHA-3) with a 256-bit digest
`
const HashAlgorithmDocStringSHA3_384 = `
SHA3_384 is Secure Hashing Algorithm 3 (SHA-3) with a 384-bit digest
`
const HashAlgorithmTypeName = "HashAlgorithm"
const IsInstanceFunctionName = "isInstance"
const NumberTypeMaxFieldName = "max"
const NumberTypeMinFieldName = "min"
const NumericTypeSaturatingAddFunctionName = "saturatingAdd"
const NumericTypeSaturatingDivideFunctionName = "saturatingDivide"
const NumericTypeSaturatingMultiplyFunctionName = "saturatingMultiply"
const NumericTypeSaturatingSubtractFunctionName = "saturatingSubtract"
const PublicAccountAddressField = "address"
const PublicAccountAvailableBalanceField = "availableBalance"
const PublicAccountBalanceField = "balance"
const PublicAccountGetCapabilityField = "getCapability"
const PublicAccountGetTargetLinkField = "getLinkTarget"
const PublicAccountKeysField = "keys"
const PublicAccountStorageCapacityField = "storageCapacity"
const PublicAccountStorageUsedField = "storageUsed"
const PublicAccountTypeName = "PublicAccount"
const PublicKeyPublicKeyField = "publicKey"
const PublicKeySignAlgoField = "signatureAlgorithm"
const PublicKeyTypeName = "PublicKey"
const ResourceOwnerFieldName = "owner"
const ResourceUUIDFieldName = "uuid"
const ResultIdentifier = "result"
const SelfIdentifier = "self"
const SignatureAlgorithmDocStringECDSA_P256 = `
ECDSA_P256 is Elliptic Curve Digital Signature Algorithm (ECDSA) on the NIST P-256 curve
`
const SignatureAlgorithmDocStringECDSA_Secp256k1 = `
ECDSA_Secp256k1 is Elliptic Curve Digital Signature Algorithm (ECDSA) on the secp256k1 curve
`
const SignatureAlgorithmTypeName = "SignatureAlgorithm"
const ToBigEndianBytesFunctionName = "toBigEndianBytes"
const ToStringFunctionName = "toString"
const UFix64TypeMaxFractional = fixedpoint.UFix64TypeMaxFractional
const UFix64TypeMaxInt = fixedpoint.UFix64TypeMaxInt
const UFix64TypeMinFractional = fixedpoint.UFix64TypeMinFractional
const UFix64TypeMinInt = fixedpoint.UFix64TypeMinInt
Variables ¶
var ( // NumberType represents the super-type of all number types NumberType = NewNumericType(NumberTypeName) // SignedNumberType represents the super-type of all signed number types SignedNumberType = NewNumericType(SignedNumberTypeName) // IntegerType represents the super-type of all integer types IntegerType = NewNumericType(IntegerTypeName) // SignedIntegerType represents the super-type of all signed integer types SignedIntegerType = NewNumericType(SignedIntegerTypeName) // IntType represents the arbitrary-precision integer type `Int` IntType = NewNumericType(IntTypeName) // Int8Type represents the 8-bit signed integer type `Int8` Int8Type = NewNumericType(Int8TypeName). WithIntRange(Int8TypeMinInt, Int8TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int16Type represents the 16-bit signed integer type `Int16` Int16Type = NewNumericType(Int16TypeName). WithIntRange(Int16TypeMinInt, Int16TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int32Type represents the 32-bit signed integer type `Int32` Int32Type = NewNumericType(Int32TypeName). WithIntRange(Int32TypeMinInt, Int32TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int64Type represents the 64-bit signed integer type `Int64` Int64Type = NewNumericType(Int64TypeName). WithIntRange(Int64TypeMinInt, Int64TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int128Type represents the 128-bit signed integer type `Int128` Int128Type = NewNumericType(Int128TypeName). WithIntRange(Int128TypeMinIntBig, Int128TypeMaxIntBig). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int256Type represents the 256-bit signed integer type `Int256` Int256Type = NewNumericType(Int256TypeName). WithIntRange(Int256TypeMinIntBig, Int256TypeMaxIntBig). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // UIntType represents the arbitrary-precision unsigned integer type `UInt` UIntType = NewNumericType(UIntTypeName). WithIntRange(UIntTypeMin, nil). WithSaturatingSubtract() // UInt8Type represents the 8-bit unsigned integer type `UInt8` // which checks for overflow and underflow UInt8Type = NewNumericType(UInt8TypeName). WithIntRange(UInt8TypeMinInt, UInt8TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt16Type represents the 16-bit unsigned integer type `UInt16` // which checks for overflow and underflow UInt16Type = NewNumericType(UInt16TypeName). WithIntRange(UInt16TypeMinInt, UInt16TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt32Type represents the 32-bit unsigned integer type `UInt32` // which checks for overflow and underflow UInt32Type = NewNumericType(UInt32TypeName). WithIntRange(UInt32TypeMinInt, UInt32TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt64Type represents the 64-bit unsigned integer type `UInt64` // which checks for overflow and underflow UInt64Type = NewNumericType(UInt64TypeName). WithIntRange(UInt64TypeMinInt, UInt64TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt128Type represents the 128-bit unsigned integer type `UInt128` // which checks for overflow and underflow UInt128Type = NewNumericType(UInt128TypeName). WithIntRange(UInt128TypeMinIntBig, UInt128TypeMaxIntBig). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt256Type represents the 256-bit unsigned integer type `UInt256` // which checks for overflow and underflow UInt256Type = NewNumericType(UInt256TypeName). WithIntRange(UInt256TypeMinIntBig, UInt256TypeMaxIntBig). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // Word8Type represents the 8-bit unsigned integer type `Word8` // which does NOT check for overflow and underflow Word8Type = NewNumericType(Word8TypeName). WithIntRange(Word8TypeMinInt, Word8TypeMaxInt) // Word16Type represents the 16-bit unsigned integer type `Word16` // which does NOT check for overflow and underflow Word16Type = NewNumericType(Word16TypeName). WithIntRange(Word16TypeMinInt, Word16TypeMaxInt) // Word32Type represents the 32-bit unsigned integer type `Word32` // which does NOT check for overflow and underflow Word32Type = NewNumericType(Word32TypeName). WithIntRange(Word32TypeMinInt, Word32TypeMaxInt) // Word64Type represents the 64-bit unsigned integer type `Word64` // which does NOT check for overflow and underflow Word64Type = NewNumericType(Word64TypeName). WithIntRange(Word64TypeMinInt, Word64TypeMaxInt) // FixedPointType represents the super-type of all fixed-point types FixedPointType = NewNumericType(FixedPointTypeName) // SignedFixedPointType represents the super-type of all signed fixed-point types SignedFixedPointType = NewNumericType(SignedFixedPointTypeName) // Fix64Type represents the 64-bit signed decimal fixed-point type `Fix64` // which has a scale of Fix64Scale, and checks for overflow and underflow Fix64Type = NewFixedPointNumericType(Fix64TypeName). WithIntRange(Fix64TypeMinIntBig, Fix64TypeMaxIntBig). WithFractionalRange(Fix64TypeMinFractionalBig, Fix64TypeMaxFractionalBig). WithScale(Fix64Scale). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // UFix64Type represents the 64-bit unsigned decimal fixed-point type `UFix64` // which has a scale of 1E9, and checks for overflow and underflow UFix64Type = NewFixedPointNumericType(UFix64TypeName). WithIntRange(UFix64TypeMinIntBig, UFix64TypeMaxIntBig). WithFractionalRange(UFix64TypeMinFractionalBig, UFix64TypeMaxFractionalBig). WithScale(Fix64Scale). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() )
var ( Int8TypeMinInt = new(big.Int).SetInt64(math.MinInt8) Int8TypeMaxInt = new(big.Int).SetInt64(math.MaxInt8) Int16TypeMinInt = new(big.Int).SetInt64(math.MinInt16) Int16TypeMaxInt = new(big.Int).SetInt64(math.MaxInt16) Int32TypeMinInt = new(big.Int).SetInt64(math.MinInt32) Int32TypeMaxInt = new(big.Int).SetInt64(math.MaxInt32) Int64TypeMinInt = new(big.Int).SetInt64(math.MinInt64) Int64TypeMaxInt = new(big.Int).SetInt64(math.MaxInt64) Int128TypeMinIntBig = func() *big.Int { int128TypeMin := big.NewInt(-1) int128TypeMin.Lsh(int128TypeMin, 127) return int128TypeMin }() Int128TypeMaxIntBig = func() *big.Int { int128TypeMax := big.NewInt(1) int128TypeMax.Lsh(int128TypeMax, 127) int128TypeMax.Sub(int128TypeMax, big.NewInt(1)) return int128TypeMax }() Int256TypeMinIntBig = func() *big.Int { int256TypeMin := big.NewInt(-1) int256TypeMin.Lsh(int256TypeMin, 255) return int256TypeMin }() Int256TypeMaxIntBig = func() *big.Int { int256TypeMax := big.NewInt(1) int256TypeMax.Lsh(int256TypeMax, 255) int256TypeMax.Sub(int256TypeMax, big.NewInt(1)) return int256TypeMax }() UIntTypeMin = new(big.Int) UInt8TypeMinInt = new(big.Int) UInt8TypeMaxInt = new(big.Int).SetUint64(math.MaxUint8) UInt16TypeMinInt = new(big.Int) UInt16TypeMaxInt = new(big.Int).SetUint64(math.MaxUint16) UInt32TypeMinInt = new(big.Int) UInt32TypeMaxInt = new(big.Int).SetUint64(math.MaxUint32) UInt64TypeMinInt = new(big.Int) UInt64TypeMaxInt = new(big.Int).SetUint64(math.MaxUint64) UInt128TypeMinIntBig = new(big.Int) UInt128TypeMaxIntBig = func() *big.Int { uInt128TypeMax := big.NewInt(1) uInt128TypeMax.Lsh(uInt128TypeMax, 128) uInt128TypeMax.Sub(uInt128TypeMax, big.NewInt(1)) return uInt128TypeMax }() UInt256TypeMinIntBig = new(big.Int) UInt256TypeMaxIntBig = func() *big.Int { uInt256TypeMax := big.NewInt(1) uInt256TypeMax.Lsh(uInt256TypeMax, 256) uInt256TypeMax.Sub(uInt256TypeMax, big.NewInt(1)) return uInt256TypeMax }() Word8TypeMinInt = new(big.Int) Word8TypeMaxInt = new(big.Int).SetUint64(math.MaxUint8) Word16TypeMinInt = new(big.Int) Word16TypeMaxInt = new(big.Int).SetUint64(math.MaxUint16) Word32TypeMinInt = new(big.Int) Word32TypeMaxInt = new(big.Int).SetUint64(math.MaxUint32) Word64TypeMinInt = new(big.Int) Word64TypeMaxInt = new(big.Int).SetUint64(math.MaxUint64) Fix64FactorBig = new(big.Int).SetUint64(uint64(Fix64Factor)) Fix64TypeMinIntBig = fixedpoint.Fix64TypeMinIntBig Fix64TypeMaxIntBig = fixedpoint.Fix64TypeMaxIntBig Fix64TypeMinFractionalBig = fixedpoint.Fix64TypeMinFractionalBig Fix64TypeMaxFractionalBig = fixedpoint.Fix64TypeMaxFractionalBig UFix64TypeMinIntBig = fixedpoint.UFix64TypeMinIntBig UFix64TypeMaxIntBig = fixedpoint.UFix64TypeMaxIntBig UFix64TypeMinFractionalBig = fixedpoint.UFix64TypeMinFractionalBig UFix64TypeMaxFractionalBig = fixedpoint.UFix64TypeMaxFractionalBig )
Numeric type ranges
var AccessCheckModes = []AccessCheckMode{ AccessCheckModeStrict, AccessCheckModeNotSpecifiedRestricted, AccessCheckModeNotSpecifiedUnrestricted, AccessCheckModeNone, }
var AccountKeyType = func() *CompositeType { accountKeyType := &CompositeType{ Identifier: AccountKeyTypeName, Kind: common.CompositeKindStructure, } const accountKeyIndexFieldDocString = `The index of the account key` const accountKeyPublicKeyFieldDocString = `The public key of the account` const accountKeyHashAlgorithmFieldDocString = `The hash algorithm used by the public key` const accountKeyWeightFieldDocString = `The weight assigned to the public key` const accountKeyIsRevokedFieldDocString = `Flag indicating whether the key is revoked` var members = []*Member{ NewPublicConstantFieldMember( accountKeyType, AccountKeyKeyIndexField, IntType, accountKeyIndexFieldDocString, ), NewPublicConstantFieldMember( accountKeyType, AccountKeyPublicKeyField, PublicKeyType, accountKeyPublicKeyFieldDocString, ), NewPublicConstantFieldMember( accountKeyType, AccountKeyHashAlgoField, HashAlgorithmType, accountKeyHashAlgorithmFieldDocString, ), NewPublicConstantFieldMember( accountKeyType, AccountKeyWeightField, UFix64Type, accountKeyWeightFieldDocString, ), NewPublicConstantFieldMember( accountKeyType, AccountKeyIsRevokedField, BoolType, accountKeyIsRevokedFieldDocString, ), } accountKeyType.Members = GetMembersAsMap(members) accountKeyType.Fields = getFieldNames(members) return accountKeyType }()
AccountKeyType represents the key associated with an account.
var AddressTypeMinIntBig = new(big.Int)
var AllFixedPointTypes = append( append( AllUnsignedFixedPointTypes[:], AllSignedFixedPointTypes..., ), FixedPointType, SignedFixedPointType, )
var AllIntegerTypes = append( append( AllUnsignedIntegerTypes[:], AllSignedIntegerTypes..., ), IntegerType, SignedIntegerType, )
var AllNumberTypes = append( append( AllIntegerTypes[:], AllFixedPointTypes..., ), NumberType, SignedNumberType, )
var AllSignedFixedPointTypes = []Type{ Fix64Type, }
var AllSignedIntegerTypes = []Type{ IntType, Int8Type, Int16Type, Int32Type, Int64Type, Int128Type, Int256Type, }
var AllUnsignedFixedPointTypes = []Type{ UFix64Type, }
var AllUnsignedIntegerTypes = []Type{ UIntType, UInt8Type, UInt16Type, UInt32Type, UInt64Type, UInt128Type, UInt256Type, Word8Type, Word16Type, Word32Type, Word64Type, }
var AnyResourceType = &SimpleType{ Name: "AnyResource", QualifiedName: "AnyResource", TypeID: "AnyResource", IsInvalid: false, IsResource: true, Storable: true, Equatable: false, ExternallyReturnable: true, }
AnyResourceType represents the top type of all resource types
var AnyStructType = &SimpleType{ Name: "AnyStruct", QualifiedName: "AnyStruct", TypeID: "AnyStruct", IsInvalid: false, IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: true, }
AnyStructType represents the top type of all non-resource types
var AnyType = &SimpleType{ Name: "Any", QualifiedName: "Any", TypeID: "Any", IsInvalid: false, IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: false, }
AnyType represents the top type of all types. NOTE: This type is only used internally and is not available in programs.
var AuthAccountContractsType = func() *CompositeType { authAccountContractsType := &CompositeType{ Identifier: AuthAccountContractsTypeName, Kind: common.CompositeKindStructure, } var members = []*Member{ NewPublicFunctionMember( authAccountContractsType, AuthAccountContractsTypeAddFunctionName, authAccountContractsTypeAddFunctionType, authAccountContractsTypeAddFunctionDocString, ), NewPublicFunctionMember( authAccountContractsType, AuthAccountContractsTypeUpdateExperimentalFunctionName, authAccountContractsTypeUpdateExperimentalFunctionType, authAccountContractsTypeUpdateExperimentalFunctionDocString, ), NewPublicFunctionMember( authAccountContractsType, AuthAccountContractsTypeGetFunctionName, authAccountContractsTypeGetFunctionType, authAccountContractsTypeGetFunctionDocString, ), NewPublicFunctionMember( authAccountContractsType, AuthAccountContractsTypeRemoveFunctionName, authAccountContractsTypeRemoveFunctionType, authAccountContractsTypeRemoveFunctionDocString, ), } authAccountContractsType.Members = GetMembersAsMap(members) authAccountContractsType.Fields = getFieldNames(members) return authAccountContractsType }()
AuthAccountContractsType represents the type `AuthAccount.Contracts`
var AuthAccountKeysType = func() *CompositeType { accountKeys := &CompositeType{ Identifier: AccountKeysTypeName, Kind: common.CompositeKindStructure, } var members = []*Member{ NewPublicFunctionMember( accountKeys, AccountKeysAddFunctionName, authAccountKeysTypeAddFunctionType, authAccountKeysTypeAddFunctionDocString, ), NewPublicFunctionMember( accountKeys, AccountKeysGetFunctionName, accountKeysTypeGetFunctionType, accountKeysTypeGetFunctionDocString, ), NewPublicFunctionMember( accountKeys, AccountKeysRevokeFunctionName, authAccountKeysTypeRevokeFunctionType, authAccountKeysTypeRevokeFunctionDocString, ), } accountKeys.Members = GetMembersAsMap(members) accountKeys.Fields = getFieldNames(members) return accountKeys }()
AuthAccountKeysType represents the keys associated with an auth account.
var AuthAccountType = func() *CompositeType { authAccountType := &CompositeType{ Identifier: AuthAccountTypeName, Kind: common.CompositeKindStructure, hasComputedMembers: true, nestedTypes: func() *StringTypeOrderedMap { nestedTypes := NewStringTypeOrderedMap() nestedTypes.Set(AuthAccountContractsTypeName, AuthAccountContractsType) nestedTypes.Set(AccountKeysTypeName, AuthAccountKeysType) return nestedTypes }(), } var members = []*Member{ NewPublicConstantFieldMember( authAccountType, AuthAccountAddressField, &AddressType{}, accountTypeAddressFieldDocString, ), NewPublicConstantFieldMember( authAccountType, AuthAccountBalanceField, UFix64Type, accountTypeAccountBalanceFieldDocString, ), NewPublicConstantFieldMember( authAccountType, AuthAccountAvailableBalanceField, UFix64Type, accountTypeAccountAvailableBalanceFieldDocString, ), NewPublicConstantFieldMember( authAccountType, AuthAccountStorageUsedField, UInt64Type, accountTypeStorageUsedFieldDocString, ), NewPublicConstantFieldMember( authAccountType, AuthAccountStorageCapacityField, UInt64Type, accountTypeStorageCapacityFieldDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountAddPublicKeyField, authAccountTypeAddPublicKeyFunctionType, authAccountTypeAddPublicKeyFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountRemovePublicKeyField, authAccountTypeRemovePublicKeyFunctionType, authAccountTypeRemovePublicKeyFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountSaveField, authAccountTypeSaveFunctionType, authAccountTypeSaveFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountLoadField, authAccountTypeLoadFunctionType, authAccountTypeLoadFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountCopyField, authAccountTypeCopyFunctionType, authAccountTypeCopyFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountBorrowField, authAccountTypeBorrowFunctionType, authAccountTypeBorrowFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountLinkField, authAccountTypeLinkFunctionType, authAccountTypeLinkFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountUnlinkField, authAccountTypeUnlinkFunctionType, authAccountTypeUnlinkFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountGetCapabilityField, authAccountTypeGetCapabilityFunctionType, authAccountTypeGetCapabilityFunctionDocString, ), NewPublicFunctionMember( authAccountType, AuthAccountGetLinkTargetField, accountTypeGetLinkTargetFunctionType, accountTypeGetLinkTargetFunctionDocString, ), NewPublicConstantFieldMember( authAccountType, AuthAccountContractsField, AuthAccountContractsType, accountTypeContractsFieldDocString, ), NewPublicConstantFieldMember( authAccountType, AuthAccountKeysField, AuthAccountKeysType, accountTypeKeysFieldDocString, ), } authAccountType.Members = GetMembersAsMap(members) authAccountType.Fields = getFieldNames(members) return authAccountType }()
AuthAccountType represents the authorized access to an account. Access to an AuthAccount means having full access to its storage, public keys, and code. Only signed transactions can get the AuthAccount for an account.
var BaseTypeActivation = NewVariableActivation(nil)
BaseTypeActivation is the base activation that contains the types available in programs
var BaseValueActivation = NewVariableActivation(nil)
BaseValueActivation is the base activation that contains the values available in programs
var BlockType = &SimpleType{ Name: "Block", QualifiedName: "Block", TypeID: "Block", IsInvalid: false, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: false, Members: func(t *SimpleType) map[string]MemberResolver { return map[string]MemberResolver{ "height": { Kind: common.DeclarationKindField, Resolve: func(identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( t, identifier, UInt64Type, blockTypeHeightFieldDocString, ) }, }, "view": { Kind: common.DeclarationKindField, Resolve: func(identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( t, identifier, UInt64Type, blockTypeViewFieldDocString, ) }, }, "timestamp": { Kind: common.DeclarationKindField, Resolve: func(identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( t, identifier, UFix64Type, blockTypeTimestampFieldDocString, ) }, }, "id": { Kind: common.DeclarationKindField, Resolve: func(identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( t, identifier, blockIDFieldType, blockTypeIdFieldDocString, ) }, }, } }, }
BlockType
var BoolType = &SimpleType{ Name: "Bool", QualifiedName: "Bool", TypeID: "Bool", IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, }
BoolType represents the boolean type
var CapabilityPathType = &SimpleType{ Name: "CapabilityPath", QualifiedName: "CapabilityPath", TypeID: "CapabilityPath", IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: true, IsSuperTypeOf: func(subType Type) bool { return IsSubType(subType, PrivatePathType) || IsSubType(subType, PublicPathType) }, }
CapabilityPathType
var CharacterType = &SimpleType{ Name: "Character", QualifiedName: "Character", TypeID: "Character", IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, }
CharacterType represents the character type
var DeployedContractType = &SimpleType{ Name: "DeployedContract", QualifiedName: "DeployedContract", TypeID: "DeployedContract", IsInvalid: false, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: false, Members: func(t *SimpleType) map[string]MemberResolver { return map[string]MemberResolver{ DeployedContractTypeAddressFieldName: { Kind: common.DeclarationKindField, Resolve: func(identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( t, identifier, &AddressType{}, deployedContractTypeAddressFieldDocString, ) }, }, DeployedContractTypeNameFieldName: { Kind: common.DeclarationKindField, Resolve: func(identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( t, identifier, StringType, deployedContractTypeNameFieldDocString, ) }, }, DeployedContractTypeCodeFieldName: { Kind: common.DeclarationKindField, Resolve: func(identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( t, identifier, &VariableSizedType{ Type: UInt8Type, }, deployedContractTypeCodeFieldDocString, ) }, }, } }, }
DeployedContractType represents the type `DeployedContract`
var HashAlgorithmType = newNativeEnumType(HashAlgorithmTypeName, UInt8Type)
var HashAlgorithms = []CryptoAlgorithm{ HashAlgorithmSHA2_256, HashAlgorithmSHA2_384, HashAlgorithmSHA3_256, HashAlgorithmSHA3_384, }
var InvalidType = &SimpleType{ Name: "<<invalid>>", QualifiedName: "<<invalid>>", TypeID: "<<invalid>>", IsInvalid: true, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: false, }
InvalidType represents a type that is invalid. It is the result of type checking failing and can't be expressed in programs.
var MetaType = &SimpleType{ Name: "Type", QualifiedName: "Type", TypeID: "Type", IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Members: func(t *SimpleType) map[string]MemberResolver { return map[string]MemberResolver{ "identifier": { Kind: common.DeclarationKindField, Resolve: func(identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( t, identifier, StringType, typeIdentifierDocString, ) }, }, } }, }
MetaType represents the type of a type.
var NativeCompositeTypes = map[string]*CompositeType{}
var NeverType = &SimpleType{ Name: "Never", QualifiedName: "Never", TypeID: "Never", IsInvalid: false, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: false, }
NeverType represents the bottom type
var PathType = &SimpleType{ Name: "Path", QualifiedName: "Path", TypeID: "Path", IsInvalid: false, IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: true, IsSuperTypeOf: func(subType Type) bool { return IsSubType(subType, StoragePathType) || IsSubType(subType, CapabilityPathType) }, }
PathType
var PrivatePathType = &SimpleType{ Name: "PrivatePath", QualifiedName: "PrivatePath", TypeID: "PrivatePath", IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: true, }
PrivatePathType
var PublicAccountKeysType = func() *CompositeType { accountKeys := &CompositeType{ Identifier: AccountKeysTypeName, Kind: common.CompositeKindStructure, } var members = []*Member{ NewPublicFunctionMember( accountKeys, AccountKeysGetFunctionName, accountKeysTypeGetFunctionType, accountKeysTypeGetFunctionDocString, ), } accountKeys.Members = GetMembersAsMap(members) accountKeys.Fields = getFieldNames(members) return accountKeys }()
PublicAccountKeysType represents the keys associated with a public account.
var PublicAccountType = func() *CompositeType { publicAccountType := &CompositeType{ Identifier: PublicAccountTypeName, Kind: common.CompositeKindStructure, hasComputedMembers: true, nestedTypes: func() *StringTypeOrderedMap { nestedTypes := NewStringTypeOrderedMap() nestedTypes.Set(AccountKeysTypeName, PublicAccountKeysType) return nestedTypes }(), } var members = []*Member{ NewPublicConstantFieldMember( publicAccountType, PublicAccountAddressField, &AddressType{}, accountTypeAddressFieldDocString, ), NewPublicConstantFieldMember( publicAccountType, PublicAccountBalanceField, UFix64Type, accountTypeAccountBalanceFieldDocString, ), NewPublicConstantFieldMember( publicAccountType, PublicAccountAvailableBalanceField, UFix64Type, accountTypeAccountAvailableBalanceFieldDocString, ), NewPublicConstantFieldMember( publicAccountType, PublicAccountStorageUsedField, UInt64Type, accountTypeStorageUsedFieldDocString, ), NewPublicConstantFieldMember( publicAccountType, PublicAccountStorageCapacityField, UInt64Type, accountTypeStorageCapacityFieldDocString, ), NewPublicFunctionMember( publicAccountType, PublicAccountGetCapabilityField, publicAccountTypeGetCapabilityFunctionType, publicAccountTypeGetLinkTargetFunctionDocString, ), NewPublicFunctionMember( publicAccountType, PublicAccountGetTargetLinkField, accountTypeGetLinkTargetFunctionType, accountTypeGetLinkTargetFunctionDocString, ), NewPublicConstantFieldMember( publicAccountType, PublicAccountKeysField, PublicAccountKeysType, accountTypeKeysFieldDocString, ), } publicAccountType.Members = GetMembersAsMap(members) publicAccountType.Fields = getFieldNames(members) return publicAccountType }()
PublicAccountType represents the publicly accessible portion of an account.
var PublicKeyType = func() *CompositeType { accountKeyType := &CompositeType{ Identifier: PublicKeyTypeName, Kind: common.CompositeKindStructure, } const publicKeyKeyFieldDocString = `The public key` const publicKeySignAlgoFieldDocString = `The signature algorithm to be used with the key` var members = []*Member{ NewPublicConstantFieldMember( accountKeyType, PublicKeyPublicKeyField, &VariableSizedType{Type: UInt8Type}, publicKeyKeyFieldDocString, ), NewPublicConstantFieldMember( accountKeyType, PublicKeySignAlgoField, SignatureAlgorithmType, publicKeySignAlgoFieldDocString, ), } accountKeyType.Members = GetMembersAsMap(members) accountKeyType.Fields = getFieldNames(members) return accountKeyType }()
PublicKeyType represents the public key associated with an account key.
var PublicPathType = &SimpleType{ Name: "PublicPath", QualifiedName: "PublicPath", TypeID: "PublicPath", IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: true, }
PublicPathType
var SignatureAlgorithmType = newNativeEnumType(SignatureAlgorithmTypeName, UInt8Type)
var SignatureAlgorithms = []CryptoAlgorithm{ SignatureAlgorithmECDSA_P256, SignatureAlgorithmECDSA_Secp256k1, }
var StorableType = &SimpleType{ Name: "Storable", QualifiedName: "Storable", TypeID: "Storable", IsInvalid: false, IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: false, IsSuperTypeOf: func(subType Type) bool { storableResults := map[*Member]bool{} return subType.IsStorable(storableResults) }, }
StorableType is the supertype of all types which are storable.
It is only used as e.g. a type bound, but is not accessible to user programs, i.e. can't be used in type annotations for e.g. parameters, return types, fields, etc.
var StoragePathType = &SimpleType{ Name: "StoragePath", QualifiedName: "StoragePath", TypeID: "StoragePath", IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: true, }
StoragePathType
var StringType = &SimpleType{ Name: "String", QualifiedName: "String", TypeID: "String", IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, ValueIndexingInfo: ValueIndexingInfo{ IsValueIndexableType: true, AllowsValueIndexingAssignment: false, ElementType: func(_ bool) Type { return CharacterType }, IndexingType: IntegerType, }, }
StringType represents the string type
var TypeOfNil = &OptionalType{ Type: NeverType, }
var VoidType = &SimpleType{ Name: "Void", QualifiedName: "Void", TypeID: "Void", IsInvalid: false, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: true, }
VoidType represents the void type
Functions ¶
func CheckAddressLiteral ¶ added in v0.12.0
func CheckAddressLiteral(expression *ast.IntegerExpression, report func(error)) bool
CheckAddressLiteral checks that the value of the integer literal fits into the range of an address (64 bits), and is hexadecimal
func CheckFixedPointLiteral ¶ added in v0.12.0
func CheckFixedPointLiteral(expression *ast.FixedPointExpression, targetType Type, report func(error)) bool
CheckFixedPointLiteral checks that the value of the fixed-point literal fits into range of the target fixed-point type
func CheckIntegerLiteral ¶ added in v0.12.0
func CheckIntegerLiteral(expression *ast.IntegerExpression, targetType Type, report func(error)) bool
CheckIntegerLiteral checks that the value of the integer literal fits into range of the target integer type
func FailableCastCanSucceed ¶
FailableCastCanSucceed checks a failable (dynamic) cast, i.e. a cast that might succeed at run-time. It returns true if the cast from subType to superType could potentially succeed at run-time, and returns false if the cast will definitely always fail.
func FunctionEntryPointDeclaration ¶ added in v0.11.0
func FunctionEntryPointDeclaration(program *ast.Program) *ast.FunctionDeclaration
FunctionEntryPointDeclaration returns the entry point function declaration, if any.
Returns nil if there are multiple function declarations with the same function entry point name, or any other top-level declarations.
func IsSubType ¶
IsSubType determines if the given subtype is a subtype of the given supertype.
Types are subtypes of themselves.
func IsValidAssignmentTargetExpression ¶ added in v0.8.0
func IsValidAssignmentTargetExpression(expression ast.Expression) bool
func IsValidEventParameterType ¶ added in v0.5.0
IsValidEventParameterType returns true if the given type is a valid event parameter type.
Events currently only support a few simple Cadence types.
func RequiredArgumentCount ¶ added in v0.10.0
func VisitThisAndNested ¶ added in v0.13.2
Types ¶
type AccessCheckMode ¶
type AccessCheckMode uint
const ( AccessCheckModeStrict AccessCheckMode = iota AccessCheckModeNotSpecifiedRestricted AccessCheckModeNotSpecifiedUnrestricted AccessCheckModeNone )
func (AccessCheckMode) String ¶
func (i AccessCheckMode) String() string
type AddressType ¶
type AddressType struct{}
AddressType represents the address type
func (*AddressType) Equal ¶
func (*AddressType) Equal(other Type) bool
func (*AddressType) GetMembers ¶ added in v0.7.0
func (t *AddressType) GetMembers() map[string]MemberResolver
func (*AddressType) ID ¶
func (*AddressType) ID() TypeID
func (*AddressType) IsEquatable ¶ added in v0.7.0
func (*AddressType) IsEquatable() bool
func (*AddressType) IsExternallyReturnable ¶ added in v0.11.0
func (*AddressType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*AddressType) IsInvalidType ¶
func (*AddressType) IsInvalidType() bool
func (*AddressType) IsResourceType ¶
func (*AddressType) IsResourceType() bool
func (*AddressType) IsStorable ¶ added in v0.5.0
func (*AddressType) IsStorable(_ map[*Member]bool) bool
func (*AddressType) IsType ¶
func (*AddressType) IsType()
func (*AddressType) MaxInt ¶
func (*AddressType) MaxInt() *big.Int
func (*AddressType) MinInt ¶
func (*AddressType) MinInt() *big.Int
func (*AddressType) QualifiedString ¶
func (*AddressType) QualifiedString() string
func (*AddressType) Resolve ¶
func (t *AddressType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*AddressType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *AddressType) RewriteWithRestrictedTypes() (Type, bool)
func (*AddressType) String ¶
func (*AddressType) String() string
func (*AddressType) TypeAnnotationState ¶
func (*AddressType) TypeAnnotationState() TypeAnnotationState
func (*AddressType) Unify ¶
func (*AddressType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type AlwaysFailingNonResourceCastingTypeError ¶
func (*AlwaysFailingNonResourceCastingTypeError) Error ¶
func (e *AlwaysFailingNonResourceCastingTypeError) Error() string
type AlwaysFailingResourceCastingTypeError ¶
func (*AlwaysFailingResourceCastingTypeError) Error ¶
func (e *AlwaysFailingResourceCastingTypeError) Error() string
type AlwaysSucceedingFailableCastHint ¶ added in v0.14.2
func (*AlwaysSucceedingFailableCastHint) Hint ¶ added in v0.14.2
func (h *AlwaysSucceedingFailableCastHint) Hint() string
type AlwaysSucceedingForceCastHint ¶ added in v0.14.2
func (*AlwaysSucceedingForceCastHint) Hint ¶ added in v0.14.2
func (h *AlwaysSucceedingForceCastHint) Hint() string
type AmbiguousRestrictedTypeError ¶
func (*AmbiguousRestrictedTypeError) Error ¶
func (e *AmbiguousRestrictedTypeError) Error() string
type ArgumentCountError ¶
func (*ArgumentCountError) Error ¶
func (e *ArgumentCountError) Error() string
func (*ArgumentCountError) SecondaryError ¶
func (e *ArgumentCountError) SecondaryError() string
type ArgumentExpressionsCheck ¶ added in v0.9.0
type ArgumentExpressionsCheck func( checker *Checker, argumentExpressions []ast.Expression, invocationRange ast.Range, )
type ArrayType ¶
type ArrayType interface { ValueIndexableType // contains filtered or unexported methods }
type AssignmentToConstantError ¶
func (*AssignmentToConstantError) Error ¶
func (e *AssignmentToConstantError) Error() string
type AssignmentToConstantMemberError ¶
func (*AssignmentToConstantMemberError) Error ¶
func (e *AssignmentToConstantMemberError) Error() string
type AstPositionResourceUseOrderedMap ¶ added in v0.13.0
type AstPositionResourceUseOrderedMap struct {
// contains filtered or unexported fields
}
AstPositionResourceUseOrderedMap
func NewAstPositionResourceUseOrderedMap ¶ added in v0.13.0
func NewAstPositionResourceUseOrderedMap() *AstPositionResourceUseOrderedMap
NewAstPositionResourceUseOrderedMap creates a new AstPositionResourceUseOrderedMap.
func (*AstPositionResourceUseOrderedMap) Clear ¶ added in v0.14.1
func (om *AstPositionResourceUseOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*AstPositionResourceUseOrderedMap) Delete ¶ added in v0.13.0
func (om *AstPositionResourceUseOrderedMap) Delete(key ast.Position) (oldValue ResourceUse, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*AstPositionResourceUseOrderedMap) Foreach ¶ added in v0.13.0
func (om *AstPositionResourceUseOrderedMap) Foreach(f func(key ast.Position, value ResourceUse))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*AstPositionResourceUseOrderedMap) Get ¶ added in v0.13.0
func (om *AstPositionResourceUseOrderedMap) Get(key ast.Position) (result ResourceUse, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*AstPositionResourceUseOrderedMap) GetPair ¶ added in v0.13.0
func (om *AstPositionResourceUseOrderedMap) GetPair(key ast.Position) *AstPositionResourceUsePair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*AstPositionResourceUseOrderedMap) Len ¶ added in v0.13.0
func (om *AstPositionResourceUseOrderedMap) Len() int
Len returns the length of the ordered map.
func (*AstPositionResourceUseOrderedMap) Newest ¶ added in v0.13.0
func (om *AstPositionResourceUseOrderedMap) Newest() *AstPositionResourceUsePair
Newest returns a pointer to the newest pair.
func (*AstPositionResourceUseOrderedMap) Oldest ¶ added in v0.13.0
func (om *AstPositionResourceUseOrderedMap) Oldest() *AstPositionResourceUsePair
Oldest returns a pointer to the oldest pair.
func (*AstPositionResourceUseOrderedMap) Set ¶ added in v0.13.0
func (om *AstPositionResourceUseOrderedMap) Set(key ast.Position, value ResourceUse) (oldValue ResourceUse, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type AstPositionResourceUsePair ¶ added in v0.13.0
type AstPositionResourceUsePair struct { Key ast.Position Value ResourceUse // contains filtered or unexported fields }
AstPositionResourceUsePair
func (*AstPositionResourceUsePair) Next ¶ added in v0.13.0
func (p *AstPositionResourceUsePair) Next() *AstPositionResourceUsePair
Next returns a pointer to the next pair.
func (*AstPositionResourceUsePair) Prev ¶ added in v0.13.0
func (p *AstPositionResourceUsePair) Prev() *AstPositionResourceUsePair
Prev returns a pointer to the previous pair.
type BeforeExtractor ¶
type BeforeExtractor struct { ExpressionExtractor *ast.ExpressionExtractor // contains filtered or unexported fields }
func NewBeforeExtractor ¶
func NewBeforeExtractor(report func(error)) *BeforeExtractor
func (*BeforeExtractor) ExtractBefore ¶
func (e *BeforeExtractor) ExtractBefore(expression ast.Expression) ast.ExpressionExtraction
func (*BeforeExtractor) ExtractFunction ¶
func (e *BeforeExtractor) ExtractFunction( _ *ast.ExpressionExtractor, expression *ast.FunctionExpression, ) ast.ExpressionExtraction
func (*BeforeExtractor) ExtractInvocation ¶
func (e *BeforeExtractor) ExtractInvocation( extractor *ast.ExpressionExtractor, expression *ast.InvocationExpression, ) ast.ExpressionExtraction
type BinaryOperationKind ¶
type BinaryOperationKind uint
const ( BinaryOperationKindUnknown BinaryOperationKind = iota BinaryOperationKindArithmetic BinaryOperationKindNonEqualityComparison BinaryOperationKindBooleanLogic BinaryOperationKindEquality BinaryOperationKindNilCoalescing BinaryOperationKindBitwise )
func (BinaryOperationKind) String ¶
func (i BinaryOperationKind) String() string
type CapabilityType ¶
type CapabilityType struct { BorrowType Type // contains filtered or unexported fields }
func (*CapabilityType) BaseType ¶ added in v0.5.0
func (t *CapabilityType) BaseType() Type
func (*CapabilityType) Equal ¶
func (t *CapabilityType) Equal(other Type) bool
func (*CapabilityType) GetMembers ¶ added in v0.7.0
func (t *CapabilityType) GetMembers() map[string]MemberResolver
func (*CapabilityType) ID ¶
func (t *CapabilityType) ID() TypeID
func (*CapabilityType) Instantiate ¶ added in v0.5.0
func (t *CapabilityType) Instantiate(typeArguments []Type, _ func(err error)) Type
func (*CapabilityType) IsEquatable ¶ added in v0.7.0
func (*CapabilityType) IsEquatable() bool
func (*CapabilityType) IsExternallyReturnable ¶ added in v0.11.0
func (*CapabilityType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*CapabilityType) IsInvalidType ¶
func (t *CapabilityType) IsInvalidType() bool
func (*CapabilityType) IsResourceType ¶
func (*CapabilityType) IsResourceType() bool
func (*CapabilityType) IsStorable ¶ added in v0.5.0
func (*CapabilityType) IsStorable(_ map[*Member]bool) bool
func (*CapabilityType) IsType ¶
func (*CapabilityType) IsType()
func (*CapabilityType) QualifiedString ¶
func (t *CapabilityType) QualifiedString() string
func (*CapabilityType) Resolve ¶
func (t *CapabilityType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*CapabilityType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *CapabilityType) RewriteWithRestrictedTypes() (Type, bool)
func (*CapabilityType) String ¶
func (t *CapabilityType) String() string
func (*CapabilityType) TypeAnnotationState ¶
func (t *CapabilityType) TypeAnnotationState() TypeAnnotationState
func (*CapabilityType) TypeArguments ¶ added in v0.5.0
func (t *CapabilityType) TypeArguments() []Type
func (*CapabilityType) TypeParameters ¶ added in v0.5.0
func (t *CapabilityType) TypeParameters() []*TypeParameter
func (*CapabilityType) Unify ¶
func (t *CapabilityType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type CheckHandlerFunc ¶ added in v0.2.1
type Checker ¶
type Checker struct { Program *ast.Program Location common.Location PredeclaredValues []ValueDeclaration PredeclaredTypes []TypeDeclaration Occurrences *Occurrences MemberAccesses *MemberAccesses Elaboration *Elaboration // contains filtered or unexported fields }
func NewChecker ¶
func (*Checker) CheckerError ¶
func (checker *Checker) CheckerError() *CheckerError
func (*Checker) ConvertType ¶
ConvertType converts an AST type representation to a sema type
func (*Checker) ConvertTypeAnnotation ¶
func (checker *Checker) ConvertTypeAnnotation(typeAnnotation *ast.TypeAnnotation) *TypeAnnotation
ConvertTypeAnnotation converts an AST type annotation representation to a sema type annotation
NOTE: type annotations ar *NOT* checked!
func (*Checker) EntryPointParameters ¶ added in v0.11.0
EntryPointParameters returns the parameters of the transaction or script, if any.
Returns nil if the program specifies both a valid transaction and entry point function declaration.
func (*Checker) ResetErrors ¶
func (checker *Checker) ResetErrors()
func (*Checker) ResetHints ¶ added in v0.9.0
func (checker *Checker) ResetHints()
func (*Checker) SubChecker ¶ added in v0.13.0
func (*Checker) TypeActivationDepth ¶ added in v0.2.0
func (*Checker) UserDefinedValues ¶
func (*Checker) ValueActivationDepth ¶ added in v0.2.0
func (*Checker) VisitArrayExpression ¶
func (checker *Checker) VisitArrayExpression(expression *ast.ArrayExpression) ast.Repr
func (*Checker) VisitAssignmentStatement ¶
func (checker *Checker) VisitAssignmentStatement(assignment *ast.AssignmentStatement) ast.Repr
func (*Checker) VisitBinaryExpression ¶
func (checker *Checker) VisitBinaryExpression(expression *ast.BinaryExpression) ast.Repr
func (*Checker) VisitBoolExpression ¶
func (checker *Checker) VisitBoolExpression(_ *ast.BoolExpression) ast.Repr
func (*Checker) VisitBreakStatement ¶
func (checker *Checker) VisitBreakStatement(statement *ast.BreakStatement) ast.Repr
func (*Checker) VisitCastingExpression ¶
func (checker *Checker) VisitCastingExpression(expression *ast.CastingExpression) ast.Repr
func (*Checker) VisitCompositeDeclaration ¶
func (checker *Checker) VisitCompositeDeclaration(declaration *ast.CompositeDeclaration) ast.Repr
func (*Checker) VisitConditionalExpression ¶
func (checker *Checker) VisitConditionalExpression(expression *ast.ConditionalExpression) ast.Repr
func (*Checker) VisitContinueStatement ¶
func (checker *Checker) VisitContinueStatement(statement *ast.ContinueStatement) ast.Repr
func (*Checker) VisitCreateExpression ¶
func (checker *Checker) VisitCreateExpression(expression *ast.CreateExpression) ast.Repr
func (*Checker) VisitDestroyExpression ¶
func (checker *Checker) VisitDestroyExpression(expression *ast.DestroyExpression) (resultType ast.Repr)
func (*Checker) VisitDictionaryExpression ¶
func (checker *Checker) VisitDictionaryExpression(expression *ast.DictionaryExpression) ast.Repr
func (*Checker) VisitEmitStatement ¶
func (checker *Checker) VisitEmitStatement(statement *ast.EmitStatement) ast.Repr
func (*Checker) VisitEnumCaseDeclaration ¶ added in v0.10.0
func (checker *Checker) VisitEnumCaseDeclaration(_ *ast.EnumCaseDeclaration) ast.Repr
func (*Checker) VisitExpressionStatement ¶
func (checker *Checker) VisitExpressionStatement(statement *ast.ExpressionStatement) ast.Repr
func (*Checker) VisitFieldDeclaration ¶
func (checker *Checker) VisitFieldDeclaration(_ *ast.FieldDeclaration) ast.Repr
func (*Checker) VisitFixedPointExpression ¶
func (checker *Checker) VisitFixedPointExpression(expression *ast.FixedPointExpression) ast.Repr
func (*Checker) VisitForStatement ¶
func (checker *Checker) VisitForStatement(statement *ast.ForStatement) ast.Repr
func (*Checker) VisitForceExpression ¶
func (checker *Checker) VisitForceExpression(expression *ast.ForceExpression) ast.Repr
func (*Checker) VisitFunctionBlock ¶
func (checker *Checker) VisitFunctionBlock(functionBlock *ast.FunctionBlock) ast.Repr
func (*Checker) VisitFunctionDeclaration ¶
func (checker *Checker) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) ast.Repr
func (*Checker) VisitFunctionExpression ¶
func (checker *Checker) VisitFunctionExpression(expression *ast.FunctionExpression) ast.Repr
func (*Checker) VisitIdentifierExpression ¶
func (checker *Checker) VisitIdentifierExpression(expression *ast.IdentifierExpression) ast.Repr
func (*Checker) VisitIfStatement ¶
func (checker *Checker) VisitIfStatement(statement *ast.IfStatement) ast.Repr
func (*Checker) VisitImportDeclaration ¶
func (checker *Checker) VisitImportDeclaration(_ *ast.ImportDeclaration) ast.Repr
func (*Checker) VisitIndexExpression ¶
func (checker *Checker) VisitIndexExpression(expression *ast.IndexExpression) ast.Repr
func (*Checker) VisitIntegerExpression ¶
func (checker *Checker) VisitIntegerExpression(_ *ast.IntegerExpression) ast.Repr
func (*Checker) VisitInterfaceDeclaration ¶
func (checker *Checker) VisitInterfaceDeclaration(declaration *ast.InterfaceDeclaration) ast.Repr
VisitInterfaceDeclaration checks the given interface declaration.
NOTE: This function assumes that the interface type was previously declared using `declareInterfaceType` and exists in `checker.Elaboration.InterfaceDeclarationTypes`, and that the members and nested declarations for the interface type were declared through `declareInterfaceMembers`.
func (*Checker) VisitInvocationExpression ¶
func (checker *Checker) VisitInvocationExpression(invocationExpression *ast.InvocationExpression) ast.Repr
func (*Checker) VisitMemberExpression ¶
func (checker *Checker) VisitMemberExpression(expression *ast.MemberExpression) ast.Repr
NOTE: only called if the member expression is *not* an assignment
func (*Checker) VisitNilExpression ¶
func (checker *Checker) VisitNilExpression(_ *ast.NilExpression) ast.Repr
func (*Checker) VisitPathExpression ¶
func (checker *Checker) VisitPathExpression(expression *ast.PathExpression) ast.Repr
func (*Checker) VisitPragmaDeclaration ¶ added in v0.7.0
func (checker *Checker) VisitPragmaDeclaration(p *ast.PragmaDeclaration) ast.Repr
func (*Checker) VisitReferenceExpression ¶
func (checker *Checker) VisitReferenceExpression(referenceExpression *ast.ReferenceExpression) ast.Repr
VisitReferenceExpression checks a reference expression `&t as T`, where `t` is the referenced expression, and `T` is the result type.
func (*Checker) VisitReturnStatement ¶
func (checker *Checker) VisitReturnStatement(statement *ast.ReturnStatement) ast.Repr
func (*Checker) VisitStringExpression ¶
func (checker *Checker) VisitStringExpression(_ *ast.StringExpression) ast.Repr
func (*Checker) VisitSwapStatement ¶
func (checker *Checker) VisitSwapStatement(swap *ast.SwapStatement) ast.Repr
func (*Checker) VisitSwitchStatement ¶ added in v0.10.0
func (checker *Checker) VisitSwitchStatement(statement *ast.SwitchStatement) ast.Repr
func (*Checker) VisitTransactionDeclaration ¶
func (checker *Checker) VisitTransactionDeclaration(declaration *ast.TransactionDeclaration) ast.Repr
func (*Checker) VisitUnaryExpression ¶
func (checker *Checker) VisitUnaryExpression(expression *ast.UnaryExpression) ast.Repr
func (*Checker) VisitVariableDeclaration ¶
func (checker *Checker) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ast.Repr
func (*Checker) VisitWhileStatement ¶
func (checker *Checker) VisitWhileStatement(statement *ast.WhileStatement) ast.Repr
type CheckerError ¶
type CheckerError struct { Location common.Location Codes map[common.LocationID]string Errors []error }
func (CheckerError) ChildErrors ¶
func (e CheckerError) ChildErrors() []error
func (CheckerError) Error ¶
func (e CheckerError) Error() string
func (CheckerError) ImportLocation ¶ added in v0.12.1
func (e CheckerError) ImportLocation() common.Location
type CompositeKindMismatchError ¶
type CompositeKindMismatchError struct { ExpectedKind common.CompositeKind ActualKind common.CompositeKind ast.Range }
func (*CompositeKindMismatchError) Error ¶
func (e *CompositeKindMismatchError) Error() string
func (*CompositeKindMismatchError) SecondaryError ¶
func (e *CompositeKindMismatchError) SecondaryError() string
type CompositeKindedType ¶
type CompositeKindedType interface { Type GetCompositeKind() common.CompositeKind }
CompositeKindedType is a type which has a composite kind
type CompositeType ¶
type CompositeType struct { Location common.Location Identifier string Kind common.CompositeKind ExplicitInterfaceConformances []*InterfaceType ImplicitTypeRequirementConformances []*CompositeType Members *StringMemberOrderedMap Fields []string // TODO: add support for overloaded initializers ConstructorParameters []*Parameter ContainerType Type EnumRawType Type // contains filtered or unexported fields }
func (*CompositeType) Equal ¶
func (t *CompositeType) Equal(other Type) bool
func (*CompositeType) ExplicitInterfaceConformanceSet ¶ added in v0.3.0
func (t *CompositeType) ExplicitInterfaceConformanceSet() *InterfaceSet
func (*CompositeType) GetCompositeKind ¶
func (t *CompositeType) GetCompositeKind() common.CompositeKind
func (*CompositeType) GetContainerType ¶
func (t *CompositeType) GetContainerType() Type
func (*CompositeType) GetLocation ¶
func (t *CompositeType) GetLocation() common.Location
func (*CompositeType) GetMembers ¶ added in v0.7.0
func (t *CompositeType) GetMembers() map[string]MemberResolver
func (*CompositeType) GetNestedTypes ¶ added in v0.13.2
func (t *CompositeType) GetNestedTypes() *StringTypeOrderedMap
func (*CompositeType) ID ¶
func (t *CompositeType) ID() TypeID
func (*CompositeType) InterfaceType ¶
func (t *CompositeType) InterfaceType() *InterfaceType
func (*CompositeType) IsEquatable ¶ added in v0.7.0
func (t *CompositeType) IsEquatable() bool
func (*CompositeType) IsExternallyReturnable ¶ added in v0.11.0
func (t *CompositeType) IsExternallyReturnable(results map[*Member]bool) bool
func (*CompositeType) IsInvalidType ¶
func (*CompositeType) IsInvalidType() bool
func (*CompositeType) IsResourceType ¶
func (t *CompositeType) IsResourceType() bool
func (*CompositeType) IsStorable ¶ added in v0.5.0
func (t *CompositeType) IsStorable(results map[*Member]bool) bool
func (*CompositeType) IsType ¶
func (*CompositeType) IsType()
func (*CompositeType) QualifiedIdentifier ¶
func (t *CompositeType) QualifiedIdentifier() string
func (*CompositeType) QualifiedString ¶
func (t *CompositeType) QualifiedString() string
func (*CompositeType) Resolve ¶
func (t *CompositeType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*CompositeType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *CompositeType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
func (*CompositeType) String ¶
func (t *CompositeType) String() string
func (*CompositeType) TypeAnnotationState ¶
func (*CompositeType) TypeAnnotationState() TypeAnnotationState
func (*CompositeType) TypeRequirements ¶
func (t *CompositeType) TypeRequirements() []*CompositeType
func (*CompositeType) Unify ¶
func (*CompositeType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type ConformanceError ¶
type ConformanceError struct { CompositeType *CompositeType InterfaceType *InterfaceType InitializerMismatch *InitializerMismatch MissingMembers []*Member MemberMismatches []MemberMismatch MissingNestedCompositeTypes []*CompositeType Pos ast.Position InterfaceTypeIsTypeRequirement bool }
func (*ConformanceError) EndPosition ¶
func (e *ConformanceError) EndPosition() ast.Position
func (*ConformanceError) Error ¶
func (e *ConformanceError) Error() string
func (*ConformanceError) ErrorNotes ¶ added in v0.2.0
func (e *ConformanceError) ErrorNotes() (notes []errors.ErrorNote)
func (*ConformanceError) StartPosition ¶
func (e *ConformanceError) StartPosition() ast.Position
type ConstantSizedArrayLiteralSizeError ¶
func (*ConstantSizedArrayLiteralSizeError) Error ¶
func (e *ConstantSizedArrayLiteralSizeError) Error() string
func (*ConstantSizedArrayLiteralSizeError) SecondaryError ¶
func (e *ConstantSizedArrayLiteralSizeError) SecondaryError() string
type ConstantSizedType ¶
ConstantSizedType is a constant sized array type
func (*ConstantSizedType) AllowsValueIndexingAssignment ¶ added in v0.7.0
func (*ConstantSizedType) AllowsValueIndexingAssignment() bool
func (*ConstantSizedType) ElementType ¶
func (t *ConstantSizedType) ElementType(_ bool) Type
func (*ConstantSizedType) Equal ¶
func (t *ConstantSizedType) Equal(other Type) bool
func (*ConstantSizedType) GetMembers ¶ added in v0.7.0
func (t *ConstantSizedType) GetMembers() map[string]MemberResolver
func (*ConstantSizedType) ID ¶
func (t *ConstantSizedType) ID() TypeID
func (*ConstantSizedType) IndexingType ¶
func (t *ConstantSizedType) IndexingType() Type
func (*ConstantSizedType) IsEquatable ¶ added in v0.7.0
func (*ConstantSizedType) IsEquatable() bool
func (*ConstantSizedType) IsExternallyReturnable ¶ added in v0.11.0
func (t *ConstantSizedType) IsExternallyReturnable(results map[*Member]bool) bool
func (*ConstantSizedType) IsInvalidType ¶
func (t *ConstantSizedType) IsInvalidType() bool
func (*ConstantSizedType) IsResourceType ¶
func (t *ConstantSizedType) IsResourceType() bool
func (*ConstantSizedType) IsStorable ¶ added in v0.5.0
func (t *ConstantSizedType) IsStorable(results map[*Member]bool) bool
func (*ConstantSizedType) IsType ¶
func (*ConstantSizedType) IsType()
func (*ConstantSizedType) QualifiedString ¶
func (t *ConstantSizedType) QualifiedString() string
func (*ConstantSizedType) Resolve ¶
func (t *ConstantSizedType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*ConstantSizedType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *ConstantSizedType) RewriteWithRestrictedTypes() (Type, bool)
func (*ConstantSizedType) String ¶
func (t *ConstantSizedType) String() string
func (*ConstantSizedType) TypeAnnotationState ¶
func (t *ConstantSizedType) TypeAnnotationState() TypeAnnotationState
func (*ConstantSizedType) Unify ¶
func (t *ConstantSizedType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type ConstructorFunctionType ¶ added in v0.15.0
type ConstructorFunctionType struct {
*FunctionType
}
type ContainedType ¶
ContainedType is a type which might have a container type
type ContainerKind ¶
type ContainerKind uint
const ( ContainerKindUnknown ContainerKind = iota ContainerKindInterface ContainerKindComposite )
func (ContainerKind) String ¶
func (i ContainerKind) String() string
type ContainerType ¶
type ContainerType interface { Type GetNestedTypes() *StringTypeOrderedMap // contains filtered or unexported methods }
ContainerType is a type which might have nested types
type ControlStatementError ¶
type ControlStatementError struct { ControlStatement common.ControlStatement ast.Range }
func (*ControlStatementError) Error ¶
func (e *ControlStatementError) Error() string
type CryptoAlgorithm ¶ added in v0.14.4
type CyclicImportsError ¶ added in v0.10.0
func (*CyclicImportsError) Error ¶ added in v0.10.0
func (e *CyclicImportsError) Error() string
type DeclarationKindMismatchError ¶
type DeclarationKindMismatchError struct { ExpectedDeclarationKind common.DeclarationKind ActualDeclarationKind common.DeclarationKind ast.Range }
func (*DeclarationKindMismatchError) Error ¶
func (e *DeclarationKindMismatchError) Error() string
func (*DeclarationKindMismatchError) SecondaryError ¶
func (e *DeclarationKindMismatchError) SecondaryError() string
type DictionaryEntryType ¶
type DictionaryType ¶
type DictionaryType struct { KeyType Type ValueType Type // contains filtered or unexported fields }
func (*DictionaryType) AllowsValueIndexingAssignment ¶ added in v0.7.0
func (*DictionaryType) AllowsValueIndexingAssignment() bool
func (*DictionaryType) ElementType ¶
func (t *DictionaryType) ElementType(_ bool) Type
func (*DictionaryType) Equal ¶
func (t *DictionaryType) Equal(other Type) bool
func (*DictionaryType) GetMembers ¶ added in v0.7.0
func (t *DictionaryType) GetMembers() map[string]MemberResolver
func (*DictionaryType) ID ¶
func (t *DictionaryType) ID() TypeID
func (*DictionaryType) IndexingType ¶
func (t *DictionaryType) IndexingType() Type
func (*DictionaryType) IsEquatable ¶ added in v0.7.0
func (*DictionaryType) IsEquatable() bool
func (*DictionaryType) IsExternallyReturnable ¶ added in v0.11.0
func (t *DictionaryType) IsExternallyReturnable(results map[*Member]bool) bool
func (*DictionaryType) IsInvalidType ¶
func (t *DictionaryType) IsInvalidType() bool
func (*DictionaryType) IsResourceType ¶
func (t *DictionaryType) IsResourceType() bool
func (*DictionaryType) IsStorable ¶ added in v0.5.0
func (t *DictionaryType) IsStorable(results map[*Member]bool) bool
func (*DictionaryType) IsType ¶
func (*DictionaryType) IsType()
func (*DictionaryType) QualifiedString ¶
func (t *DictionaryType) QualifiedString() string
func (*DictionaryType) Resolve ¶
func (t *DictionaryType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*DictionaryType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *DictionaryType) RewriteWithRestrictedTypes() (Type, bool)
func (*DictionaryType) String ¶
func (t *DictionaryType) String() string
func (*DictionaryType) TypeAnnotationState ¶
func (t *DictionaryType) TypeAnnotationState() TypeAnnotationState
func (*DictionaryType) Unify ¶
func (t *DictionaryType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type DuplicateConformanceError ¶
type DuplicateConformanceError struct { CompositeType *CompositeType InterfaceType *InterfaceType ast.Range }
func (*DuplicateConformanceError) Error ¶
func (e *DuplicateConformanceError) Error() string
type Elaboration ¶
type Elaboration struct { FunctionDeclarationFunctionTypes map[*ast.FunctionDeclaration]*FunctionType VariableDeclarationValueTypes map[*ast.VariableDeclaration]Type VariableDeclarationSecondValueTypes map[*ast.VariableDeclaration]Type VariableDeclarationTargetTypes map[*ast.VariableDeclaration]Type AssignmentStatementValueTypes map[*ast.AssignmentStatement]Type AssignmentStatementTargetTypes map[*ast.AssignmentStatement]Type CompositeDeclarationTypes map[*ast.CompositeDeclaration]*CompositeType ConstructorFunctionTypes map[*ast.SpecialFunctionDeclaration]*ConstructorFunctionType FunctionExpressionFunctionType map[*ast.FunctionExpression]*FunctionType InvocationExpressionArgumentTypes map[*ast.InvocationExpression][]Type InvocationExpressionParameterTypes map[*ast.InvocationExpression][]Type InvocationExpressionReturnTypes map[*ast.InvocationExpression]Type InterfaceDeclarationTypes map[*ast.InterfaceDeclaration]*InterfaceType CastingStaticValueTypes map[*ast.CastingExpression]Type CastingTargetTypes map[*ast.CastingExpression]Type ReturnStatementValueTypes map[*ast.ReturnStatement]Type ReturnStatementReturnTypes map[*ast.ReturnStatement]Type BinaryExpressionResultTypes map[*ast.BinaryExpression]Type BinaryExpressionRightTypes map[*ast.BinaryExpression]Type MemberExpressionMemberInfos map[*ast.MemberExpression]MemberInfo ArrayExpressionArgumentTypes map[*ast.ArrayExpression][]Type ArrayExpressionElementType map[*ast.ArrayExpression]Type DictionaryExpressionType map[*ast.DictionaryExpression]*DictionaryType DictionaryExpressionEntryTypes map[*ast.DictionaryExpression][]DictionaryEntryType TransactionDeclarationTypes map[*ast.TransactionDeclaration]*TransactionType SwapStatementLeftTypes map[*ast.SwapStatement]Type SwapStatementRightTypes map[*ast.SwapStatement]Type IsResourceMoveIndexExpression map[*ast.IndexExpression]bool CompositeNestedDeclarations map[*ast.CompositeDeclaration]map[string]ast.Declaration InterfaceNestedDeclarations map[*ast.InterfaceDeclaration]map[string]ast.Declaration PostConditionsRewrite map[*ast.Conditions]PostConditionsRewrite EmitStatementEventTypes map[*ast.EmitStatement]*CompositeType // Keyed by qualified identifier CompositeTypes map[TypeID]*CompositeType InterfaceTypes map[TypeID]*InterfaceType InvocationExpressionTypeArguments map[*ast.InvocationExpression]*TypeParameterTypeOrderedMap IdentifierInInvocationTypes map[*ast.IdentifierExpression]Type ImportDeclarationsResolvedLocations map[*ast.ImportDeclaration][]ResolvedLocation GlobalValues *StringVariableOrderedMap GlobalTypes *StringVariableOrderedMap TransactionTypes []*TransactionType EffectivePredeclaredValues map[string]ValueDeclaration EffectivePredeclaredTypes map[string]TypeDeclaration // contains filtered or unexported fields }
func NewElaboration ¶
func NewElaboration() *Elaboration
func (*Elaboration) FunctionEntryPointType ¶ added in v0.13.0
func (e *Elaboration) FunctionEntryPointType() (*FunctionType, error)
FunctionEntryPointType returns the type of the entry point function declaration, if any.
Returns an error if no valid entry point function declaration exists.
func (*Elaboration) IsChecking ¶ added in v0.13.0
func (e *Elaboration) IsChecking() bool
type ElaborationImport ¶ added in v0.13.0
type ElaborationImport struct {
Elaboration *Elaboration
}
ElaborationImport
func (ElaborationImport) AllTypeElements ¶ added in v0.13.0
func (i ElaborationImport) AllTypeElements() *StringImportElementOrderedMap
func (ElaborationImport) AllValueElements ¶ added in v0.13.0
func (i ElaborationImport) AllValueElements() *StringImportElementOrderedMap
func (ElaborationImport) IsChecking ¶ added in v0.13.0
func (i ElaborationImport) IsChecking() bool
func (ElaborationImport) IsImportableType ¶ added in v0.13.0
func (i ElaborationImport) IsImportableType(name string) bool
func (ElaborationImport) IsImportableValue ¶ added in v0.13.0
func (i ElaborationImport) IsImportableValue(name string) bool
type EmitImportedEventError ¶
func (*EmitImportedEventError) Error ¶
func (e *EmitImportedEventError) Error() string
type EmitNonEventError ¶
func (*EmitNonEventError) Error ¶
func (e *EmitNonEventError) Error() string
type FieldTypeNotStorableError ¶ added in v0.5.0
type FieldTypeNotStorableError struct { // Field's name Name string // Field's type Type Type // Start position of the error Pos ast.Position }
func (*FieldTypeNotStorableError) EndPosition ¶ added in v0.10.0
func (e *FieldTypeNotStorableError) EndPosition() ast.Position
func (*FieldTypeNotStorableError) Error ¶ added in v0.5.0
func (e *FieldTypeNotStorableError) Error() string
func (*FieldTypeNotStorableError) StartPosition ¶ added in v0.10.0
func (e *FieldTypeNotStorableError) StartPosition() ast.Position
type FieldUninitializedError ¶
func (*FieldUninitializedError) EndPosition ¶
func (e *FieldUninitializedError) EndPosition() ast.Position
func (*FieldUninitializedError) Error ¶
func (e *FieldUninitializedError) Error() string
func (*FieldUninitializedError) SecondaryError ¶
func (e *FieldUninitializedError) SecondaryError() string
func (*FieldUninitializedError) StartPosition ¶
func (e *FieldUninitializedError) StartPosition() ast.Position
type FixedPointNumericType ¶ added in v0.15.0
type FixedPointNumericType struct {
// contains filtered or unexported fields
}
FixedPointNumericType represents all the types in the fixed-point range.
func NewFixedPointNumericType ¶ added in v0.15.0
func NewFixedPointNumericType(typeName string) *FixedPointNumericType
func (*FixedPointNumericType) Equal ¶ added in v0.15.0
func (t *FixedPointNumericType) Equal(other Type) bool
func (*FixedPointNumericType) GetMembers ¶ added in v0.15.0
func (t *FixedPointNumericType) GetMembers() map[string]MemberResolver
func (*FixedPointNumericType) ID ¶ added in v0.15.0
func (t *FixedPointNumericType) ID() TypeID
func (*FixedPointNumericType) IsEquatable ¶ added in v0.15.0
func (*FixedPointNumericType) IsEquatable() bool
func (*FixedPointNumericType) IsExternallyReturnable ¶ added in v0.15.0
func (*FixedPointNumericType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*FixedPointNumericType) IsInvalidType ¶ added in v0.15.0
func (*FixedPointNumericType) IsInvalidType() bool
func (*FixedPointNumericType) IsResourceType ¶ added in v0.15.0
func (*FixedPointNumericType) IsResourceType() bool
func (*FixedPointNumericType) IsStorable ¶ added in v0.15.0
func (*FixedPointNumericType) IsStorable(_ map[*Member]bool) bool
func (*FixedPointNumericType) IsType ¶ added in v0.15.0
func (*FixedPointNumericType) IsType()
func (*FixedPointNumericType) MaxFractional ¶ added in v0.15.0
func (t *FixedPointNumericType) MaxFractional() *big.Int
func (*FixedPointNumericType) MaxInt ¶ added in v0.15.0
func (t *FixedPointNumericType) MaxInt() *big.Int
func (*FixedPointNumericType) MinFractional ¶ added in v0.15.0
func (t *FixedPointNumericType) MinFractional() *big.Int
func (*FixedPointNumericType) MinInt ¶ added in v0.15.0
func (t *FixedPointNumericType) MinInt() *big.Int
func (*FixedPointNumericType) QualifiedString ¶ added in v0.15.0
func (t *FixedPointNumericType) QualifiedString() string
func (*FixedPointNumericType) Resolve ¶ added in v0.15.0
func (t *FixedPointNumericType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*FixedPointNumericType) RewriteWithRestrictedTypes ¶ added in v0.15.0
func (t *FixedPointNumericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
func (*FixedPointNumericType) Scale ¶ added in v0.15.0
func (t *FixedPointNumericType) Scale() uint
func (*FixedPointNumericType) String ¶ added in v0.15.0
func (t *FixedPointNumericType) String() string
func (*FixedPointNumericType) SupportsSaturatingAdd ¶ added in v0.15.0
func (t *FixedPointNumericType) SupportsSaturatingAdd() bool
func (*FixedPointNumericType) SupportsSaturatingDivide ¶ added in v0.15.0
func (t *FixedPointNumericType) SupportsSaturatingDivide() bool
func (*FixedPointNumericType) SupportsSaturatingMultiply ¶ added in v0.15.0
func (t *FixedPointNumericType) SupportsSaturatingMultiply() bool
func (*FixedPointNumericType) SupportsSaturatingSubtract ¶ added in v0.15.0
func (t *FixedPointNumericType) SupportsSaturatingSubtract() bool
func (*FixedPointNumericType) TypeAnnotationState ¶ added in v0.15.0
func (*FixedPointNumericType) TypeAnnotationState() TypeAnnotationState
func (*FixedPointNumericType) Unify ¶ added in v0.15.0
func (*FixedPointNumericType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
func (*FixedPointNumericType) WithFractionalRange ¶ added in v0.15.0
func (t *FixedPointNumericType) WithFractionalRange( minFractional *big.Int, maxFractional *big.Int, ) *FixedPointNumericType
func (*FixedPointNumericType) WithIntRange ¶ added in v0.15.0
func (t *FixedPointNumericType) WithIntRange(minInt *big.Int, maxInt *big.Int) *FixedPointNumericType
func (*FixedPointNumericType) WithSaturatingAdd ¶ added in v0.15.0
func (t *FixedPointNumericType) WithSaturatingAdd() *FixedPointNumericType
func (*FixedPointNumericType) WithSaturatingDivide ¶ added in v0.15.0
func (t *FixedPointNumericType) WithSaturatingDivide() *FixedPointNumericType
func (*FixedPointNumericType) WithSaturatingMultiply ¶ added in v0.15.0
func (t *FixedPointNumericType) WithSaturatingMultiply() *FixedPointNumericType
func (*FixedPointNumericType) WithSaturatingSubtract ¶ added in v0.15.0
func (t *FixedPointNumericType) WithSaturatingSubtract() *FixedPointNumericType
func (*FixedPointNumericType) WithScale ¶ added in v0.15.0
func (t *FixedPointNumericType) WithScale(scale uint) *FixedPointNumericType
type FractionalRangedType ¶
type FunctionActivation ¶
type FunctionActivation struct { ReturnType Type Loops int Switches int ValueActivationDepth int ReturnInfo *ReturnInfo ReportedDeadCode bool InitializationInfo *InitializationInfo }
func (FunctionActivation) InLoop ¶
func (a FunctionActivation) InLoop() bool
func (FunctionActivation) InSwitch ¶ added in v0.10.0
func (a FunctionActivation) InSwitch() bool
type FunctionActivations ¶
type FunctionActivations struct {
// contains filtered or unexported fields
}
func (*FunctionActivations) Current ¶
func (a *FunctionActivations) Current() *FunctionActivation
func (*FunctionActivations) EnterFunction ¶
func (a *FunctionActivations) EnterFunction(functionType *FunctionType, valueActivationDepth int)
func (*FunctionActivations) IsLocal ¶
func (a *FunctionActivations) IsLocal() bool
func (*FunctionActivations) LeaveFunction ¶
func (a *FunctionActivations) LeaveFunction()
func (*FunctionActivations) WithFunction ¶
func (a *FunctionActivations) WithFunction(functionType *FunctionType, valueActivationDepth int, f func())
func (*FunctionActivations) WithLoop ¶
func (a *FunctionActivations) WithLoop(f func())
func (*FunctionActivations) WithSwitch ¶ added in v0.10.0
func (a *FunctionActivations) WithSwitch(f func())
type FunctionExpressionInConditionError ¶
func (*FunctionExpressionInConditionError) Error ¶
func (e *FunctionExpressionInConditionError) Error() string
type FunctionType ¶
type FunctionType struct { TypeParameters []*TypeParameter Parameters []*Parameter ReturnTypeAnnotation *TypeAnnotation RequiredArgumentCount *int ArgumentExpressionsCheck ArgumentExpressionsCheck Members *StringMemberOrderedMap }
FunctionType
func (*FunctionType) ArgumentLabels ¶
func (t *FunctionType) ArgumentLabels() (argumentLabels []string)
func (*FunctionType) CheckArgumentExpressions ¶
func (t *FunctionType) CheckArgumentExpressions( checker *Checker, argumentExpressions []ast.Expression, invocationRange ast.Range, )
func (*FunctionType) Equal ¶
func (t *FunctionType) Equal(other Type) bool
NOTE: parameter names and argument labels are intentionally *not* considered!
func (*FunctionType) GetMembers ¶ added in v0.7.0
func (t *FunctionType) GetMembers() map[string]MemberResolver
func (*FunctionType) HasSameArgumentLabels ¶ added in v0.7.0
func (t *FunctionType) HasSameArgumentLabels(other *FunctionType) bool
func (*FunctionType) ID ¶
func (t *FunctionType) ID() TypeID
NOTE: parameter names and argument labels are *not* part of the ID!
func (*FunctionType) InvocationFunctionType ¶
func (t *FunctionType) InvocationFunctionType() *FunctionType
func (*FunctionType) IsEquatable ¶ added in v0.7.0
func (*FunctionType) IsEquatable() bool
func (*FunctionType) IsExternallyReturnable ¶ added in v0.11.0
func (t *FunctionType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*FunctionType) IsInvalidType ¶
func (t *FunctionType) IsInvalidType() bool
func (*FunctionType) IsResourceType ¶
func (*FunctionType) IsResourceType() bool
func (*FunctionType) IsStorable ¶ added in v0.5.0
func (t *FunctionType) IsStorable(_ map[*Member]bool) bool
func (*FunctionType) IsType ¶
func (*FunctionType) IsType()
func (*FunctionType) QualifiedString ¶
func (t *FunctionType) QualifiedString() string
func (*FunctionType) Resolve ¶
func (t *FunctionType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*FunctionType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *FunctionType) RewriteWithRestrictedTypes() (Type, bool)
func (*FunctionType) String ¶
func (t *FunctionType) String() string
func (*FunctionType) TypeAnnotationState ¶
func (t *FunctionType) TypeAnnotationState() TypeAnnotationState
func (*FunctionType) Unify ¶
func (t *FunctionType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) ( result bool, )
type GenericType ¶
type GenericType struct {
TypeParameter *TypeParameter
}
GenericType
func (*GenericType) Equal ¶
func (t *GenericType) Equal(other Type) bool
func (*GenericType) GetMembers ¶ added in v0.7.0
func (t *GenericType) GetMembers() map[string]MemberResolver
func (*GenericType) ID ¶
func (t *GenericType) ID() TypeID
func (*GenericType) IsEquatable ¶ added in v0.7.0
func (*GenericType) IsEquatable() bool
func (*GenericType) IsExternallyReturnable ¶ added in v0.11.0
func (*GenericType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*GenericType) IsInvalidType ¶
func (*GenericType) IsInvalidType() bool
func (*GenericType) IsResourceType ¶
func (*GenericType) IsResourceType() bool
func (*GenericType) IsStorable ¶ added in v0.5.0
func (*GenericType) IsStorable(_ map[*Member]bool) bool
func (*GenericType) IsType ¶
func (*GenericType) IsType()
func (*GenericType) QualifiedString ¶
func (t *GenericType) QualifiedString() string
func (*GenericType) Resolve ¶
func (t *GenericType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*GenericType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *GenericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
func (*GenericType) String ¶
func (t *GenericType) String() string
func (*GenericType) TypeAnnotationState ¶
func (*GenericType) TypeAnnotationState() TypeAnnotationState
func (*GenericType) Unify ¶
func (t *GenericType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type HashAlgorithm ¶ added in v0.14.0
type HashAlgorithm uint8
const ( // Supported hashing algorithms HashAlgorithmUnknown HashAlgorithm = iota HashAlgorithmSHA2_256 HashAlgorithmSHA2_384 HashAlgorithmSHA3_256 HashAlgorithmSHA3_384 )
func (HashAlgorithm) DocString ¶ added in v0.14.0
func (algo HashAlgorithm) DocString() string
func (HashAlgorithm) Name ¶ added in v0.14.0
func (algo HashAlgorithm) Name() string
func (HashAlgorithm) RawValue ¶ added in v0.14.0
func (algo HashAlgorithm) RawValue() uint8
func (HashAlgorithm) String ¶ added in v0.14.0
func (i HashAlgorithm) String() string
type Hint ¶ added in v0.9.0
type Hint interface { Hint() string ast.HasPosition // contains filtered or unexported methods }
type Import ¶ added in v0.5.0
type Import interface { AllValueElements() *StringImportElementOrderedMap IsImportableValue(name string) bool AllTypeElements() *StringImportElementOrderedMap IsImportableType(name string) bool IsChecking() bool }
type ImportElement ¶ added in v0.5.0
type ImportElement struct { DeclarationKind common.DeclarationKind Access ast.Access Type Type ArgumentLabels []string }
ImportElement
type ImportHandlerFunc ¶ added in v0.5.0
type ImportedProgramError ¶
func (*ImportedProgramError) ChildErrors ¶
func (e *ImportedProgramError) ChildErrors() []error
func (*ImportedProgramError) Error ¶
func (e *ImportedProgramError) Error() string
func (*ImportedProgramError) ImportLocation ¶
func (e *ImportedProgramError) ImportLocation() common.Location
type IncorrectArgumentLabelError ¶
type IncorrectArgumentLabelError struct { ExpectedArgumentLabel string ActualArgumentLabel string ast.Range }
func (*IncorrectArgumentLabelError) Error ¶
func (e *IncorrectArgumentLabelError) Error() string
func (*IncorrectArgumentLabelError) SecondaryError ¶
func (e *IncorrectArgumentLabelError) SecondaryError() string
type IncorrectTransferOperationError ¶
type IncorrectTransferOperationError struct { ActualOperation ast.TransferOperation ExpectedOperation ast.TransferOperation ast.Range }
func (*IncorrectTransferOperationError) Error ¶
func (e *IncorrectTransferOperationError) Error() string
func (*IncorrectTransferOperationError) SecondaryError ¶
func (e *IncorrectTransferOperationError) SecondaryError() string
type InitializationInfo ¶
type InitializationInfo struct { ContainerType Type FieldMembers *MemberAstFieldDeclarationOrderedMap InitializedFieldMembers *MemberSet }
func NewInitializationInfo ¶
func NewInitializationInfo( containerType Type, fieldMembers *MemberAstFieldDeclarationOrderedMap, ) *InitializationInfo
func (*InitializationInfo) InitializationComplete ¶
func (info *InitializationInfo) InitializationComplete() bool
InitializationComplete returns true if all fields of the container were initialized, false if some fields are uninitialized
type InitializerMismatch ¶
type IntegerRangedType ¶
type InterfaceResourceInfoOrderedMap ¶ added in v0.13.0
type InterfaceResourceInfoOrderedMap struct {
// contains filtered or unexported fields
}
InterfaceResourceInfoOrderedMap
func NewInterfaceResourceInfoOrderedMap ¶ added in v0.13.0
func NewInterfaceResourceInfoOrderedMap() *InterfaceResourceInfoOrderedMap
NewInterfaceResourceInfoOrderedMap creates a new InterfaceResourceInfoOrderedMap.
func (*InterfaceResourceInfoOrderedMap) Clear ¶ added in v0.14.1
func (om *InterfaceResourceInfoOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*InterfaceResourceInfoOrderedMap) Delete ¶ added in v0.13.0
func (om *InterfaceResourceInfoOrderedMap) Delete(key interface{}) (oldValue ResourceInfo, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*InterfaceResourceInfoOrderedMap) Foreach ¶ added in v0.13.0
func (om *InterfaceResourceInfoOrderedMap) Foreach(f func(key interface{}, value ResourceInfo))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*InterfaceResourceInfoOrderedMap) Get ¶ added in v0.13.0
func (om *InterfaceResourceInfoOrderedMap) Get(key interface{}) (result ResourceInfo, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*InterfaceResourceInfoOrderedMap) GetPair ¶ added in v0.13.0
func (om *InterfaceResourceInfoOrderedMap) GetPair(key interface{}) *InterfaceResourceInfoPair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*InterfaceResourceInfoOrderedMap) Len ¶ added in v0.13.0
func (om *InterfaceResourceInfoOrderedMap) Len() int
Len returns the length of the ordered map.
func (*InterfaceResourceInfoOrderedMap) Newest ¶ added in v0.13.0
func (om *InterfaceResourceInfoOrderedMap) Newest() *InterfaceResourceInfoPair
Newest returns a pointer to the newest pair.
func (*InterfaceResourceInfoOrderedMap) Oldest ¶ added in v0.13.0
func (om *InterfaceResourceInfoOrderedMap) Oldest() *InterfaceResourceInfoPair
Oldest returns a pointer to the oldest pair.
func (*InterfaceResourceInfoOrderedMap) Set ¶ added in v0.13.0
func (om *InterfaceResourceInfoOrderedMap) Set(key interface{}, value ResourceInfo) (oldValue ResourceInfo, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type InterfaceResourceInfoPair ¶ added in v0.13.0
type InterfaceResourceInfoPair struct { Key interface{} Value ResourceInfo // contains filtered or unexported fields }
InterfaceResourceInfoPair
func (*InterfaceResourceInfoPair) Next ¶ added in v0.13.0
func (p *InterfaceResourceInfoPair) Next() *InterfaceResourceInfoPair
Next returns a pointer to the next pair.
func (*InterfaceResourceInfoPair) Prev ¶ added in v0.13.0
func (p *InterfaceResourceInfoPair) Prev() *InterfaceResourceInfoPair
Prev returns a pointer to the previous pair.
type InterfaceSet ¶
type InterfaceSet InterfaceTypeStructOrderedMap
func NewInterfaceSet ¶ added in v0.13.0
func NewInterfaceSet() *InterfaceSet
func (*InterfaceSet) Add ¶ added in v0.3.0
func (s *InterfaceSet) Add(interfaceType *InterfaceType)
func (*InterfaceSet) ForEach ¶ added in v0.13.0
func (s *InterfaceSet) ForEach(f func(*InterfaceType))
func (*InterfaceSet) Includes ¶ added in v0.3.0
func (s *InterfaceSet) Includes(interfaceType *InterfaceType) bool
func (*InterfaceSet) IsSubsetOf ¶
func (s *InterfaceSet) IsSubsetOf(other *InterfaceSet) bool
func (*InterfaceSet) Len ¶ added in v0.13.0
func (s *InterfaceSet) Len() int
type InterfaceType ¶
type InterfaceType struct { Location common.Location Identifier string CompositeKind common.CompositeKind Members *StringMemberOrderedMap Fields []string // TODO: add support for overloaded initializers InitializerParameters []*Parameter ContainerType Type // contains filtered or unexported fields }
func (*InterfaceType) Equal ¶
func (t *InterfaceType) Equal(other Type) bool
func (*InterfaceType) GetCompositeKind ¶
func (t *InterfaceType) GetCompositeKind() common.CompositeKind
func (*InterfaceType) GetContainerType ¶
func (t *InterfaceType) GetContainerType() Type
func (*InterfaceType) GetLocation ¶
func (t *InterfaceType) GetLocation() common.Location
func (*InterfaceType) GetMembers ¶ added in v0.7.0
func (t *InterfaceType) GetMembers() map[string]MemberResolver
func (*InterfaceType) GetNestedTypes ¶ added in v0.13.2
func (t *InterfaceType) GetNestedTypes() *StringTypeOrderedMap
func (*InterfaceType) ID ¶
func (t *InterfaceType) ID() TypeID
func (*InterfaceType) IsEquatable ¶ added in v0.7.0
func (*InterfaceType) IsEquatable() bool
func (*InterfaceType) IsExternallyReturnable ¶ added in v0.11.0
func (t *InterfaceType) IsExternallyReturnable(results map[*Member]bool) bool
func (*InterfaceType) IsInvalidType ¶
func (t *InterfaceType) IsInvalidType() bool
func (*InterfaceType) IsResourceType ¶
func (t *InterfaceType) IsResourceType() bool
func (*InterfaceType) IsStorable ¶ added in v0.5.0
func (t *InterfaceType) IsStorable(results map[*Member]bool) bool
func (*InterfaceType) IsType ¶
func (*InterfaceType) IsType()
func (*InterfaceType) QualifiedIdentifier ¶
func (t *InterfaceType) QualifiedIdentifier() string
func (*InterfaceType) QualifiedString ¶
func (t *InterfaceType) QualifiedString() string
func (*InterfaceType) Resolve ¶
func (t *InterfaceType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*InterfaceType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *InterfaceType) RewriteWithRestrictedTypes() (Type, bool)
func (*InterfaceType) String ¶
func (t *InterfaceType) String() string
func (*InterfaceType) TypeAnnotationState ¶
func (*InterfaceType) TypeAnnotationState() TypeAnnotationState
func (*InterfaceType) Unify ¶
func (*InterfaceType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type InterfaceTypeStructOrderedMap ¶ added in v0.13.0
type InterfaceTypeStructOrderedMap struct {
// contains filtered or unexported fields
}
InterfaceTypeStructOrderedMap
func NewInterfaceTypeStructOrderedMap ¶ added in v0.13.0
func NewInterfaceTypeStructOrderedMap() *InterfaceTypeStructOrderedMap
NewInterfaceTypeStructOrderedMap creates a new InterfaceTypeStructOrderedMap.
func (*InterfaceTypeStructOrderedMap) Clear ¶ added in v0.14.1
func (om *InterfaceTypeStructOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*InterfaceTypeStructOrderedMap) Delete ¶ added in v0.13.0
func (om *InterfaceTypeStructOrderedMap) Delete(key *InterfaceType) (oldValue struct{}, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*InterfaceTypeStructOrderedMap) Foreach ¶ added in v0.13.0
func (om *InterfaceTypeStructOrderedMap) Foreach(f func(key *InterfaceType, value struct{}))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*InterfaceTypeStructOrderedMap) Get ¶ added in v0.13.0
func (om *InterfaceTypeStructOrderedMap) Get(key *InterfaceType) (result struct{}, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*InterfaceTypeStructOrderedMap) GetPair ¶ added in v0.13.0
func (om *InterfaceTypeStructOrderedMap) GetPair(key *InterfaceType) *InterfaceTypeStructPair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*InterfaceTypeStructOrderedMap) Len ¶ added in v0.13.0
func (om *InterfaceTypeStructOrderedMap) Len() int
Len returns the length of the ordered map.
func (*InterfaceTypeStructOrderedMap) Newest ¶ added in v0.13.0
func (om *InterfaceTypeStructOrderedMap) Newest() *InterfaceTypeStructPair
Newest returns a pointer to the newest pair.
func (*InterfaceTypeStructOrderedMap) Oldest ¶ added in v0.13.0
func (om *InterfaceTypeStructOrderedMap) Oldest() *InterfaceTypeStructPair
Oldest returns a pointer to the oldest pair.
func (*InterfaceTypeStructOrderedMap) Set ¶ added in v0.13.0
func (om *InterfaceTypeStructOrderedMap) Set(key *InterfaceType, value struct{}) (oldValue struct{}, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type InterfaceTypeStructPair ¶ added in v0.13.0
type InterfaceTypeStructPair struct { Key *InterfaceType Value struct{} // contains filtered or unexported fields }
InterfaceTypeStructPair
func (*InterfaceTypeStructPair) Next ¶ added in v0.13.0
func (p *InterfaceTypeStructPair) Next() *InterfaceTypeStructPair
Next returns a pointer to the next pair.
func (*InterfaceTypeStructPair) Prev ¶ added in v0.13.0
func (p *InterfaceTypeStructPair) Prev() *InterfaceTypeStructPair
Prev returns a pointer to the previous pair.
type InvalidAccessError ¶
type InvalidAccessError struct { Name string RestrictingAccess ast.Access DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidAccessError) Error ¶
func (e *InvalidAccessError) Error() string
type InvalidAccessModifierError ¶
type InvalidAccessModifierError struct { DeclarationKind common.DeclarationKind Explanation string Access ast.Access Pos ast.Position }
func (*InvalidAccessModifierError) EndPosition ¶
func (e *InvalidAccessModifierError) EndPosition() ast.Position
func (*InvalidAccessModifierError) Error ¶
func (e *InvalidAccessModifierError) Error() string
func (*InvalidAccessModifierError) StartPosition ¶
func (e *InvalidAccessModifierError) StartPosition() ast.Position
type InvalidAddressLiteralError ¶
func (*InvalidAddressLiteralError) Error ¶
func (e *InvalidAddressLiteralError) Error() string
type InvalidAssignmentAccessError ¶
type InvalidAssignmentAccessError struct { Name string RestrictingAccess ast.Access DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidAssignmentAccessError) Error ¶
func (e *InvalidAssignmentAccessError) Error() string
func (*InvalidAssignmentAccessError) SecondaryError ¶
func (e *InvalidAssignmentAccessError) SecondaryError() string
type InvalidAssignmentTargetError ¶
func (*InvalidAssignmentTargetError) Error ¶
func (e *InvalidAssignmentTargetError) Error() string
type InvalidBinaryOperandError ¶
type InvalidBinaryOperandError struct { Operation ast.Operation Side common.OperandSide ExpectedType Type ActualType Type ast.Range }
func (*InvalidBinaryOperandError) Error ¶
func (e *InvalidBinaryOperandError) Error() string
func (*InvalidBinaryOperandError) SecondaryError ¶
func (e *InvalidBinaryOperandError) SecondaryError() string
type InvalidBinaryOperandsError ¶
type InvalidBinaryOperandsError struct { Operation ast.Operation LeftType Type RightType Type ast.Range }
func (*InvalidBinaryOperandsError) Error ¶
func (e *InvalidBinaryOperandsError) Error() string
type InvalidCharacterLiteralError ¶
func (*InvalidCharacterLiteralError) Error ¶
func (e *InvalidCharacterLiteralError) Error() string
func (*InvalidCharacterLiteralError) SecondaryError ¶
func (e *InvalidCharacterLiteralError) SecondaryError() string
type InvalidConformanceError ¶
func (*InvalidConformanceError) Error ¶
func (e *InvalidConformanceError) Error() string
type InvalidConstantSizedTypeBaseError ¶
func (*InvalidConstantSizedTypeBaseError) Error ¶
func (e *InvalidConstantSizedTypeBaseError) Error() string
func (*InvalidConstantSizedTypeBaseError) SecondaryError ¶
func (e *InvalidConstantSizedTypeBaseError) SecondaryError() string
type InvalidConstantSizedTypeSizeError ¶
type InvalidConstantSizedTypeSizeError struct { ActualSize *big.Int ExpectedMinInt *big.Int ExpectedMaxInt *big.Int ast.Range }
func (*InvalidConstantSizedTypeSizeError) Error ¶
func (e *InvalidConstantSizedTypeSizeError) Error() string
func (*InvalidConstantSizedTypeSizeError) SecondaryError ¶
func (e *InvalidConstantSizedTypeSizeError) SecondaryError() string
type InvalidConstructionError ¶
func (*InvalidConstructionError) Error ¶
func (e *InvalidConstructionError) Error() string
type InvalidDeclarationError ¶
type InvalidDeclarationError struct { Identifier string Kind common.DeclarationKind ast.Range }
func (*InvalidDeclarationError) Error ¶
func (e *InvalidDeclarationError) Error() string
type InvalidDestructionError ¶
func (*InvalidDestructionError) Error ¶
func (e *InvalidDestructionError) Error() string
type InvalidDestructorError ¶
func (*InvalidDestructorError) Error ¶
func (e *InvalidDestructorError) Error() string
type InvalidDestructorParametersError ¶
func (*InvalidDestructorParametersError) Error ¶
func (e *InvalidDestructorParametersError) Error() string
func (*InvalidDestructorParametersError) SecondaryError ¶
func (e *InvalidDestructorParametersError) SecondaryError() string
type InvalidDictionaryKeyTypeError ¶
func (*InvalidDictionaryKeyTypeError) Error ¶
func (e *InvalidDictionaryKeyTypeError) Error() string
type InvalidEntryPointTypeError ¶ added in v0.11.0
type InvalidEntryPointTypeError struct {
Type Type
}
func (*InvalidEntryPointTypeError) Error ¶ added in v0.11.0
func (e *InvalidEntryPointTypeError) Error() string
type InvalidEnumCaseError ¶ added in v0.10.0
type InvalidEnumCaseError struct { ContainerDeclarationKind common.DeclarationKind ast.Range }
func (*InvalidEnumCaseError) Error ¶ added in v0.10.0
func (e *InvalidEnumCaseError) Error() string
type InvalidEnumConformancesError ¶ added in v0.10.0
func (*InvalidEnumConformancesError) Error ¶ added in v0.10.0
func (e *InvalidEnumConformancesError) Error() string
type InvalidEnumRawTypeError ¶ added in v0.10.0
func (*InvalidEnumRawTypeError) Error ¶ added in v0.10.0
func (e *InvalidEnumRawTypeError) Error() string
type InvalidEventParameterTypeError ¶
func (*InvalidEventParameterTypeError) Error ¶
func (e *InvalidEventParameterTypeError) Error() string
type InvalidEventUsageError ¶
func (*InvalidEventUsageError) Error ¶
func (e *InvalidEventUsageError) Error() string
type InvalidFailableResourceDowncastOutsideOptionalBindingError ¶
func (*InvalidFailableResourceDowncastOutsideOptionalBindingError) Error ¶
func (e *InvalidFailableResourceDowncastOutsideOptionalBindingError) Error() string
type InvalidFixedPointLiteralRangeError ¶
type InvalidFixedPointLiteralRangeError struct { ExpectedType Type ExpectedMinInt *big.Int ExpectedMinFractional *big.Int ExpectedMaxInt *big.Int ExpectedMaxFractional *big.Int ast.Range }
func (*InvalidFixedPointLiteralRangeError) Error ¶
func (e *InvalidFixedPointLiteralRangeError) Error() string
func (*InvalidFixedPointLiteralRangeError) SecondaryError ¶
func (e *InvalidFixedPointLiteralRangeError) SecondaryError() string
type InvalidFixedPointLiteralScaleError ¶
func (*InvalidFixedPointLiteralScaleError) Error ¶
func (e *InvalidFixedPointLiteralScaleError) Error() string
func (*InvalidFixedPointLiteralScaleError) SecondaryError ¶
func (e *InvalidFixedPointLiteralScaleError) SecondaryError() string
type InvalidImplementationError ¶
type InvalidImplementationError struct { ImplementedKind common.DeclarationKind ContainerKind common.DeclarationKind Pos ast.Position }
func (*InvalidImplementationError) EndPosition ¶
func (e *InvalidImplementationError) EndPosition() ast.Position
func (*InvalidImplementationError) Error ¶
func (e *InvalidImplementationError) Error() string
func (*InvalidImplementationError) StartPosition ¶
func (e *InvalidImplementationError) StartPosition() ast.Position
type InvalidIndexingError ¶
func (*InvalidIndexingError) Error ¶
func (e *InvalidIndexingError) Error() string
func (*InvalidIndexingError) SecondaryError ¶
func (e *InvalidIndexingError) SecondaryError() string
type InvalidIntegerLiteralRangeError ¶
type InvalidIntegerLiteralRangeError struct { ExpectedType Type ExpectedMinInt *big.Int ExpectedMaxInt *big.Int ast.Range }
func (*InvalidIntegerLiteralRangeError) Error ¶
func (e *InvalidIntegerLiteralRangeError) Error() string
func (*InvalidIntegerLiteralRangeError) SecondaryError ¶
func (e *InvalidIntegerLiteralRangeError) SecondaryError() string
type InvalidInterfaceDeclarationError ¶ added in v0.10.0
type InvalidInterfaceDeclarationError struct { CompositeKind common.CompositeKind ast.Range }
func (*InvalidInterfaceDeclarationError) Error ¶ added in v0.10.0
func (e *InvalidInterfaceDeclarationError) Error() string
type InvalidInterfaceTypeError ¶
func (*InvalidInterfaceTypeError) Error ¶
func (e *InvalidInterfaceTypeError) Error() string
func (*InvalidInterfaceTypeError) SecondaryError ¶
func (e *InvalidInterfaceTypeError) SecondaryError() string
type InvalidMoveError ¶
type InvalidMoveError struct { Name string DeclarationKind common.DeclarationKind Pos ast.Position }
func (*InvalidMoveError) EndPosition ¶
func (e *InvalidMoveError) EndPosition() ast.Position
func (*InvalidMoveError) Error ¶
func (e *InvalidMoveError) Error() string
func (*InvalidMoveError) StartPosition ¶
func (e *InvalidMoveError) StartPosition() ast.Position
type InvalidMoveOperationError ¶
func (*InvalidMoveOperationError) Error ¶
func (e *InvalidMoveOperationError) Error() string
func (*InvalidMoveOperationError) SecondaryError ¶
func (e *InvalidMoveOperationError) SecondaryError() string
type InvalidNameError ¶
func (*InvalidNameError) EndPosition ¶
func (e *InvalidNameError) EndPosition() ast.Position
func (*InvalidNameError) Error ¶
func (e *InvalidNameError) Error() string
func (*InvalidNameError) StartPosition ¶
func (e *InvalidNameError) StartPosition() ast.Position
type InvalidNestedDeclarationError ¶
type InvalidNestedDeclarationError struct { NestedDeclarationKind common.DeclarationKind ContainerDeclarationKind common.DeclarationKind ast.Range }
func (*InvalidNestedDeclarationError) Error ¶
func (e *InvalidNestedDeclarationError) Error() string
type InvalidNestedResourceMoveError ¶
func (*InvalidNestedResourceMoveError) EndPosition ¶
func (e *InvalidNestedResourceMoveError) EndPosition() ast.Position
func (*InvalidNestedResourceMoveError) Error ¶
func (e *InvalidNestedResourceMoveError) Error() string
func (*InvalidNestedResourceMoveError) StartPosition ¶
func (e *InvalidNestedResourceMoveError) StartPosition() ast.Position
type InvalidNestedTypeError ¶
type InvalidNestedTypeError struct {
Type *ast.NominalType
}
func (*InvalidNestedTypeError) EndPosition ¶
func (e *InvalidNestedTypeError) EndPosition() ast.Position
func (*InvalidNestedTypeError) Error ¶
func (e *InvalidNestedTypeError) Error() string
func (*InvalidNestedTypeError) StartPosition ¶
func (e *InvalidNestedTypeError) StartPosition() ast.Position
type InvalidNilCoalescingRightResourceOperandError ¶
func (*InvalidNilCoalescingRightResourceOperandError) Error ¶
func (e *InvalidNilCoalescingRightResourceOperandError) Error() string
type InvalidNonConformanceRestrictionError ¶
type InvalidNonConformanceRestrictionError struct { Type *InterfaceType ast.Range }
func (*InvalidNonConformanceRestrictionError) Error ¶
func (e *InvalidNonConformanceRestrictionError) Error() string
type InvalidNonEnumCaseError ¶ added in v0.10.0
type InvalidNonEnumCaseError struct { ContainerDeclarationKind common.DeclarationKind ast.Range }
func (*InvalidNonEnumCaseError) Error ¶ added in v0.10.0
func (e *InvalidNonEnumCaseError) Error() string
type InvalidNonIdentifierFailableResourceDowncast ¶ added in v0.12.0
func (*InvalidNonIdentifierFailableResourceDowncast) Error ¶ added in v0.12.0
func (e *InvalidNonIdentifierFailableResourceDowncast) Error() string
func (*InvalidNonIdentifierFailableResourceDowncast) SecondaryError ¶ added in v0.12.0
func (e *InvalidNonIdentifierFailableResourceDowncast) SecondaryError() string
type InvalidNonStorableTransactionParameterTypeError ¶ added in v0.11.0
func (*InvalidNonStorableTransactionParameterTypeError) Error ¶ added in v0.11.0
func (e *InvalidNonStorableTransactionParameterTypeError) Error() string
type InvalidOptionalChainingError ¶
func (*InvalidOptionalChainingError) Error ¶
func (e *InvalidOptionalChainingError) Error() string
type InvalidPathDomainError ¶
func (*InvalidPathDomainError) Error ¶
func (e *InvalidPathDomainError) Error() string
func (*InvalidPathDomainError) SecondaryError ¶
func (e *InvalidPathDomainError) SecondaryError() string
type InvalidPragmaError ¶ added in v0.7.0
func (*InvalidPragmaError) Error ¶ added in v0.7.0
func (e *InvalidPragmaError) Error() string
type InvalidResourceAnnotationError ¶
func (*InvalidResourceAnnotationError) Error ¶
func (e *InvalidResourceAnnotationError) Error() string
type InvalidResourceArrayMemberError ¶
type InvalidResourceArrayMemberError struct { Name string DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidResourceArrayMemberError) Error ¶
func (e *InvalidResourceArrayMemberError) Error() string
type InvalidResourceAssignmentError ¶
func (*InvalidResourceAssignmentError) Error ¶
func (e *InvalidResourceAssignmentError) Error() string
type InvalidResourceCreationError ¶
func (*InvalidResourceCreationError) Error ¶
func (e *InvalidResourceCreationError) Error() string
type InvalidResourceDictionaryMemberError ¶
type InvalidResourceDictionaryMemberError struct { Name string DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidResourceDictionaryMemberError) Error ¶
func (e *InvalidResourceDictionaryMemberError) Error() string
type InvalidResourceFieldError ¶
type InvalidResourceFieldError struct { Name string CompositeKind common.CompositeKind Pos ast.Position }
func (*InvalidResourceFieldError) EndPosition ¶
func (e *InvalidResourceFieldError) EndPosition() ast.Position
func (*InvalidResourceFieldError) Error ¶
func (e *InvalidResourceFieldError) Error() string
func (*InvalidResourceFieldError) StartPosition ¶
func (e *InvalidResourceFieldError) StartPosition() ast.Position
type InvalidResourceOptionalMemberError ¶ added in v0.9.0
type InvalidResourceOptionalMemberError struct { Name string DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidResourceOptionalMemberError) Error ¶ added in v0.9.0
func (e *InvalidResourceOptionalMemberError) Error() string
type InvalidResourceTransactionParameterError ¶
func (*InvalidResourceTransactionParameterError) Error ¶
func (e *InvalidResourceTransactionParameterError) Error() string
type InvalidRestrictedTypeError ¶
func (*InvalidRestrictedTypeError) Error ¶
func (e *InvalidRestrictedTypeError) Error() string
type InvalidRestrictedTypeMemberAccessError ¶
func (*InvalidRestrictedTypeMemberAccessError) Error ¶
func (e *InvalidRestrictedTypeMemberAccessError) Error() string
type InvalidRestrictionTypeDuplicateError ¶
type InvalidRestrictionTypeDuplicateError struct { Type *InterfaceType ast.Range }
func (*InvalidRestrictionTypeDuplicateError) Error ¶
func (e *InvalidRestrictionTypeDuplicateError) Error() string
type InvalidRestrictionTypeError ¶
func (*InvalidRestrictionTypeError) Error ¶
func (e *InvalidRestrictionTypeError) Error() string
type InvalidReturnValueError ¶
func (*InvalidReturnValueError) Error ¶
func (e *InvalidReturnValueError) Error() string
type InvalidSelfInvalidationError ¶
type InvalidSelfInvalidationError struct { InvalidationKind ResourceInvalidationKind StartPos ast.Position EndPos ast.Position }
func (*InvalidSelfInvalidationError) EndPosition ¶
func (e *InvalidSelfInvalidationError) EndPosition() ast.Position
func (*InvalidSelfInvalidationError) Error ¶
func (e *InvalidSelfInvalidationError) Error() string
func (*InvalidSelfInvalidationError) StartPosition ¶
func (e *InvalidSelfInvalidationError) StartPosition() ast.Position
type InvalidSwapExpressionError ¶
type InvalidSwapExpressionError struct { Side common.OperandSide ast.Range }
func (*InvalidSwapExpressionError) Error ¶
func (e *InvalidSwapExpressionError) Error() string
func (*InvalidSwapExpressionError) SecondaryError ¶
func (e *InvalidSwapExpressionError) SecondaryError() string
type InvalidTopLevelDeclarationError ¶
type InvalidTopLevelDeclarationError struct { DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidTopLevelDeclarationError) Error ¶
func (e *InvalidTopLevelDeclarationError) Error() string
type InvalidTransactionBlockError ¶
func (*InvalidTransactionBlockError) EndPosition ¶
func (e *InvalidTransactionBlockError) EndPosition() ast.Position
func (*InvalidTransactionBlockError) Error ¶
func (e *InvalidTransactionBlockError) Error() string
func (*InvalidTransactionBlockError) SecondaryError ¶
func (e *InvalidTransactionBlockError) SecondaryError() string
func (*InvalidTransactionBlockError) StartPosition ¶
func (e *InvalidTransactionBlockError) StartPosition() ast.Position
type InvalidTransactionFieldAccessModifierError ¶
type InvalidTransactionFieldAccessModifierError struct { Name string Access ast.Access Pos ast.Position }
func (*InvalidTransactionFieldAccessModifierError) EndPosition ¶
func (e *InvalidTransactionFieldAccessModifierError) EndPosition() ast.Position
func (*InvalidTransactionFieldAccessModifierError) Error ¶
func (e *InvalidTransactionFieldAccessModifierError) Error() string
func (*InvalidTransactionFieldAccessModifierError) StartPosition ¶
func (e *InvalidTransactionFieldAccessModifierError) StartPosition() ast.Position
type InvalidTransactionPrepareParameterTypeError ¶
func (*InvalidTransactionPrepareParameterTypeError) Error ¶
func (e *InvalidTransactionPrepareParameterTypeError) Error() string
type InvalidTypeArgumentCountError ¶
type InvalidTypeArgumentCountError struct { TypeParameterCount int TypeArgumentCount int ast.Range }
func (*InvalidTypeArgumentCountError) Error ¶
func (e *InvalidTypeArgumentCountError) Error() string
func (*InvalidTypeArgumentCountError) SecondaryError ¶
func (e *InvalidTypeArgumentCountError) SecondaryError() string
type InvalidUnaryOperandError ¶
type InvalidUnaryOperandError struct { Operation ast.Operation ExpectedType Type ActualType Type ast.Range }
func (*InvalidUnaryOperandError) Error ¶
func (e *InvalidUnaryOperandError) Error() string
func (*InvalidUnaryOperandError) SecondaryError ¶
func (e *InvalidUnaryOperandError) SecondaryError() string
type InvalidVariableKindError ¶
type InvalidVariableKindError struct { Kind ast.VariableKind ast.Range }
func (*InvalidVariableKindError) Error ¶
func (e *InvalidVariableKindError) Error() string
type InvokableType ¶
type InvokableType interface { Type InvocationFunctionType() *FunctionType CheckArgumentExpressions(checker *Checker, argumentExpressions []ast.Expression, invocationRange ast.Range) ArgumentLabels() []string }
type LocatedType ¶
LocatedType is a type which has a location
type LocationHandlerFunc ¶ added in v0.10.0
type LocationHandlerFunc func(identifiers []ast.Identifier, location common.Location) ([]ResolvedLocation, error)
type Member ¶
type Member struct { ContainerType Type Access ast.Access Identifier ast.Identifier TypeAnnotation *TypeAnnotation // TODO: replace with dedicated MemberKind enum DeclarationKind common.DeclarationKind VariableKind ast.VariableKind ArgumentLabels []string // Predeclared fields can be considered initialized Predeclared bool // IgnoreInSerialization fields are ignored in serialization IgnoreInSerialization bool DocString string }
func NewPublicEnumCaseMember ¶ added in v0.14.0
func NewPublicFunctionMember ¶
func NewPublicFunctionMember( containerType Type, identifier string, invokableType InvokableType, docString string, ) *Member
func (*Member) IsExternallyReturnable ¶ added in v0.11.0
IsExternallyReturnable returns whether a member is externally returnable
func (*Member) IsStorable ¶ added in v0.5.0
IsStorable returns whether a member is a storable field
type MemberAccess ¶ added in v0.7.0
type MemberAccesses ¶ added in v0.7.0
type MemberAccesses struct {
// contains filtered or unexported fields
}
func NewMemberAccesses ¶ added in v0.7.0
func NewMemberAccesses() *MemberAccesses
func (*MemberAccesses) All ¶ added in v0.7.0
func (m *MemberAccesses) All() []MemberAccess
func (*MemberAccesses) Find ¶ added in v0.7.0
func (m *MemberAccesses) Find(pos Position) *MemberAccess
type MemberAstFieldDeclarationOrderedMap ¶ added in v0.13.0
type MemberAstFieldDeclarationOrderedMap struct {
// contains filtered or unexported fields
}
MemberAstFieldDeclarationOrderedMap
func NewMemberAstFieldDeclarationOrderedMap ¶ added in v0.13.0
func NewMemberAstFieldDeclarationOrderedMap() *MemberAstFieldDeclarationOrderedMap
NewMemberAstFieldDeclarationOrderedMap creates a new MemberAstFieldDeclarationOrderedMap.
func (*MemberAstFieldDeclarationOrderedMap) Clear ¶ added in v0.14.1
func (om *MemberAstFieldDeclarationOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*MemberAstFieldDeclarationOrderedMap) Delete ¶ added in v0.13.0
func (om *MemberAstFieldDeclarationOrderedMap) Delete(key *Member) (oldValue *ast.FieldDeclaration, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*MemberAstFieldDeclarationOrderedMap) Foreach ¶ added in v0.13.0
func (om *MemberAstFieldDeclarationOrderedMap) Foreach(f func(key *Member, value *ast.FieldDeclaration))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*MemberAstFieldDeclarationOrderedMap) Get ¶ added in v0.13.0
func (om *MemberAstFieldDeclarationOrderedMap) Get(key *Member) (result *ast.FieldDeclaration, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*MemberAstFieldDeclarationOrderedMap) GetPair ¶ added in v0.13.0
func (om *MemberAstFieldDeclarationOrderedMap) GetPair(key *Member) *MemberAstFieldDeclarationPair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*MemberAstFieldDeclarationOrderedMap) Len ¶ added in v0.13.0
func (om *MemberAstFieldDeclarationOrderedMap) Len() int
Len returns the length of the ordered map.
func (*MemberAstFieldDeclarationOrderedMap) Newest ¶ added in v0.13.0
func (om *MemberAstFieldDeclarationOrderedMap) Newest() *MemberAstFieldDeclarationPair
Newest returns a pointer to the newest pair.
func (*MemberAstFieldDeclarationOrderedMap) Oldest ¶ added in v0.13.0
func (om *MemberAstFieldDeclarationOrderedMap) Oldest() *MemberAstFieldDeclarationPair
Oldest returns a pointer to the oldest pair.
func (*MemberAstFieldDeclarationOrderedMap) Set ¶ added in v0.13.0
func (om *MemberAstFieldDeclarationOrderedMap) Set(key *Member, value *ast.FieldDeclaration) (oldValue *ast.FieldDeclaration, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type MemberAstFieldDeclarationPair ¶ added in v0.13.0
type MemberAstFieldDeclarationPair struct { Key *Member Value *ast.FieldDeclaration // contains filtered or unexported fields }
MemberAstFieldDeclarationPair
func (*MemberAstFieldDeclarationPair) Next ¶ added in v0.13.0
func (p *MemberAstFieldDeclarationPair) Next() *MemberAstFieldDeclarationPair
Next returns a pointer to the next pair.
func (*MemberAstFieldDeclarationPair) Prev ¶ added in v0.13.0
func (p *MemberAstFieldDeclarationPair) Prev() *MemberAstFieldDeclarationPair
Prev returns a pointer to the previous pair.
type MemberInfo ¶
type MemberMismatch ¶
type MemberMismatchNote ¶ added in v0.2.0
func (MemberMismatchNote) Message ¶ added in v0.2.0
func (n MemberMismatchNote) Message() string
type MemberResolver ¶ added in v0.7.0
type MemberSet ¶
type MemberSet struct { Parent *MemberSet // contains filtered or unexported fields }
MemberSet is set of members.
func NewMemberSet ¶
NewMemberSet returns an empty member set.
func (*MemberSet) Clone ¶
Clone returns a new child member set that contains all entries of this parent set. Changes to the returned set will only be applied in the returned set, not the parent.
func (*MemberSet) ForEach ¶ added in v0.13.0
ForEach calls the given function for each member. It can be used to iterate over all members of the set.
func (*MemberSet) Intersection ¶
Intersection returns a new set containing all members that exist in this and the given set.
type MemberStructOrderedMap ¶ added in v0.13.0
type MemberStructOrderedMap struct {
// contains filtered or unexported fields
}
MemberStructOrderedMap
func NewMemberStructOrderedMap ¶ added in v0.13.0
func NewMemberStructOrderedMap() *MemberStructOrderedMap
NewMemberStructOrderedMap creates a new MemberStructOrderedMap.
func (*MemberStructOrderedMap) Clear ¶ added in v0.14.1
func (om *MemberStructOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*MemberStructOrderedMap) Delete ¶ added in v0.13.0
func (om *MemberStructOrderedMap) Delete(key *Member) (oldValue struct{}, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*MemberStructOrderedMap) Foreach ¶ added in v0.13.0
func (om *MemberStructOrderedMap) Foreach(f func(key *Member, value struct{}))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*MemberStructOrderedMap) Get ¶ added in v0.13.0
func (om *MemberStructOrderedMap) Get(key *Member) (result struct{}, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*MemberStructOrderedMap) GetPair ¶ added in v0.13.0
func (om *MemberStructOrderedMap) GetPair(key *Member) *MemberStructPair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*MemberStructOrderedMap) Len ¶ added in v0.13.0
func (om *MemberStructOrderedMap) Len() int
Len returns the length of the ordered map.
func (*MemberStructOrderedMap) Newest ¶ added in v0.13.0
func (om *MemberStructOrderedMap) Newest() *MemberStructPair
Newest returns a pointer to the newest pair.
func (*MemberStructOrderedMap) Oldest ¶ added in v0.13.0
func (om *MemberStructOrderedMap) Oldest() *MemberStructPair
Oldest returns a pointer to the oldest pair.
func (*MemberStructOrderedMap) Set ¶ added in v0.13.0
func (om *MemberStructOrderedMap) Set(key *Member, value struct{}) (oldValue struct{}, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type MemberStructPair ¶ added in v0.13.0
type MemberStructPair struct { Key *Member Value struct{} // contains filtered or unexported fields }
MemberStructPair
func (*MemberStructPair) Next ¶ added in v0.13.0
func (p *MemberStructPair) Next() *MemberStructPair
Next returns a pointer to the next pair.
func (*MemberStructPair) Prev ¶ added in v0.13.0
func (p *MemberStructPair) Prev() *MemberStructPair
Prev returns a pointer to the previous pair.
type MissingAccessModifierError ¶
type MissingAccessModifierError struct { DeclarationKind common.DeclarationKind Explanation string Pos ast.Position }
func (*MissingAccessModifierError) EndPosition ¶
func (e *MissingAccessModifierError) EndPosition() ast.Position
func (*MissingAccessModifierError) Error ¶
func (e *MissingAccessModifierError) Error() string
func (*MissingAccessModifierError) StartPosition ¶
func (e *MissingAccessModifierError) StartPosition() ast.Position
type MissingArgumentLabelError ¶
func (*MissingArgumentLabelError) Error ¶
func (e *MissingArgumentLabelError) Error() string
type MissingConformanceError ¶
type MissingConformanceError struct { CompositeType *CompositeType InterfaceType *InterfaceType ast.Range }
func (*MissingConformanceError) Error ¶
func (e *MissingConformanceError) Error() string
type MissingCreateError ¶
func (*MissingCreateError) Error ¶
func (e *MissingCreateError) Error() string
func (*MissingCreateError) SecondaryError ¶
func (e *MissingCreateError) SecondaryError() string
type MissingDestructorError ¶
type MissingDestructorError struct { ContainerType Type FirstFieldName string FirstFieldPos ast.Position }
func (*MissingDestructorError) EndPosition ¶
func (e *MissingDestructorError) EndPosition() ast.Position
func (*MissingDestructorError) Error ¶
func (e *MissingDestructorError) Error() string
func (*MissingDestructorError) StartPosition ¶
func (e *MissingDestructorError) StartPosition() ast.Position
type MissingEntryPointError ¶ added in v0.11.0
type MissingEntryPointError struct {
Expected string
}
func (*MissingEntryPointError) Error ¶ added in v0.11.0
func (e *MissingEntryPointError) Error() string
type MissingEnumRawTypeError ¶ added in v0.10.0
func (*MissingEnumRawTypeError) EndPosition ¶ added in v0.10.0
func (e *MissingEnumRawTypeError) EndPosition() ast.Position
func (*MissingEnumRawTypeError) Error ¶ added in v0.10.0
func (e *MissingEnumRawTypeError) Error() string
func (*MissingEnumRawTypeError) StartPosition ¶ added in v0.10.0
func (e *MissingEnumRawTypeError) StartPosition() ast.Position
type MissingFunctionBodyError ¶
func (*MissingFunctionBodyError) EndPosition ¶
func (e *MissingFunctionBodyError) EndPosition() ast.Position
func (*MissingFunctionBodyError) Error ¶
func (e *MissingFunctionBodyError) Error() string
func (*MissingFunctionBodyError) StartPosition ¶
func (e *MissingFunctionBodyError) StartPosition() ast.Position
type MissingInitializerError ¶
type MissingInitializerError struct { ContainerType Type FirstFieldName string FirstFieldPos ast.Position }
func (*MissingInitializerError) EndPosition ¶
func (e *MissingInitializerError) EndPosition() ast.Position
func (*MissingInitializerError) Error ¶
func (e *MissingInitializerError) Error() string
func (*MissingInitializerError) StartPosition ¶
func (e *MissingInitializerError) StartPosition() ast.Position
type MissingLocationError ¶
type MissingLocationError struct{}
func (*MissingLocationError) Error ¶
func (e *MissingLocationError) Error() string
type MissingMoveOperationError ¶
func (*MissingMoveOperationError) EndPosition ¶
func (e *MissingMoveOperationError) EndPosition() ast.Position
func (*MissingMoveOperationError) Error ¶
func (e *MissingMoveOperationError) Error() string
func (*MissingMoveOperationError) StartPosition ¶
func (e *MissingMoveOperationError) StartPosition() ast.Position
type MissingResourceAnnotationError ¶
func (*MissingResourceAnnotationError) Error ¶
func (e *MissingResourceAnnotationError) Error() string
type MissingReturnStatementError ¶
func (*MissingReturnStatementError) Error ¶
func (e *MissingReturnStatementError) Error() string
type MissingReturnValueError ¶ added in v0.5.0
func (*MissingReturnValueError) Error ¶ added in v0.5.0
func (e *MissingReturnValueError) Error() string
type MissingSwitchCaseStatementsError ¶ added in v0.10.0
func (*MissingSwitchCaseStatementsError) EndPosition ¶ added in v0.10.0
func (e *MissingSwitchCaseStatementsError) EndPosition() ast.Position
func (*MissingSwitchCaseStatementsError) Error ¶ added in v0.10.0
func (e *MissingSwitchCaseStatementsError) Error() string
func (*MissingSwitchCaseStatementsError) StartPosition ¶ added in v0.10.0
func (e *MissingSwitchCaseStatementsError) StartPosition() ast.Position
type NonReferenceTypeReferenceError ¶
func (*NonReferenceTypeReferenceError) Error ¶
func (e *NonReferenceTypeReferenceError) Error() string
func (*NonReferenceTypeReferenceError) SecondaryError ¶
func (e *NonReferenceTypeReferenceError) SecondaryError() string
type NonResourceTypeError ¶
func (*NonResourceTypeError) Error ¶
func (e *NonResourceTypeError) Error() string
func (*NonResourceTypeError) SecondaryError ¶
func (e *NonResourceTypeError) SecondaryError() string
type NotCallableError ¶
func (*NotCallableError) Error ¶
func (e *NotCallableError) Error() string
type NotDeclaredError ¶
type NotDeclaredError struct { ExpectedKind common.DeclarationKind Name string Pos ast.Position }
func (*NotDeclaredError) EndPosition ¶
func (e *NotDeclaredError) EndPosition() ast.Position
func (*NotDeclaredError) Error ¶
func (e *NotDeclaredError) Error() string
func (*NotDeclaredError) SecondaryError ¶
func (e *NotDeclaredError) SecondaryError() string
func (*NotDeclaredError) StartPosition ¶
func (e *NotDeclaredError) StartPosition() ast.Position
type NotDeclaredMemberError ¶
func (*NotDeclaredMemberError) Error ¶
func (e *NotDeclaredMemberError) Error() string
func (*NotDeclaredMemberError) SecondaryError ¶
func (e *NotDeclaredMemberError) SecondaryError() string
type NotEquatableTypeError ¶
func (*NotEquatableTypeError) Error ¶
func (e *NotEquatableTypeError) Error() string
type NotExportedError ¶
type NotExportedError struct { Name string ImportLocation common.Location Available []string Pos ast.Position }
func (*NotExportedError) EndPosition ¶
func (e *NotExportedError) EndPosition() ast.Position
func (*NotExportedError) Error ¶
func (e *NotExportedError) Error() string
func (*NotExportedError) SecondaryError ¶ added in v0.8.0
func (e *NotExportedError) SecondaryError() string
func (*NotExportedError) StartPosition ¶
func (e *NotExportedError) StartPosition() ast.Position
type NotIndexableTypeError ¶
func (*NotIndexableTypeError) Error ¶
func (e *NotIndexableTypeError) Error() string
type NotIndexingAssignableTypeError ¶ added in v0.7.0
func (*NotIndexingAssignableTypeError) Error ¶ added in v0.7.0
func (e *NotIndexingAssignableTypeError) Error() string
type NotIndexingTypeError ¶
func (*NotIndexingTypeError) Error ¶
func (e *NotIndexingTypeError) Error() string
type NumericType ¶ added in v0.15.0
type NumericType struct {
// contains filtered or unexported fields
}
NumericType represent all the types in the integer range and non-fractional ranged types.
func NewNumericType ¶ added in v0.15.0
func NewNumericType(typeName string) *NumericType
func (*NumericType) Equal ¶ added in v0.15.0
func (t *NumericType) Equal(other Type) bool
func (*NumericType) GetMembers ¶ added in v0.15.0
func (t *NumericType) GetMembers() map[string]MemberResolver
func (*NumericType) ID ¶ added in v0.15.0
func (t *NumericType) ID() TypeID
func (*NumericType) IsEquatable ¶ added in v0.15.0
func (*NumericType) IsEquatable() bool
func (*NumericType) IsExternallyReturnable ¶ added in v0.15.0
func (*NumericType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*NumericType) IsInvalidType ¶ added in v0.15.0
func (*NumericType) IsInvalidType() bool
func (*NumericType) IsResourceType ¶ added in v0.15.0
func (*NumericType) IsResourceType() bool
func (*NumericType) IsStorable ¶ added in v0.15.0
func (*NumericType) IsStorable(_ map[*Member]bool) bool
func (*NumericType) IsType ¶ added in v0.15.0
func (*NumericType) IsType()
func (*NumericType) MaxInt ¶ added in v0.15.0
func (t *NumericType) MaxInt() *big.Int
func (*NumericType) MinInt ¶ added in v0.15.0
func (t *NumericType) MinInt() *big.Int
func (*NumericType) QualifiedString ¶ added in v0.15.0
func (t *NumericType) QualifiedString() string
func (*NumericType) Resolve ¶ added in v0.15.0
func (t *NumericType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*NumericType) RewriteWithRestrictedTypes ¶ added in v0.15.0
func (t *NumericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
func (*NumericType) String ¶ added in v0.15.0
func (t *NumericType) String() string
func (*NumericType) SupportsSaturatingAdd ¶ added in v0.15.0
func (t *NumericType) SupportsSaturatingAdd() bool
func (*NumericType) SupportsSaturatingDivide ¶ added in v0.15.0
func (t *NumericType) SupportsSaturatingDivide() bool
func (*NumericType) SupportsSaturatingMultiply ¶ added in v0.15.0
func (t *NumericType) SupportsSaturatingMultiply() bool
func (*NumericType) SupportsSaturatingSubtract ¶ added in v0.15.0
func (t *NumericType) SupportsSaturatingSubtract() bool
func (*NumericType) TypeAnnotationState ¶ added in v0.15.0
func (*NumericType) TypeAnnotationState() TypeAnnotationState
func (*NumericType) Unify ¶ added in v0.15.0
func (*NumericType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
func (*NumericType) WithIntRange ¶ added in v0.15.0
func (t *NumericType) WithIntRange(min *big.Int, max *big.Int) *NumericType
func (*NumericType) WithSaturatingAdd ¶ added in v0.15.0
func (t *NumericType) WithSaturatingAdd() *NumericType
func (*NumericType) WithSaturatingDivide ¶ added in v0.15.0
func (t *NumericType) WithSaturatingDivide() *NumericType
func (*NumericType) WithSaturatingMultiply ¶ added in v0.15.0
func (t *NumericType) WithSaturatingMultiply() *NumericType
func (*NumericType) WithSaturatingSubtract ¶ added in v0.15.0
func (t *NumericType) WithSaturatingSubtract() *NumericType
type Occurrence ¶
type Occurrences ¶
type Occurrences struct {
// contains filtered or unexported fields
}
func NewOccurrences ¶
func NewOccurrences() *Occurrences
func (*Occurrences) All ¶
func (o *Occurrences) All() []Occurrence
func (*Occurrences) Find ¶
func (o *Occurrences) Find(pos Position) *Occurrence
type Option ¶
func WithAccessCheckMode ¶
func WithAccessCheckMode(mode AccessCheckMode) Option
WithAccessCheckMode returns a checker option which sets the given mode for access control checks.
func WithCheckHandler ¶ added in v0.2.1
func WithCheckHandler(handler CheckHandlerFunc) Option
WithCheckHandler returns a checker option which sets the given function as the handler for the checking of the program.
func WithImportHandler ¶ added in v0.5.0
func WithImportHandler(handler ImportHandlerFunc) Option
WithImportHandler returns a checker option which sets the given handler as function which is used to resolve unresolved imports.
func WithLocationHandler ¶ added in v0.10.0
func WithLocationHandler(handler LocationHandlerFunc) Option
WithLocationHandler returns a checker option which sets the given handler as function which is used to resolve locations.
func WithOriginsAndOccurrencesEnabled ¶ added in v0.10.6
WithOriginsAndOccurrencesEnabled returns a checker option which enables/disables if origins and occurrences are recorded.
func WithPredeclaredTypes ¶
func WithPredeclaredTypes(predeclaredTypes []TypeDeclaration) Option
func WithPredeclaredValues ¶
func WithPredeclaredValues(predeclaredValues []ValueDeclaration) Option
func WithValidTopLevelDeclarationsHandler ¶
func WithValidTopLevelDeclarationsHandler(handler ValidTopLevelDeclarationsHandlerFunc) Option
WithValidTopLevelDeclarationsHandler returns a checker option which sets the given handler as function which is used to determine the slice of declaration kinds which are valid at the top-level for a given location.
type OptionalType ¶
type OptionalType struct {
Type Type
}
OptionalType represents the optional variant of another type
func (*OptionalType) Equal ¶
func (t *OptionalType) Equal(other Type) bool
func (*OptionalType) GetMembers ¶ added in v0.7.0
func (t *OptionalType) GetMembers() map[string]MemberResolver
func (*OptionalType) ID ¶
func (t *OptionalType) ID() TypeID
func (*OptionalType) IsEquatable ¶ added in v0.7.0
func (t *OptionalType) IsEquatable() bool
func (*OptionalType) IsExternallyReturnable ¶ added in v0.11.0
func (t *OptionalType) IsExternallyReturnable(results map[*Member]bool) bool
func (*OptionalType) IsInvalidType ¶
func (t *OptionalType) IsInvalidType() bool
func (*OptionalType) IsResourceType ¶
func (t *OptionalType) IsResourceType() bool
func (*OptionalType) IsStorable ¶ added in v0.5.0
func (t *OptionalType) IsStorable(results map[*Member]bool) bool
func (*OptionalType) IsType ¶
func (*OptionalType) IsType()
func (*OptionalType) QualifiedString ¶
func (t *OptionalType) QualifiedString() string
func (*OptionalType) Resolve ¶
func (t *OptionalType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*OptionalType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *OptionalType) RewriteWithRestrictedTypes() (Type, bool)
func (*OptionalType) String ¶
func (t *OptionalType) String() string
func (*OptionalType) TypeAnnotationState ¶
func (t *OptionalType) TypeAnnotationState() TypeAnnotationState
func (*OptionalType) Unify ¶
func (t *OptionalType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type OptionalTypeReferenceError ¶
func (*OptionalTypeReferenceError) Error ¶
func (e *OptionalTypeReferenceError) Error() string
type Parameter ¶
type Parameter struct { Label string Identifier string TypeAnnotation *TypeAnnotation }
func (*Parameter) EffectiveArgumentLabel ¶
EffectiveArgumentLabel returns the effective argument label that an argument in a call must use: If no argument label is declared for parameter, the parameter name is used as the argument label
func (*Parameter) QualifiedString ¶
type ParameterizedType ¶ added in v0.5.0
type ParameterizedType interface { Type TypeParameters() []*TypeParameter Instantiate(typeArguments []Type, report func(err error)) Type BaseType() Type TypeArguments() []Type }
ParameterizedType is a type which might have type parameters
type Position ¶
type Position struct { // line number, starting at 1 Line int // column number, starting at 0 (byte count) Column int }
func ASTToSemaPosition ¶ added in v0.7.0
type PostConditionsRewrite ¶
type PostConditionsRewrite struct { BeforeStatements []ast.Statement RewrittenPostConditions ast.Conditions }
type ReadOnlyTargetAssignmentError ¶
func (*ReadOnlyTargetAssignmentError) Error ¶
func (e *ReadOnlyTargetAssignmentError) Error() string
type RedeclarationError ¶
type RedeclarationError struct { Kind common.DeclarationKind Name string Pos ast.Position PreviousPos *ast.Position }
func (*RedeclarationError) EndPosition ¶
func (e *RedeclarationError) EndPosition() ast.Position
func (*RedeclarationError) Error ¶
func (e *RedeclarationError) Error() string
func (*RedeclarationError) ErrorNotes ¶
func (e *RedeclarationError) ErrorNotes() []errors.ErrorNote
func (*RedeclarationError) StartPosition ¶
func (e *RedeclarationError) StartPosition() ast.Position
type RedeclarationNote ¶
func (RedeclarationNote) Message ¶
func (n RedeclarationNote) Message() string
type ReferenceType ¶
ReferenceType represents the reference to a value
func (*ReferenceType) AllowsValueIndexingAssignment ¶ added in v0.7.0
func (t *ReferenceType) AllowsValueIndexingAssignment() bool
func (*ReferenceType) ElementType ¶
func (t *ReferenceType) ElementType(isAssignment bool) Type
func (*ReferenceType) Equal ¶
func (t *ReferenceType) Equal(other Type) bool
func (*ReferenceType) GetMembers ¶ added in v0.7.0
func (t *ReferenceType) GetMembers() map[string]MemberResolver
func (*ReferenceType) ID ¶
func (t *ReferenceType) ID() TypeID
func (*ReferenceType) IndexingType ¶
func (t *ReferenceType) IndexingType() Type
func (*ReferenceType) IsEquatable ¶ added in v0.7.0
func (*ReferenceType) IsEquatable() bool
func (*ReferenceType) IsExternallyReturnable ¶ added in v0.11.0
func (t *ReferenceType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*ReferenceType) IsInvalidType ¶
func (t *ReferenceType) IsInvalidType() bool
func (*ReferenceType) IsResourceType ¶
func (t *ReferenceType) IsResourceType() bool
func (*ReferenceType) IsStorable ¶ added in v0.5.0
func (t *ReferenceType) IsStorable(_ map[*Member]bool) bool
func (*ReferenceType) IsType ¶
func (*ReferenceType) IsType()
func (*ReferenceType) QualifiedString ¶
func (t *ReferenceType) QualifiedString() string
func (*ReferenceType) Resolve ¶
func (t *ReferenceType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*ReferenceType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *ReferenceType) RewriteWithRestrictedTypes() (Type, bool)
func (*ReferenceType) String ¶
func (t *ReferenceType) String() string
func (*ReferenceType) TypeAnnotationState ¶
func (*ReferenceType) TypeAnnotationState() TypeAnnotationState
func (*ReferenceType) Unify ¶
func (*ReferenceType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type RemovalHint ¶ added in v0.10.0
func (*RemovalHint) Hint ¶ added in v0.10.0
func (h *RemovalHint) Hint() string
type ReplacementHint ¶ added in v0.9.0
type ReplacementHint struct { Expression ast.Expression ast.Range }
func (*ReplacementHint) Hint ¶ added in v0.9.0
func (h *ReplacementHint) Hint() string
type ResolvedLocation ¶ added in v0.10.0
type ResolvedLocation struct { Location common.Location Identifiers []ast.Identifier }
type ResourceCapturingError ¶
func (*ResourceCapturingError) EndPosition ¶
func (e *ResourceCapturingError) EndPosition() ast.Position
func (*ResourceCapturingError) Error ¶
func (e *ResourceCapturingError) Error() string
func (*ResourceCapturingError) StartPosition ¶
func (e *ResourceCapturingError) StartPosition() ast.Position
type ResourceFieldNotInvalidatedError ¶
func (*ResourceFieldNotInvalidatedError) EndPosition ¶
func (e *ResourceFieldNotInvalidatedError) EndPosition() ast.Position
func (*ResourceFieldNotInvalidatedError) Error ¶
func (e *ResourceFieldNotInvalidatedError) Error() string
func (*ResourceFieldNotInvalidatedError) SecondaryError ¶
func (e *ResourceFieldNotInvalidatedError) SecondaryError() string
func (*ResourceFieldNotInvalidatedError) StartPosition ¶
func (e *ResourceFieldNotInvalidatedError) StartPosition() ast.Position
type ResourceInfo ¶
type ResourceInfo struct { // DefinitivelyInvalidated is true if the invalidation of the resource // can be considered definitive DefinitivelyInvalidated bool // Invalidations is the set of invalidations of the resource Invalidations ResourceInvalidations // UsePositions is the set of uses of the resource UsePositions ResourceUses }
ResourceInfo is the info for a resource.
func (ResourceInfo) Clone ¶ added in v0.13.0
func (ri ResourceInfo) Clone() ResourceInfo
type ResourceInvalidation ¶
type ResourceInvalidation struct { Kind ResourceInvalidationKind StartPos ast.Position EndPos ast.Position }
type ResourceInvalidationKind ¶
type ResourceInvalidationKind uint
const ( ResourceInvalidationKindUnknown ResourceInvalidationKind = iota ResourceInvalidationKindMoveDefinite ResourceInvalidationKindMoveTemporary ResourceInvalidationKindDestroy )
func (ResourceInvalidationKind) IsDefinite ¶ added in v0.5.0
func (k ResourceInvalidationKind) IsDefinite() bool
func (ResourceInvalidationKind) Name ¶
func (k ResourceInvalidationKind) Name() string
func (ResourceInvalidationKind) String ¶
func (i ResourceInvalidationKind) String() string
type ResourceInvalidationNote ¶
type ResourceInvalidationNote struct { ResourceInvalidation ast.Range }
func (ResourceInvalidationNote) Message ¶
func (n ResourceInvalidationNote) Message() string
type ResourceInvalidationStructOrderedMap ¶ added in v0.13.0
type ResourceInvalidationStructOrderedMap struct {
// contains filtered or unexported fields
}
ResourceInvalidationStructOrderedMap
func NewResourceInvalidationStructOrderedMap ¶ added in v0.13.0
func NewResourceInvalidationStructOrderedMap() *ResourceInvalidationStructOrderedMap
NewResourceInvalidationStructOrderedMap creates a new ResourceInvalidationStructOrderedMap.
func (*ResourceInvalidationStructOrderedMap) Clear ¶ added in v0.14.1
func (om *ResourceInvalidationStructOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*ResourceInvalidationStructOrderedMap) Delete ¶ added in v0.13.0
func (om *ResourceInvalidationStructOrderedMap) Delete(key ResourceInvalidation) (oldValue struct{}, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*ResourceInvalidationStructOrderedMap) Foreach ¶ added in v0.13.0
func (om *ResourceInvalidationStructOrderedMap) Foreach(f func(key ResourceInvalidation, value struct{}))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*ResourceInvalidationStructOrderedMap) Get ¶ added in v0.13.0
func (om *ResourceInvalidationStructOrderedMap) Get(key ResourceInvalidation) (result struct{}, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*ResourceInvalidationStructOrderedMap) GetPair ¶ added in v0.13.0
func (om *ResourceInvalidationStructOrderedMap) GetPair(key ResourceInvalidation) *ResourceInvalidationStructPair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*ResourceInvalidationStructOrderedMap) Len ¶ added in v0.13.0
func (om *ResourceInvalidationStructOrderedMap) Len() int
Len returns the length of the ordered map.
func (*ResourceInvalidationStructOrderedMap) Newest ¶ added in v0.13.0
func (om *ResourceInvalidationStructOrderedMap) Newest() *ResourceInvalidationStructPair
Newest returns a pointer to the newest pair.
func (*ResourceInvalidationStructOrderedMap) Oldest ¶ added in v0.13.0
func (om *ResourceInvalidationStructOrderedMap) Oldest() *ResourceInvalidationStructPair
Oldest returns a pointer to the oldest pair.
func (*ResourceInvalidationStructOrderedMap) Set ¶ added in v0.13.0
func (om *ResourceInvalidationStructOrderedMap) Set(key ResourceInvalidation, value struct{}) (oldValue struct{}, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type ResourceInvalidationStructPair ¶ added in v0.13.0
type ResourceInvalidationStructPair struct { Key ResourceInvalidation Value struct{} // contains filtered or unexported fields }
ResourceInvalidationStructPair
func (*ResourceInvalidationStructPair) Next ¶ added in v0.13.0
func (p *ResourceInvalidationStructPair) Next() *ResourceInvalidationStructPair
Next returns a pointer to the next pair.
func (*ResourceInvalidationStructPair) Prev ¶ added in v0.13.0
func (p *ResourceInvalidationStructPair) Prev() *ResourceInvalidationStructPair
Prev returns a pointer to the previous pair.
type ResourceInvalidations ¶
type ResourceInvalidations struct { Parent *ResourceInvalidations // contains filtered or unexported fields }
func (*ResourceInvalidations) Add ¶ added in v0.13.0
func (ris *ResourceInvalidations) Add(invalidation ResourceInvalidation)
Add adds the given resource invalidation to this set.
func (ResourceInvalidations) All ¶
func (ris ResourceInvalidations) All() (result []ResourceInvalidation)
All returns a slice with all resource invalidations in the set.
func (*ResourceInvalidations) Clone ¶ added in v0.13.0
func (ris *ResourceInvalidations) Clone() ResourceInvalidations
Clone returns a new child resource invalidation set that contains all entries of this parent set. Changes to the returned set will only be applied in the returned set, not the parent.
func (ResourceInvalidations) Contains ¶ added in v0.13.0
func (ris ResourceInvalidations) Contains(invalidation ResourceInvalidation) bool
Contains returns true if the given resource use position exists in the set.
func (*ResourceInvalidations) DeleteLocally ¶ added in v0.13.0
func (ris *ResourceInvalidations) DeleteLocally(invalidation ResourceInvalidation)
DeleteLocally removes the given resource invalidation from this current set.
NOTE: the invalidation still might exist in a parent afterwards, i.e. call to Contains might still return true!
func (*ResourceInvalidations) ForEach ¶ added in v0.13.0
func (ris *ResourceInvalidations) ForEach(cb func(invalidation ResourceInvalidation) error) error
ForEach calls the given function for each resource invalidation in the set. It can be used to iterate over all invalidations.
func (ResourceInvalidations) IsEmpty ¶
func (ris ResourceInvalidations) IsEmpty() bool
IsEmpty returns true if this set contains no resource invalidations.
func (*ResourceInvalidations) Merge ¶
func (ris *ResourceInvalidations) Merge(other ResourceInvalidations)
Merge adds the resource invalidations of the given set to this set.
func (ResourceInvalidations) Size ¶
func (ris ResourceInvalidations) Size() int
Size returns the number of resource invalidations in this set.
type ResourceLossError ¶
func (*ResourceLossError) Error ¶
func (e *ResourceLossError) Error() string
type ResourceMethodBindingError ¶
func (*ResourceMethodBindingError) Error ¶
func (e *ResourceMethodBindingError) Error() string
type ResourceUse ¶
type ResourceUse struct {
UseAfterInvalidationReported bool
}
type ResourceUseAfterInvalidationError ¶
type ResourceUseAfterInvalidationError struct { StartPos ast.Position EndPos ast.Position Invalidations []ResourceInvalidation InLoop bool // contains filtered or unexported fields }
func (*ResourceUseAfterInvalidationError) Cause ¶
func (e *ResourceUseAfterInvalidationError) Cause() (wasMoved, wasDestroyed bool)
func (*ResourceUseAfterInvalidationError) EndPosition ¶
func (e *ResourceUseAfterInvalidationError) EndPosition() ast.Position
func (*ResourceUseAfterInvalidationError) Error ¶
func (e *ResourceUseAfterInvalidationError) Error() string
func (*ResourceUseAfterInvalidationError) ErrorNotes ¶
func (e *ResourceUseAfterInvalidationError) ErrorNotes() (notes []errors.ErrorNote)
func (*ResourceUseAfterInvalidationError) HasInvalidationInPreviousLoopIteration ¶
func (e *ResourceUseAfterInvalidationError) HasInvalidationInPreviousLoopIteration() (result bool)
func (*ResourceUseAfterInvalidationError) SecondaryError ¶
func (e *ResourceUseAfterInvalidationError) SecondaryError() string
func (*ResourceUseAfterInvalidationError) StartPosition ¶
func (e *ResourceUseAfterInvalidationError) StartPosition() ast.Position
type ResourceUses ¶
type ResourceUses struct { Parent *ResourceUses // contains filtered or unexported fields }
func (*ResourceUses) Add ¶ added in v0.13.0
func (rus *ResourceUses) Add(pos ast.Position)
Add adds the given resource use to this set.
func (*ResourceUses) Clone ¶ added in v0.13.0
func (rus *ResourceUses) Clone() ResourceUses
Clone returns a new child resource use set that contains all entries of this parent set. Changes to the returned set will only be applied in the returned set, not the parent.
func (ResourceUses) Contains ¶ added in v0.13.0
func (rus ResourceUses) Contains(pos ast.Position) bool
Contains returns true if the given resource use position exists in the set.
func (*ResourceUses) ForEach ¶ added in v0.13.0
func (rus *ResourceUses) ForEach(cb func(pos ast.Position, use ResourceUse) error) error
ForEach calls the given function for each resource use in the set. It can be used to iterate over all uses.
func (ResourceUses) IsUseAfterInvalidationReported ¶
func (rus ResourceUses) IsUseAfterInvalidationReported(pos ast.Position) bool
IsUseAfterInvalidationReported returns true if the use after invalidation of the resource at the given position is reported.
func (*ResourceUses) MarkUseAfterInvalidationReported ¶
func (rus *ResourceUses) MarkUseAfterInvalidationReported(pos ast.Position)
MarkUseAfterInvalidationReported marks the use after invalidation of the resource at the given position as reported.
func (*ResourceUses) Merge ¶
func (rus *ResourceUses) Merge(other ResourceUses)
Merge adds the resource uses of the given set to this set.
func (ResourceUses) Size ¶
func (rus ResourceUses) Size() int
Size returns the number of resource uses in this set.
type Resources ¶
type Resources struct { Returns bool // contains filtered or unexported fields }
Resources is a map which contains invalidation info for resources.
func NewResources ¶ added in v0.13.0
func NewResources() *Resources
func (*Resources) AddInvalidation ¶
func (ris *Resources) AddInvalidation(resource interface{}, invalidation ResourceInvalidation)
AddInvalidation adds the given invalidation to the set of invalidations for the given resource. If the invalidation is not temporary, marks the resource to be definitely invalidated.
func (*Resources) AddUse ¶
AddUse adds the given use position to the set of use positions for the given resource.
func (*Resources) ForEach ¶ added in v0.10.6
func (ris *Resources) ForEach(f func(resource interface{}, info ResourceInfo))
func (*Resources) Get ¶
func (ris *Resources) Get(resource interface{}) ResourceInfo
func (*Resources) IsUseAfterInvalidationReported ¶
func (*Resources) MarkUseAfterInvalidationReported ¶
func (*Resources) MergeBranches ¶
MergeBranches merges the given resources from two branches into these resources. Invalidations occurring in both branches are considered definitive, other new invalidations are only considered potential. The else resources are optional.
func (*Resources) RemoveTemporaryMoveInvalidation ¶ added in v0.13.0
func (ris *Resources) RemoveTemporaryMoveInvalidation(resource interface{}, invalidation ResourceInvalidation)
RemoveTemporaryMoveInvalidation removes the given invalidation from the set of invalidations for the given resource.
type RestrictedType ¶
type RestrictedType struct { Type Type Restrictions []*InterfaceType // contains filtered or unexported fields }
RestrictedType
No restrictions implies the type is fully restricted, i.e. no members of the underlying resource type are available.
func (*RestrictedType) Equal ¶
func (t *RestrictedType) Equal(other Type) bool
func (*RestrictedType) GetMembers ¶ added in v0.7.0
func (t *RestrictedType) GetMembers() map[string]MemberResolver
func (*RestrictedType) ID ¶
func (t *RestrictedType) ID() TypeID
func (*RestrictedType) IsEquatable ¶ added in v0.7.0
func (*RestrictedType) IsEquatable() bool
func (*RestrictedType) IsExternallyReturnable ¶ added in v0.11.0
func (t *RestrictedType) IsExternallyReturnable(results map[*Member]bool) bool
func (*RestrictedType) IsInvalidType ¶
func (t *RestrictedType) IsInvalidType() bool
func (*RestrictedType) IsResourceType ¶
func (t *RestrictedType) IsResourceType() bool
func (*RestrictedType) IsStorable ¶ added in v0.5.0
func (t *RestrictedType) IsStorable(results map[*Member]bool) bool
func (*RestrictedType) IsType ¶
func (*RestrictedType) IsType()
func (*RestrictedType) QualifiedString ¶
func (t *RestrictedType) QualifiedString() string
func (*RestrictedType) Resolve ¶
func (t *RestrictedType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*RestrictedType) RestrictionSet ¶
func (t *RestrictedType) RestrictionSet() *InterfaceSet
func (*RestrictedType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *RestrictedType) RewriteWithRestrictedTypes() (Type, bool)
func (*RestrictedType) String ¶
func (t *RestrictedType) String() string
func (*RestrictedType) TypeAnnotationState ¶
func (*RestrictedType) TypeAnnotationState() TypeAnnotationState
func (*RestrictedType) Unify ¶
func (*RestrictedType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type RestrictionCompositeKindMismatchError ¶
type RestrictionCompositeKindMismatchError struct { CompositeKind common.CompositeKind PreviousCompositeKind common.CompositeKind ast.Range }
func (*RestrictionCompositeKindMismatchError) Error ¶
func (e *RestrictionCompositeKindMismatchError) Error() string
type RestrictionMemberClashError ¶
type RestrictionMemberClashError struct { Name string RedeclaringType *InterfaceType OriginalDeclaringType *InterfaceType ast.Range }
func (*RestrictionMemberClashError) Error ¶
func (e *RestrictionMemberClashError) Error() string
type ReturnInfo ¶
func (*ReturnInfo) Clone ¶
func (ri *ReturnInfo) Clone() *ReturnInfo
func (*ReturnInfo) MergeBranches ¶
func (ri *ReturnInfo) MergeBranches(thenReturnInfo *ReturnInfo, elseReturnInfo *ReturnInfo)
type SaturatingArithmeticType ¶ added in v0.15.0
type SaturatingArithmeticType interface { Type SupportsSaturatingAdd() bool SupportsSaturatingSubtract() bool SupportsSaturatingMultiply() bool SupportsSaturatingDivide() bool }
SaturatingArithmeticType is a type that supports saturating arithmetic functions
type SemanticError ¶
type SemanticError interface { error ast.HasPosition // contains filtered or unexported methods }
type SignatureAlgorithm ¶ added in v0.14.0
type SignatureAlgorithm uint8
const ( // Supported signing algorithms SignatureAlgorithmUnknown SignatureAlgorithm = iota SignatureAlgorithmECDSA_P256 SignatureAlgorithmECDSA_Secp256k1 )
func (SignatureAlgorithm) DocString ¶ added in v0.14.0
func (algo SignatureAlgorithm) DocString() string
func (SignatureAlgorithm) Name ¶ added in v0.14.0
func (algo SignatureAlgorithm) Name() string
Name returns the string representation of this signing algorithm.
func (SignatureAlgorithm) RawValue ¶ added in v0.14.0
func (algo SignatureAlgorithm) RawValue() uint8
func (SignatureAlgorithm) String ¶ added in v0.14.0
func (i SignatureAlgorithm) String() string
type SimpleType ¶ added in v0.13.5
type SimpleType struct { Name string QualifiedName string TypeID TypeID IsInvalid bool IsResource bool Storable bool Equatable bool ExternallyReturnable bool IsSuperTypeOf func(subType Type) bool Members func(*SimpleType) map[string]MemberResolver NestedTypes *StringTypeOrderedMap ValueIndexingInfo ValueIndexingInfo // contains filtered or unexported fields }
SimpleType represents a simple nominal type.
func (*SimpleType) AllowsValueIndexingAssignment ¶ added in v0.13.5
func (t *SimpleType) AllowsValueIndexingAssignment() bool
func (*SimpleType) ElementType ¶ added in v0.13.5
func (t *SimpleType) ElementType(isAssignment bool) Type
func (*SimpleType) Equal ¶ added in v0.13.5
func (t *SimpleType) Equal(other Type) bool
func (*SimpleType) GetMembers ¶ added in v0.13.5
func (t *SimpleType) GetMembers() map[string]MemberResolver
func (*SimpleType) GetNestedTypes ¶ added in v0.13.5
func (t *SimpleType) GetNestedTypes() *StringTypeOrderedMap
func (*SimpleType) ID ¶ added in v0.13.5
func (t *SimpleType) ID() TypeID
func (*SimpleType) IndexingType ¶ added in v0.13.5
func (t *SimpleType) IndexingType() Type
func (*SimpleType) IsEquatable ¶ added in v0.13.5
func (t *SimpleType) IsEquatable() bool
func (*SimpleType) IsExternallyReturnable ¶ added in v0.13.5
func (t *SimpleType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*SimpleType) IsInvalidType ¶ added in v0.13.5
func (t *SimpleType) IsInvalidType() bool
func (*SimpleType) IsResourceType ¶ added in v0.13.5
func (t *SimpleType) IsResourceType() bool
func (*SimpleType) IsStorable ¶ added in v0.13.5
func (t *SimpleType) IsStorable(_ map[*Member]bool) bool
func (*SimpleType) IsType ¶ added in v0.13.5
func (*SimpleType) IsType()
func (*SimpleType) QualifiedString ¶ added in v0.13.5
func (t *SimpleType) QualifiedString() string
func (*SimpleType) Resolve ¶ added in v0.13.5
func (t *SimpleType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*SimpleType) RewriteWithRestrictedTypes ¶ added in v0.13.5
func (t *SimpleType) RewriteWithRestrictedTypes() (Type, bool)
func (*SimpleType) String ¶ added in v0.13.5
func (t *SimpleType) String() string
func (*SimpleType) TypeAnnotationState ¶ added in v0.13.5
func (*SimpleType) TypeAnnotationState() TypeAnnotationState
func (*SimpleType) Unify ¶ added in v0.13.5
func (*SimpleType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type StringImportElementOrderedMap ¶ added in v0.13.0
type StringImportElementOrderedMap struct {
// contains filtered or unexported fields
}
StringImportElementOrderedMap
func NewStringImportElementOrderedMap ¶ added in v0.13.0
func NewStringImportElementOrderedMap() *StringImportElementOrderedMap
NewStringImportElementOrderedMap creates a new StringImportElementOrderedMap.
func (*StringImportElementOrderedMap) Clear ¶ added in v0.14.1
func (om *StringImportElementOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*StringImportElementOrderedMap) Delete ¶ added in v0.13.0
func (om *StringImportElementOrderedMap) Delete(key string) (oldValue ImportElement, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*StringImportElementOrderedMap) Foreach ¶ added in v0.13.0
func (om *StringImportElementOrderedMap) Foreach(f func(key string, value ImportElement))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*StringImportElementOrderedMap) Get ¶ added in v0.13.0
func (om *StringImportElementOrderedMap) Get(key string) (result ImportElement, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*StringImportElementOrderedMap) GetPair ¶ added in v0.13.0
func (om *StringImportElementOrderedMap) GetPair(key string) *StringImportElementPair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*StringImportElementOrderedMap) Len ¶ added in v0.13.0
func (om *StringImportElementOrderedMap) Len() int
Len returns the length of the ordered map.
func (*StringImportElementOrderedMap) Newest ¶ added in v0.13.0
func (om *StringImportElementOrderedMap) Newest() *StringImportElementPair
Newest returns a pointer to the newest pair.
func (*StringImportElementOrderedMap) Oldest ¶ added in v0.13.0
func (om *StringImportElementOrderedMap) Oldest() *StringImportElementPair
Oldest returns a pointer to the oldest pair.
func (*StringImportElementOrderedMap) Set ¶ added in v0.13.0
func (om *StringImportElementOrderedMap) Set(key string, value ImportElement) (oldValue ImportElement, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type StringImportElementPair ¶ added in v0.13.0
type StringImportElementPair struct { Key string Value ImportElement // contains filtered or unexported fields }
StringImportElementPair
func (*StringImportElementPair) Next ¶ added in v0.13.0
func (p *StringImportElementPair) Next() *StringImportElementPair
Next returns a pointer to the next pair.
func (*StringImportElementPair) Prev ¶ added in v0.13.0
func (p *StringImportElementPair) Prev() *StringImportElementPair
Prev returns a pointer to the previous pair.
type StringMemberOrderedMap ¶ added in v0.13.0
type StringMemberOrderedMap struct {
// contains filtered or unexported fields
}
StringMemberOrderedMap
func GetMembersAsMap ¶ added in v0.14.0
func GetMembersAsMap(members []*Member) *StringMemberOrderedMap
func NewStringMemberOrderedMap ¶ added in v0.13.0
func NewStringMemberOrderedMap() *StringMemberOrderedMap
NewStringMemberOrderedMap creates a new StringMemberOrderedMap.
func (*StringMemberOrderedMap) Clear ¶ added in v0.14.1
func (om *StringMemberOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*StringMemberOrderedMap) Delete ¶ added in v0.13.0
func (om *StringMemberOrderedMap) Delete(key string) (oldValue *Member, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*StringMemberOrderedMap) Foreach ¶ added in v0.13.0
func (om *StringMemberOrderedMap) Foreach(f func(key string, value *Member))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*StringMemberOrderedMap) Get ¶ added in v0.13.0
func (om *StringMemberOrderedMap) Get(key string) (result *Member, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*StringMemberOrderedMap) GetPair ¶ added in v0.13.0
func (om *StringMemberOrderedMap) GetPair(key string) *StringMemberPair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*StringMemberOrderedMap) Len ¶ added in v0.13.0
func (om *StringMemberOrderedMap) Len() int
Len returns the length of the ordered map.
func (*StringMemberOrderedMap) Newest ¶ added in v0.13.0
func (om *StringMemberOrderedMap) Newest() *StringMemberPair
Newest returns a pointer to the newest pair.
func (*StringMemberOrderedMap) Oldest ¶ added in v0.13.0
func (om *StringMemberOrderedMap) Oldest() *StringMemberPair
Oldest returns a pointer to the oldest pair.
type StringMemberPair ¶ added in v0.13.0
StringMemberPair
func (*StringMemberPair) Next ¶ added in v0.13.0
func (p *StringMemberPair) Next() *StringMemberPair
Next returns a pointer to the next pair.
func (*StringMemberPair) Prev ¶ added in v0.13.0
func (p *StringMemberPair) Prev() *StringMemberPair
Prev returns a pointer to the previous pair.
type StringTypeOrderedMap ¶ added in v0.13.0
type StringTypeOrderedMap struct {
// contains filtered or unexported fields
}
StringTypeOrderedMap
func NewStringTypeOrderedMap ¶ added in v0.13.0
func NewStringTypeOrderedMap() *StringTypeOrderedMap
NewStringTypeOrderedMap creates a new StringTypeOrderedMap.
func (*StringTypeOrderedMap) Clear ¶ added in v0.14.1
func (om *StringTypeOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*StringTypeOrderedMap) Delete ¶ added in v0.13.0
func (om *StringTypeOrderedMap) Delete(key string) (oldValue Type, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*StringTypeOrderedMap) Foreach ¶ added in v0.13.0
func (om *StringTypeOrderedMap) Foreach(f func(key string, value Type))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*StringTypeOrderedMap) Get ¶ added in v0.13.0
func (om *StringTypeOrderedMap) Get(key string) (result Type, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*StringTypeOrderedMap) GetPair ¶ added in v0.13.0
func (om *StringTypeOrderedMap) GetPair(key string) *StringTypePair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*StringTypeOrderedMap) Len ¶ added in v0.13.0
func (om *StringTypeOrderedMap) Len() int
Len returns the length of the ordered map.
func (*StringTypeOrderedMap) Newest ¶ added in v0.13.0
func (om *StringTypeOrderedMap) Newest() *StringTypePair
Newest returns a pointer to the newest pair.
func (*StringTypeOrderedMap) Oldest ¶ added in v0.13.0
func (om *StringTypeOrderedMap) Oldest() *StringTypePair
Oldest returns a pointer to the oldest pair.
type StringTypePair ¶ added in v0.13.0
StringTypePair
func (*StringTypePair) Next ¶ added in v0.13.0
func (p *StringTypePair) Next() *StringTypePair
Next returns a pointer to the next pair.
func (*StringTypePair) Prev ¶ added in v0.13.0
func (p *StringTypePair) Prev() *StringTypePair
Prev returns a pointer to the previous pair.
type StringValueDeclarationOrderedMap ¶ added in v0.13.0
type StringValueDeclarationOrderedMap struct {
// contains filtered or unexported fields
}
StringValueDeclarationOrderedMap
func NewStringValueDeclarationOrderedMap ¶ added in v0.13.0
func NewStringValueDeclarationOrderedMap() *StringValueDeclarationOrderedMap
NewStringValueDeclarationOrderedMap creates a new StringValueDeclarationOrderedMap.
func (*StringValueDeclarationOrderedMap) Clear ¶ added in v0.14.1
func (om *StringValueDeclarationOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*StringValueDeclarationOrderedMap) Delete ¶ added in v0.13.0
func (om *StringValueDeclarationOrderedMap) Delete(key string) (oldValue ValueDeclaration, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*StringValueDeclarationOrderedMap) Foreach ¶ added in v0.13.0
func (om *StringValueDeclarationOrderedMap) Foreach(f func(key string, value ValueDeclaration))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*StringValueDeclarationOrderedMap) Get ¶ added in v0.13.0
func (om *StringValueDeclarationOrderedMap) Get(key string) (result ValueDeclaration, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*StringValueDeclarationOrderedMap) GetPair ¶ added in v0.13.0
func (om *StringValueDeclarationOrderedMap) GetPair(key string) *StringValueDeclarationPair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*StringValueDeclarationOrderedMap) Len ¶ added in v0.13.0
func (om *StringValueDeclarationOrderedMap) Len() int
Len returns the length of the ordered map.
func (*StringValueDeclarationOrderedMap) Newest ¶ added in v0.13.0
func (om *StringValueDeclarationOrderedMap) Newest() *StringValueDeclarationPair
Newest returns a pointer to the newest pair.
func (*StringValueDeclarationOrderedMap) Oldest ¶ added in v0.13.0
func (om *StringValueDeclarationOrderedMap) Oldest() *StringValueDeclarationPair
Oldest returns a pointer to the oldest pair.
func (*StringValueDeclarationOrderedMap) Set ¶ added in v0.13.0
func (om *StringValueDeclarationOrderedMap) Set(key string, value ValueDeclaration) (oldValue ValueDeclaration, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type StringValueDeclarationPair ¶ added in v0.13.0
type StringValueDeclarationPair struct { Key string Value ValueDeclaration // contains filtered or unexported fields }
StringValueDeclarationPair
func (*StringValueDeclarationPair) Next ¶ added in v0.13.0
func (p *StringValueDeclarationPair) Next() *StringValueDeclarationPair
Next returns a pointer to the next pair.
func (*StringValueDeclarationPair) Prev ¶ added in v0.13.0
func (p *StringValueDeclarationPair) Prev() *StringValueDeclarationPair
Prev returns a pointer to the previous pair.
type StringVariableOrderedMap ¶ added in v0.13.0
type StringVariableOrderedMap struct {
// contains filtered or unexported fields
}
StringVariableOrderedMap
func NewStringVariableOrderedMap ¶ added in v0.13.0
func NewStringVariableOrderedMap() *StringVariableOrderedMap
NewStringVariableOrderedMap creates a new StringVariableOrderedMap.
func (*StringVariableOrderedMap) Clear ¶ added in v0.14.1
func (om *StringVariableOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*StringVariableOrderedMap) Delete ¶ added in v0.13.0
func (om *StringVariableOrderedMap) Delete(key string) (oldValue *Variable, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*StringVariableOrderedMap) Foreach ¶ added in v0.13.0
func (om *StringVariableOrderedMap) Foreach(f func(key string, value *Variable))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*StringVariableOrderedMap) Get ¶ added in v0.13.0
func (om *StringVariableOrderedMap) Get(key string) (result *Variable, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*StringVariableOrderedMap) GetPair ¶ added in v0.13.0
func (om *StringVariableOrderedMap) GetPair(key string) *StringVariablePair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*StringVariableOrderedMap) Len ¶ added in v0.13.0
func (om *StringVariableOrderedMap) Len() int
Len returns the length of the ordered map.
func (*StringVariableOrderedMap) Newest ¶ added in v0.13.0
func (om *StringVariableOrderedMap) Newest() *StringVariablePair
Newest returns a pointer to the newest pair.
func (*StringVariableOrderedMap) Oldest ¶ added in v0.13.0
func (om *StringVariableOrderedMap) Oldest() *StringVariablePair
Oldest returns a pointer to the oldest pair.
type StringVariablePair ¶ added in v0.13.0
type StringVariablePair struct { Key string Value *Variable // contains filtered or unexported fields }
StringVariablePair
func (*StringVariablePair) Next ¶ added in v0.13.0
func (p *StringVariablePair) Next() *StringVariablePair
Next returns a pointer to the next pair.
func (*StringVariablePair) Prev ¶ added in v0.13.0
func (p *StringVariablePair) Prev() *StringVariablePair
Prev returns a pointer to the previous pair.
type SwitchDefaultPositionError ¶ added in v0.10.0
func (*SwitchDefaultPositionError) Error ¶ added in v0.10.0
func (e *SwitchDefaultPositionError) Error() string
type TransactionMissingPrepareError ¶
func (*TransactionMissingPrepareError) EndPosition ¶
func (e *TransactionMissingPrepareError) EndPosition() ast.Position
func (*TransactionMissingPrepareError) Error ¶
func (e *TransactionMissingPrepareError) Error() string
func (*TransactionMissingPrepareError) StartPosition ¶
func (e *TransactionMissingPrepareError) StartPosition() ast.Position
type TransactionType ¶
type TransactionType struct { Members *StringMemberOrderedMap Fields []string PrepareParameters []*Parameter Parameters []*Parameter }
func (*TransactionType) EntryPointFunctionType ¶
func (t *TransactionType) EntryPointFunctionType() *FunctionType
func (*TransactionType) Equal ¶
func (*TransactionType) Equal(other Type) bool
func (*TransactionType) ExecuteFunctionType ¶
func (*TransactionType) ExecuteFunctionType() *ConstructorFunctionType
func (*TransactionType) GetMembers ¶ added in v0.7.0
func (t *TransactionType) GetMembers() map[string]MemberResolver
func (*TransactionType) ID ¶
func (*TransactionType) ID() TypeID
func (*TransactionType) IsEquatable ¶ added in v0.7.0
func (*TransactionType) IsEquatable() bool
func (*TransactionType) IsExternallyReturnable ¶ added in v0.11.0
func (*TransactionType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*TransactionType) IsInvalidType ¶
func (*TransactionType) IsInvalidType() bool
func (*TransactionType) IsResourceType ¶
func (*TransactionType) IsResourceType() bool
func (*TransactionType) IsStorable ¶ added in v0.5.0
func (*TransactionType) IsStorable(_ map[*Member]bool) bool
func (*TransactionType) IsType ¶
func (*TransactionType) IsType()
func (*TransactionType) PrepareFunctionType ¶
func (t *TransactionType) PrepareFunctionType() *ConstructorFunctionType
func (*TransactionType) QualifiedString ¶
func (*TransactionType) QualifiedString() string
func (*TransactionType) Resolve ¶
func (t *TransactionType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*TransactionType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *TransactionType) RewriteWithRestrictedTypes() (Type, bool)
func (*TransactionType) String ¶
func (*TransactionType) String() string
func (*TransactionType) TypeAnnotationState ¶
func (*TransactionType) TypeAnnotationState() TypeAnnotationState
func (*TransactionType) Unify ¶
func (*TransactionType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type Type ¶
type Type interface { IsType() ID() TypeID String() string QualifiedString() string Equal(other Type) bool // IsResourceType returns true if the type is itself a resource (a `CompositeType` with resource kind), // or it contains a resource type (e.g. for optionals, arrays, dictionaries, etc.) IsResourceType() bool // IsInvalidType returns true if the type is itself the invalid type (see `InvalidType`), // or it contains an invalid type (e.g. for optionals, arrays, dictionaries, etc.) IsInvalidType() bool // IsStorable returns true if the type is allowed to be a stored, // e.g. in a field of a composite type. // // The check if the type is storable is recursive, // the results parameter prevents cycles: // it is checked at the start of the recursively called function, // and pre-set before a recursive call. IsStorable(results map[*Member]bool) bool // IsExternallyReturnable returns true if a value of this type can be exported // // The check if the type is externally returnable is recursive, // the results parameter prevents cycles: // it is checked at the start of the recursively called function, // and pre-set before a recursive call. IsExternallyReturnable(results map[*Member]bool) bool // IsEquatable returns true if values of the type can be equated IsEquatable() bool TypeAnnotationState() TypeAnnotationState RewriteWithRestrictedTypes() (result Type, rewritten bool) // Unify attempts to unify the given type with this type, i.e., resolve type parameters // in generic types (see `GenericType`) using the given type parameters. // // For a generic type, unification assigns a given type with a type parameter. // // If the type parameter has not been previously unified with a type, // through an explicitly provided type argument in an invocation // or through a previous unification, the type parameter is assigned the given type. // // If the type parameter has already been previously unified with a type, // the type parameter's unified . // // The boolean return value indicates if a generic type was encountered during unification. // For primitives (e.g. `Int`, `String`, etc.) it would be false, as . // For types with nested types (e.g. optionals, arrays, and dictionaries) // the result is the successful unification of the inner types. // // The boolean return value does *not* indicate if unification succeeded or not. // Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool // Resolve returns a type that is free of generic types (see `GenericType`), // i.e. it resolves the type parameters in generic types given the type parameter // unifications of `typeParameters`. // // If resolution fails, it returns `nil`. // Resolve(typeArguments *TypeParameterTypeOrderedMap) Type GetMembers() map[string]MemberResolver }
func CheckPathLiteral ¶ added in v0.12.0
func CheckPathLiteral(expression *ast.PathExpression) (Type, error)
func UnwrapOptionalType ¶
UnwrapOptionalType returns the type if it is not an optional type, or the inner-most type if it is (optional types are repeatedly unwrapped)
type TypeAnnotation ¶
func NewTypeAnnotation ¶
func NewTypeAnnotation(ty Type) *TypeAnnotation
func (*TypeAnnotation) Equal ¶
func (a *TypeAnnotation) Equal(other *TypeAnnotation) bool
func (*TypeAnnotation) QualifiedString ¶
func (a *TypeAnnotation) QualifiedString() string
func (*TypeAnnotation) String ¶
func (a *TypeAnnotation) String() string
func (*TypeAnnotation) TypeAnnotationState ¶
func (a *TypeAnnotation) TypeAnnotationState() TypeAnnotationState
type TypeAnnotationRequiredError ¶ added in v0.9.0
func (*TypeAnnotationRequiredError) EndPosition ¶ added in v0.9.0
func (e *TypeAnnotationRequiredError) EndPosition() ast.Position
func (*TypeAnnotationRequiredError) Error ¶ added in v0.9.0
func (e *TypeAnnotationRequiredError) Error() string
func (*TypeAnnotationRequiredError) StartPosition ¶ added in v0.9.0
func (e *TypeAnnotationRequiredError) StartPosition() ast.Position
type TypeAnnotationState ¶
type TypeAnnotationState uint
const ( TypeAnnotationStateUnknown TypeAnnotationState = iota TypeAnnotationStateValid TypeAnnotationStateInvalidResourceAnnotation TypeAnnotationStateMissingResourceAnnotation )
func (TypeAnnotationState) String ¶
func (i TypeAnnotationState) String() string
type TypeCheckFunc ¶
type TypeCheckFunc = func() Type
type TypeDeclaration ¶
type TypeMismatchError ¶
func (*TypeMismatchError) Error ¶
func (e *TypeMismatchError) Error() string
func (*TypeMismatchError) SecondaryError ¶
func (e *TypeMismatchError) SecondaryError() string
type TypeMismatchWithDescriptionError ¶
type TypeMismatchWithDescriptionError struct { ExpectedTypeDescription string ActualType Type ast.Range }
func (*TypeMismatchWithDescriptionError) Error ¶
func (e *TypeMismatchWithDescriptionError) Error() string
func (*TypeMismatchWithDescriptionError) SecondaryError ¶
func (e *TypeMismatchWithDescriptionError) SecondaryError() string
type TypeParameter ¶
func (TypeParameter) Equal ¶
func (p TypeParameter) Equal(other *TypeParameter) bool
func (TypeParameter) QualifiedString ¶
func (p TypeParameter) QualifiedString() string
func (TypeParameter) String ¶
func (p TypeParameter) String() string
type TypeParameterTypeInferenceError ¶
func (*TypeParameterTypeInferenceError) Error ¶
func (e *TypeParameterTypeInferenceError) Error() string
type TypeParameterTypeMismatchError ¶
type TypeParameterTypeMismatchError struct { TypeParameter *TypeParameter ExpectedType Type ActualType Type ast.Range }
func (*TypeParameterTypeMismatchError) Error ¶
func (e *TypeParameterTypeMismatchError) Error() string
func (*TypeParameterTypeMismatchError) SecondaryError ¶
func (e *TypeParameterTypeMismatchError) SecondaryError() string
type TypeParameterTypeOrderedMap ¶ added in v0.13.0
type TypeParameterTypeOrderedMap struct {
// contains filtered or unexported fields
}
TypeParameterTypeOrderedMap
func NewTypeParameterTypeOrderedMap ¶ added in v0.13.0
func NewTypeParameterTypeOrderedMap() *TypeParameterTypeOrderedMap
NewTypeParameterTypeOrderedMap creates a new TypeParameterTypeOrderedMap.
func (*TypeParameterTypeOrderedMap) Clear ¶ added in v0.14.1
func (om *TypeParameterTypeOrderedMap) Clear()
Clear removes all entries from this ordered map.
func (*TypeParameterTypeOrderedMap) Delete ¶ added in v0.13.0
func (om *TypeParameterTypeOrderedMap) Delete(key *TypeParameter) (oldValue Type, present bool)
Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.
func (*TypeParameterTypeOrderedMap) Foreach ¶ added in v0.13.0
func (om *TypeParameterTypeOrderedMap) Foreach(f func(key *TypeParameter, value Type))
Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.
func (*TypeParameterTypeOrderedMap) Get ¶ added in v0.13.0
func (om *TypeParameterTypeOrderedMap) Get(key *TypeParameter) (result Type, present bool)
Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.
func (*TypeParameterTypeOrderedMap) GetPair ¶ added in v0.13.0
func (om *TypeParameterTypeOrderedMap) GetPair(key *TypeParameter) *TypeParameterTypePair
GetPair returns the key-value pair associated with the given key. Returns nil if not found.
func (*TypeParameterTypeOrderedMap) Len ¶ added in v0.13.0
func (om *TypeParameterTypeOrderedMap) Len() int
Len returns the length of the ordered map.
func (*TypeParameterTypeOrderedMap) Newest ¶ added in v0.13.0
func (om *TypeParameterTypeOrderedMap) Newest() *TypeParameterTypePair
Newest returns a pointer to the newest pair.
func (*TypeParameterTypeOrderedMap) Oldest ¶ added in v0.13.0
func (om *TypeParameterTypeOrderedMap) Oldest() *TypeParameterTypePair
Oldest returns a pointer to the oldest pair.
func (*TypeParameterTypeOrderedMap) Set ¶ added in v0.13.0
func (om *TypeParameterTypeOrderedMap) Set(key *TypeParameter, value Type) (oldValue Type, present bool)
Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.
type TypeParameterTypePair ¶ added in v0.13.0
type TypeParameterTypePair struct { Key *TypeParameter Value Type // contains filtered or unexported fields }
TypeParameterTypePair
func (*TypeParameterTypePair) Next ¶ added in v0.13.0
func (p *TypeParameterTypePair) Next() *TypeParameterTypePair
Next returns a pointer to the next pair.
func (*TypeParameterTypePair) Prev ¶ added in v0.13.0
func (p *TypeParameterTypePair) Prev() *TypeParameterTypePair
Prev returns a pointer to the previous pair.
type UninitializedFieldAccessError ¶
func (*UninitializedFieldAccessError) EndPosition ¶
func (e *UninitializedFieldAccessError) EndPosition() ast.Position
func (*UninitializedFieldAccessError) Error ¶
func (e *UninitializedFieldAccessError) Error() string
func (*UninitializedFieldAccessError) StartPosition ¶
func (e *UninitializedFieldAccessError) StartPosition() ast.Position
type UninitializedUseError ¶
func (*UninitializedUseError) EndPosition ¶
func (e *UninitializedUseError) EndPosition() ast.Position
func (*UninitializedUseError) Error ¶
func (e *UninitializedUseError) Error() string
func (*UninitializedUseError) StartPosition ¶
func (e *UninitializedUseError) StartPosition() ast.Position
type UnknownSpecialFunctionError ¶
func (*UnknownSpecialFunctionError) EndPosition ¶
func (e *UnknownSpecialFunctionError) EndPosition() ast.Position
func (*UnknownSpecialFunctionError) Error ¶
func (e *UnknownSpecialFunctionError) Error() string
func (*UnknownSpecialFunctionError) StartPosition ¶
func (e *UnknownSpecialFunctionError) StartPosition() ast.Position
type UnparameterizedTypeInstantiationError ¶ added in v0.5.0
func (*UnparameterizedTypeInstantiationError) Error ¶ added in v0.5.0
func (e *UnparameterizedTypeInstantiationError) Error() string
func (*UnparameterizedTypeInstantiationError) SecondaryError ¶ added in v0.5.0
func (e *UnparameterizedTypeInstantiationError) SecondaryError() string
type UnreachableStatementError ¶
func (*UnreachableStatementError) Error ¶
func (e *UnreachableStatementError) Error() string
type UnresolvedImportError ¶
func (*UnresolvedImportError) Error ¶
func (e *UnresolvedImportError) Error() string
type UnsupportedOptionalChainingAssignmentError ¶
func (*UnsupportedOptionalChainingAssignmentError) Error ¶
func (e *UnsupportedOptionalChainingAssignmentError) Error() string
type UnsupportedOverloadingError ¶
type UnsupportedOverloadingError struct { DeclarationKind common.DeclarationKind ast.Range }
func (*UnsupportedOverloadingError) Error ¶
func (e *UnsupportedOverloadingError) Error() string
type UnsupportedResourceForLoopError ¶
func (*UnsupportedResourceForLoopError) Error ¶
func (e *UnsupportedResourceForLoopError) Error() string
type ValidTopLevelDeclarationsHandlerFunc ¶ added in v0.5.0
type ValidTopLevelDeclarationsHandlerFunc = func(common.Location) []common.DeclarationKind
type ValueDeclaration ¶
type ValueDeclaration interface { ValueDeclarationName() string ValueDeclarationType() Type ValueDeclarationKind() common.DeclarationKind ValueDeclarationPosition() ast.Position ValueDeclarationIsConstant() bool ValueDeclarationArgumentLabels() []string ValueDeclarationAvailable(common.Location) bool }
type ValueIndexableType ¶
type ValueIndexableType interface { Type AllowsValueIndexingAssignment() bool ElementType(isAssignment bool) Type IndexingType() Type // contains filtered or unexported methods }
ValueIndexableType is a type which can be indexed into using a value
type ValueIndexingInfo ¶ added in v0.13.2
type ValueIndexingInfo struct { IsValueIndexableType bool AllowsValueIndexingAssignment bool ElementType func(_ bool) Type IndexingType *NumericType }
type Variable ¶
type Variable struct { Identifier string DeclarationKind common.DeclarationKind // Type is the type of the variable Type Type // Access is the access modifier Access ast.Access // IsConstant indicates if the variable is read-only IsConstant bool // IsBaseValue indicates if the variable is a base value, // i.e. it is defined by the checker and not the program IsBaseValue bool // ActivationDepth is the depth of scopes in which the variable was declared ActivationDepth int // ArgumentLabels are the argument labels that must be used in an invocation of the variable ArgumentLabels []string // Pos is the position where the variable was declared Pos *ast.Position }
type VariableActivation ¶ added in v0.14.0
type VariableActivation struct { Depth int Parent *VariableActivation // contains filtered or unexported fields }
An VariableActivation is a map of strings to variables. It is used to represent an active scope in a program, i.e. it is used as a symbol table during semantic analysis.
func NewVariableActivation ¶ added in v0.14.0
func NewVariableActivation(parent *VariableActivation) *VariableActivation
NewVariableActivation returns as new activation with the given parent. The parent may be nil.
func (*VariableActivation) Clear ¶ added in v0.14.1
func (a *VariableActivation) Clear()
Clear removes all variables from this activation.
func (*VariableActivation) Find ¶ added in v0.14.0
func (a *VariableActivation) Find(name string) *Variable
Find returns the variable for a given name in the activation. It returns nil if no variable is found.
func (*VariableActivation) ForEach ¶ added in v0.14.0
func (a *VariableActivation) ForEach(cb func(string, *Variable) error) error
ForEach calls the given function for each name-variable pair in the activation. It can be used to iterate over all entries of the activation.
func (*VariableActivation) Set ¶ added in v0.14.0
func (a *VariableActivation) Set(name string, variable *Variable)
Set sets the given variable.
func (*VariableActivation) SetParent ¶ added in v0.14.1
func (a *VariableActivation) SetParent(parent *VariableActivation)
SetParent sets the parent of this activation to the given parent and updates the depth.
type VariableActivations ¶
type VariableActivations struct {
// contains filtered or unexported fields
}
VariableActivations is a stack of activation records. Each entry represents a new activation record.
The current / most nested activation record can be found at the top of the stack (see function `Current`).
func NewVariableActivations ¶ added in v0.14.1
func NewVariableActivations(parent *VariableActivation) *VariableActivations
func (*VariableActivations) Current ¶ added in v0.13.3
func (a *VariableActivations) Current() *VariableActivation
Current returns the current / most nested activation, which can be found at the top of the stack. It returns nil if there is no active activation.
func (*VariableActivations) Declare ¶
func (a *VariableActivations) Declare(declaration variableDeclaration) (variable *Variable, err error)
func (*VariableActivations) DeclareImplicitConstant ¶
func (a *VariableActivations) DeclareImplicitConstant( identifier string, ty Type, kind common.DeclarationKind, ) (*Variable, error)
func (*VariableActivations) DeclareType ¶
func (a *VariableActivations) DeclareType(declaration typeDeclaration) (*Variable, error)
func (*VariableActivations) Depth ¶
func (a *VariableActivations) Depth() int
Depth returns the depth (size) of the activation stack.
func (*VariableActivations) Enter ¶
func (a *VariableActivations) Enter()
Enter pushes a new empty activation to the top of the activation stack. The new activation has the current activation as its parent.
func (*VariableActivations) Find ¶
func (a *VariableActivations) Find(name string) *Variable
Find returns the variable for a given name in the current activation. It returns nil if no variable is found or if there is no current activation.
func (*VariableActivations) ForEachVariablesDeclaredInAndBelow ¶ added in v0.12.6
func (a *VariableActivations) ForEachVariablesDeclaredInAndBelow(depth int, f func(name string, value *Variable))
func (*VariableActivations) Leave ¶
func (a *VariableActivations) Leave()
Leave pops the top-most (current) activation from the top of the activation stack.
func (*VariableActivations) Set ¶
func (a *VariableActivations) Set(name string, variable *Variable)
Set sets the variable in the current activation.
type VariableSizedType ¶
type VariableSizedType struct { Type Type // contains filtered or unexported fields }
VariableSizedType is a variable sized array type
func (*VariableSizedType) AllowsValueIndexingAssignment ¶ added in v0.7.0
func (*VariableSizedType) AllowsValueIndexingAssignment() bool
func (*VariableSizedType) ElementType ¶
func (t *VariableSizedType) ElementType(_ bool) Type
func (*VariableSizedType) Equal ¶
func (t *VariableSizedType) Equal(other Type) bool
func (*VariableSizedType) GetMembers ¶ added in v0.7.0
func (t *VariableSizedType) GetMembers() map[string]MemberResolver
func (*VariableSizedType) ID ¶
func (t *VariableSizedType) ID() TypeID
func (*VariableSizedType) IndexingType ¶
func (t *VariableSizedType) IndexingType() Type
func (*VariableSizedType) IsEquatable ¶ added in v0.7.0
func (*VariableSizedType) IsEquatable() bool
func (*VariableSizedType) IsExternallyReturnable ¶ added in v0.11.0
func (t *VariableSizedType) IsExternallyReturnable(results map[*Member]bool) bool
func (*VariableSizedType) IsInvalidType ¶
func (t *VariableSizedType) IsInvalidType() bool
func (*VariableSizedType) IsResourceType ¶
func (t *VariableSizedType) IsResourceType() bool
func (*VariableSizedType) IsStorable ¶ added in v0.5.0
func (t *VariableSizedType) IsStorable(results map[*Member]bool) bool
func (*VariableSizedType) IsType ¶
func (*VariableSizedType) IsType()
func (*VariableSizedType) QualifiedString ¶
func (t *VariableSizedType) QualifiedString() string
func (*VariableSizedType) Resolve ¶
func (t *VariableSizedType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*VariableSizedType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *VariableSizedType) RewriteWithRestrictedTypes() (Type, bool)
func (*VariableSizedType) String ¶
func (t *VariableSizedType) String() string
func (*VariableSizedType) TypeAnnotationState ¶
func (t *VariableSizedType) TypeAnnotationState() TypeAnnotationState
func (*VariableSizedType) Unify ¶
func (t *VariableSizedType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type VirtualImport ¶ added in v0.5.0
type VirtualImport struct { ValueElements *StringImportElementOrderedMap TypeElements *StringImportElementOrderedMap }
func (VirtualImport) AllTypeElements ¶ added in v0.5.0
func (i VirtualImport) AllTypeElements() *StringImportElementOrderedMap
func (VirtualImport) AllValueElements ¶ added in v0.5.0
func (i VirtualImport) AllValueElements() *StringImportElementOrderedMap
func (VirtualImport) IsChecking ¶ added in v0.10.0
func (VirtualImport) IsChecking() bool
func (VirtualImport) IsImportableType ¶ added in v0.5.0
func (VirtualImport) IsImportableType(_ string) bool
func (VirtualImport) IsImportableValue ¶ added in v0.5.0
func (i VirtualImport) IsImportableValue(_ string) bool
Source Files ¶
- accesscheckmode.go
- accesscheckmode_string.go
- any_type.go
- anyresource_type.go
- anystruct_type.go
- authaccount_contracts.go
- authaccount_type.go
- before_extractor.go
- binaryoperationkind.go
- binaryoperationkind_string.go
- block.go
- bool_type.go
- character_type.go
- check_array_expression.go
- check_assignment.go
- check_binary_expression.go
- check_block.go
- check_casting_expression.go
- check_composite_declaration.go
- check_conditional.go
- check_conditions.go
- check_create_expression.go
- check_destroy_expression.go
- check_dictionary_expression.go
- check_emit_statement.go
- check_event_declaration.go
- check_expression.go
- check_for.go
- check_force_expression.go
- check_function.go
- check_import_declaration.go
- check_interface_declaration.go
- check_invocation_expression.go
- check_member_expression.go
- check_path_expression.go
- check_pragma.go
- check_reference_expression.go
- check_return_statement.go
- check_swap.go
- check_switch.go
- check_transaction_declaration.go
- check_unary_expression.go
- check_variable_declaration.go
- check_while.go
- checker.go
- containerkind.go
- containerkind_string.go
- crypto_algorithm_types.go
- declarations.go
- deployed_contract.go
- elaboration.go
- entrypoint.go
- errors.go
- function_activations.go
- gen.go
- hashalgorithm_string.go
- hints.go
- import.go
- initialization_info.go
- interfaceset.go
- invalid_type.go
- member_accesses.go
- member_set.go
- meta_type.go
- never_type.go
- occurrences.go
- ordered_map_interface_resourceinfo.go
- ordered_map_interfacetype_struct.go
- ordered_map_member_fielddeclaration.go
- ordered_map_member_struct.go
- ordered_map_position_resourceuse.go
- ordered_map_resourceinvalidation_struct.go
- ordered_map_string_importelement.go
- ordered_map_string_member.go
- ordered_map_string_type.go
- ordered_map_string_valuedeclaration.go
- ordered_map_string_variable.go
- ordered_map_typeparameter_type.go
- path_type.go
- post_conditions_rewrite.go
- publicaccount_type.go
- resource_invalidation.go
- resource_invalidations.go
- resource_uses.go
- resourceinvalidationkind.go
- resourceinvalidationkind_string.go
- resources.go
- return_info.go
- signaturealgorithm_string.go
- simple_type.go
- storable_type.go
- string_type.go
- type.go
- type_names.go
- typeannotationstate.go
- typeannotationstate_string.go
- typecheckfunc.go
- variable.go
- variable_activations.go
- void_type.go