Documentation
¶
Overview ¶
Package types provides type inference and checking for TTCN-3.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Integer = &Basic{Kind: IntegerType}
)
Functions ¶
Types ¶
type Basic ¶
type Basic struct {
Kind Kind
}
Basic represents a basic TTCN-3 type, such as integer, boolean, ...
func (*Basic) CompatibleTo ¶
func (*Basic) EnclosingScope ¶
func (*Basic) Underlying ¶
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
func (*Info) InsertTree ¶
InsertTree inserts the given syntax tree n into the given parent scope scp.
type Kind ¶
type Kind string
Kind returns the kind of the object.
const (
IntegerType Kind = "integer"
)
type NodeNotImplementedError ¶
NodeNotImplementedError is returned when a syntax node is not implemented.
func (*NodeNotImplementedError) Error ¶
func (e *NodeNotImplementedError) Error() string
type Object ¶
type Object interface {
// Scope returns the enclosing (== lexical) scope of an object.
EnclosingScope() Scope
}
Object represents a type system object; such a scope, a types, a variable, ...
type RedefinitionError ¶
func (*RedefinitionError) Error ¶
func (e *RedefinitionError) Error() string
type Ref ¶
type Ref struct {
Expr ast.Expr // The expression that refers to the object.
// contains filtered or unexported fields
}
Ref is a reference to an object.
func (*Ref) EnclosingScope ¶
type Scope ¶
type Scope interface {
Object
// Insert inserts an object into the scope.
Insert(name string, obj Object) Object
// Lookup returns the object with the given name in the scope.
Lookup(name string) Object
// Names returns the names of all objects in the scope.
Names() []string
}
Scope represents a TTCN-3 scope; such as a modules, a function, ...
type Type ¶
type Type interface {
Object
// Underlying returns the underlying (== root) type of the type.
Underlying() Type
// Compatible returns true if the type is compatible with the given type.
CompatibleTo(other Type) bool
}
Type represents a TTCN-3 type.
Click to show internal directories.
Click to hide internal directories.