Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Operators = []string{"matches", "contains", "startsWith", "endsWith"} Builtins = map[Identifier]*Type{ "true": {Kind: "bool"}, "false": {Kind: "bool"}, "len": {Kind: "func", Arguments: []*Type{{Kind: "array", Type: &Type{Kind: "any"}}}, Return: &Type{Kind: "int"}}, "all": {Kind: "func", Arguments: []*Type{{Kind: "array", Type: &Type{Kind: "any"}}, {Kind: "func"}}, Return: &Type{Kind: "bool"}}, "none": {Kind: "func", Arguments: []*Type{{Kind: "array", Type: &Type{Kind: "any"}}, {Kind: "func"}}, Return: &Type{Kind: "bool"}}, "any": {Kind: "func", Arguments: []*Type{{Kind: "array", Type: &Type{Kind: "any"}}, {Kind: "func"}}, Return: &Type{Kind: "bool"}}, "one": {Kind: "func", Arguments: []*Type{{Kind: "array", Type: &Type{Kind: "any"}}, {Kind: "func"}}, Return: &Type{Kind: "bool"}}, "filter": {Kind: "func", Arguments: []*Type{{Kind: "array", Type: &Type{Kind: "any"}}, {Kind: "func"}}, Return: &Type{Kind: "array", Type: &Type{Kind: "any"}}}, "map": {Kind: "func", Arguments: []*Type{{Kind: "array", Type: &Type{Kind: "any"}}, {Kind: "func"}}, Return: &Type{Kind: "array", Type: &Type{Kind: "any"}}}, "count": {Kind: "func", Arguments: []*Type{{Kind: "array", Type: &Type{Kind: "any"}}, {Kind: "func"}}, Return: &Type{Kind: "int"}}, } )
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Variables map[Identifier]*Type `json:"variables"` Types map[TypeName]*Type `json:"types"` }
type Kind ¶
type Kind string
Kind can be any of array, map, struct, func, string, int, float, bool or any.
type Type ¶
type Type struct { Name TypeName `json:"name,omitempty"` Kind Kind `json:"kind,omitempty"` Type *Type `json:"type,omitempty"` Key *Type `json:"key_type,omitempty"` Fields map[Identifier]*Type `json:"fields,omitempty"` Arguments []*Type `json:"arguments,omitempty"` Return *Type `json:"return,omitempty"` }
Click to show internal directories.
Click to hide internal directories.