lang

package
Version: v0.0.0-...-46d7da7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExternFunctionMetadata = []ast.FunctionMetadata{
	{
		Name:          "ip",
		ReturnType:    config.IP_ADDRESS,
		ArgumentTypes: []config.ValueType{config.STRING},
	},
	{
		Name:          "timestamp",
		ReturnType:    config.TIMESTAMP,
		ArgumentTypes: []config.ValueType{config.STRING},
	},
	{
		Name:          "dnsName",
		ReturnType:    config.DNS_NAME,
		ArgumentTypes: []config.ValueType{config.STRING},
	},
	{
		Name:          "email",
		ReturnType:    config.EMAIL_ADDRESS,
		ArgumentTypes: []config.ValueType{config.STRING},
	},
	{
		Name:          "uri",
		ReturnType:    config.URI,
		ArgumentTypes: []config.ValueType{config.STRING},
	},
	{
		Name:          "match",
		ReturnType:    config.BOOL,
		ArgumentTypes: []config.ValueType{config.STRING, config.STRING},
	},
	{
		Name:          "matches",
		Instance:      true,
		TargetType:    config.STRING,
		ReturnType:    config.BOOL,
		ArgumentTypes: []config.ValueType{config.STRING},
	},
	{
		Name:          "startsWith",
		Instance:      true,
		TargetType:    config.STRING,
		ReturnType:    config.BOOL,
		ArgumentTypes: []config.ValueType{config.STRING},
	},
	{
		Name:          "endsWith",
		Instance:      true,
		TargetType:    config.STRING,
		ReturnType:    config.BOOL,
		ArgumentTypes: []config.ValueType{config.STRING},
	},
	{
		Name:          "emptyStringMap",
		ReturnType:    config.STRING_MAP,
		ArgumentTypes: []config.ValueType{},
	},
	{
		Name:          "conditionalString",
		ReturnType:    config.STRING,
		ArgumentTypes: []config.ValueType{config.BOOL, config.STRING, config.STRING},
	},
}

ExternFunctionMetadata is the type-metadata about externs. It gets used during compilations.

View Source
var Externs = map[string]interpreter.Extern{
	"ip":                interpreter.ExternFromFn("ip", externIP),
	"ip_equal":          interpreter.ExternFromFn("ip_equal", externIPEqual),
	"timestamp":         interpreter.ExternFromFn("timestamp", externTimestamp),
	"timestamp_equal":   interpreter.ExternFromFn("timestamp_equal", externTimestampEqual),
	"dnsName":           interpreter.ExternFromFn("dnsName", externDNSName),
	"dnsName_equal":     interpreter.ExternFromFn("dnsName_equal", externDNSNameEqual),
	"email":             interpreter.ExternFromFn("email", externEmail),
	"email_equal":       interpreter.ExternFromFn("email_equal", externEmailEqual),
	"uri":               interpreter.ExternFromFn("uri", externURI),
	"uri_equal":         interpreter.ExternFromFn("uri_equal", externURIEqual),
	"match":             interpreter.ExternFromFn("match", externMatch),
	"matches":           interpreter.ExternFromFn("matches", externMatches),
	"startsWith":        interpreter.ExternFromFn("startsWith", externStartsWith),
	"endsWith":          interpreter.ExternFromFn("endsWith", externEndsWith),
	"emptyStringMap":    interpreter.ExternFromFn("emptyStringMap", externEmptyStringMap),
	"conditionalString": interpreter.ExternFromFn("conditionalString", externConditionalString),
}

Externs contains the list of standard external functions used during evaluation.

Functions

This section is empty.

Types

This section is empty.

Source Files

Directories

Path Synopsis
Package compiler implements a compiler that converts Mixer's expression language into a Mixer IL-based program that can be executed via an interpreter.
Package compiler implements a compiler that converts Mixer's expression language into a Mixer IL-based program that can be executed via an interpreter.

Jump to

Keyboard shortcuts

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