interpreter

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: 19 Imported by: 1

Documentation

Overview

Package interpreter contains the ECAL interpreter.

Index

Constants

This section is empty.

Variables

View Source
var InbuildFuncMap = map[string]util.ECALFunction{
	"range":           &rangeFunc{&inbuildBaseFunc{}},
	"new":             &newFunc{&inbuildBaseFunc{}},
	"len":             &lenFunc{&inbuildBaseFunc{}},
	"del":             &delFunc{&inbuildBaseFunc{}},
	"add":             &addFunc{&inbuildBaseFunc{}},
	"concat":          &concatFunc{&inbuildBaseFunc{}},
	"dumpenv":         &dumpenvFunc{&inbuildBaseFunc{}},
	"doc":             &docFunc{&inbuildBaseFunc{}},
	"raise":           &raise{&inbuildBaseFunc{}},
	"addEvent":        &addevent{&inbuildBaseFunc{}},
	"addEventAndWait": &addeventandwait{&addevent{&inbuildBaseFunc{}}},
	"setCronTrigger":  &setCronTrigger{&inbuildBaseFunc{}},
	"setPulseTrigger": &setPulseTrigger{&inbuildBaseFunc{}},
}

InbuildFuncMap contains the mapping of inbuild functions.

Functions

This section is empty.

Types

type ECALRuntimeProvider

type ECALRuntimeProvider struct {
	Name          string                 // Name to identify the input
	ImportLocator util.ECALImportLocator // Locator object for imports
	Logger        util.Logger            // Logger object for log messages
	Processor     engine.Processor       // Processor of the ECA engine
	Cron          *timeutil.Cron         // Cron object for scheduled execution
}

ECALRuntimeProvider is the factory object producing runtime objects for ECAL ASTs.

func NewECALRuntimeProvider

func NewECALRuntimeProvider(name string, importLocator util.ECALImportLocator, logger util.Logger) *ECALRuntimeProvider

NewECALRuntimeProvider returns a new instance of a ECAL runtime provider.

func (*ECALRuntimeProvider) NewRuntimeError

func (erp *ECALRuntimeProvider) NewRuntimeError(t error, d string, node *parser.ASTNode) error

NewRuntimeError creates a new RuntimeError object.

func (*ECALRuntimeProvider) Runtime

func (erp *ECALRuntimeProvider) Runtime(node *parser.ASTNode) parser.Runtime

Runtime returns a runtime component for a given ASTNode.

Jump to

Keyboard shortcuts

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