scope

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: MIT Imports: 9 Imported by: 3

Documentation

Overview

Package scope contains the block scope implementation for the event condition language ECAL.

Index

Constants

View Source
const (
	GlobalScope = "GlobalScope"
	FuncPrefix  = "func:"
)

Default scope names

Variables

This section is empty.

Functions

func ConvertECALToJSONObject added in v1.3.0

func ConvertECALToJSONObject(v interface{}) interface{}

ConvertECALToJSONObject converts an ECAL container structure into an object which can be marshalled into a JSON string.

func ConvertJSONToECALObject added in v1.2.0

func ConvertJSONToECALObject(v interface{}) interface{}

ConvertJSONToECALObject converts a JSON container structure into an object which can be used by ECAL.

func EvalToString

func EvalToString(v interface{}) string

EvalToString should be used if a value should be converted into a string.

func NameFromASTNode

func NameFromASTNode(node *parser.ASTNode) string

NameFromASTNode returns a scope name from a given ASTNode.

func NewScope

func NewScope(name string) parser.Scope

NewScope creates a new variable scope.

func NewScopeWithParent

func NewScopeWithParent(name string, parent parser.Scope) parser.Scope

NewScopeWithParent creates a new variable scope with a parent. This can be used to create scope structures without children links.

func SetParentOfScope

func SetParentOfScope(scope parser.Scope, parent parser.Scope)

SetParentOfScope sets the parent of a given scope. This assumes that the given scope is a varsScope.

func ToObject

func ToObject(vs parser.Scope) map[interface{}]interface{}

ToObject converts a Scope into an object.

func ToScope

func ToScope(name string, o map[interface{}]interface{}) parser.Scope

ToScope converts a given object into a Scope.

Types

This section is empty.

Jump to

Keyboard shortcuts

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