123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /*
- * ECAL
- *
- * Copyright 2020 Matthias Ladkau. All rights reserved.
- *
- * This Source Code Form is subject to the terms of the MIT
- * License, If a copy of the MIT License was not distributed with this
- * file, You can obtain one at https://opensource.org/licenses/MIT.
- */
- package util
- import "devt.de/krotik/ecal/parser"
- /*
- Processor models a top level execution instance for ECAL.
- */
- type Processor interface {
- }
- /*
- ECALFunction models a callable function in ECAL.
- */
- type ECALFunction interface {
- /*
- Run executes this function. The envirnment provides a unique instanceID for
- every code location in the running code, the variable scope of the function,
- an instance state which can be used in combinartion with the instanceID
- to store instance specific state (e.g. for iterator functions) and a list
- of argument values which were passed to the function by the calling code.
- */
- Run(instanceID string, vs parser.Scope, is map[string]interface{}, args []interface{}) (interface{}, error)
- /*
- DocString returns a descriptive text about this function.
- */
- DocString() (string, error)
- }
- /*
- Logger is required external object to which the interpreter releases its log messages.
- */
- type Logger interface {
- /*
- LogError adds a new error log message.
- */
- LogError(v ...interface{})
- /*
- LogInfo adds a new info log message.
- */
- LogInfo(v ...interface{})
- /*
- LogDebug adds a new debug log message.
- */
- LogDebug(v ...interface{})
- }
|