scope

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 8 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"
)

Default scope names

Variables

This section is empty.

Functions

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