ddptypes

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ILLEGAL   = -1   // illegal type to indicate errors
	NICHTS    = iota // void
	ZAHL             // int64
	KOMMAZAHL        // float64
	BOOLEAN          // bool
	BUCHSTABE        // int32
	TEXT             // string
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ParameterType

type ParameterType struct {
	Type        Type
	IsReference bool
}

represents the type of a function parameter which may be a reference

func (ParameterType) String

func (paramType ParameterType) String() string

type PrimitiveType

type PrimitiveType int

enum type for primitive types (+ void)

func (PrimitiveType) String

func (p PrimitiveType) String() string

type Type

type Type struct {
	// the primitive type of the DDPType (element type for lists)
	Primitive PrimitiveType
	// if the DDPType is a list
	IsList bool
}

holds information about a DDP-Type

func Bool

func Bool() Type

this function serves as constant variable for a bool type

func Char

func Char() Type

this function serves as constant variable for a char type

func Float

func Float() Type

this function serves as constant variable for a float type

func Illegal

func Illegal() Type

func Int

func Int() Type

this function serves as constant variable for a int type

func List

func List(elementType PrimitiveType) Type

create a new DDPType from a element type

func Primitive

func Primitive(primitiveType PrimitiveType) Type

create a new DDPType from a tokenType

func String

func String() Type

this function serves as constant variable for a string type

func Void

func Void() Type

this function serves as constant variable for a void type

func (Type) IsNumeric

func (ddpType Type) IsNumeric() bool

wether or not the type is a numeric primitive type (ZAHL or KOMMAZAHL)

func (Type) IsPrimitive

func (ddpType Type) IsPrimitive() bool

wether or not the type is a primitive type

func (Type) String

func (ddpType Type) String() string

Jump to

Keyboard shortcuts

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