engine

package
v0.0.0-...-4763a2a Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfig

func ApplyConfig(options map[string]interface{}, instance *BirEngine)

TODO: Complete applying config

Types

type BirEngine

type BirEngine struct {
	ID                   string                    `json:"id"`
	Anonymous            bool                      `json:"anonymous"`
	NamespaceAllowed     bool                      `json:"namespace_allowed"`
	ScopeMutaterAllowed  bool                      `json:"scope_mutater_allowed"`
	Path                 string                    `json:"path"`
	URI                  string                    `json:"uri"`
	Filename             string                    `json:"filename"`
	Directory            string                    `json:"directory"`
	Content              string                    `json:"content"`
	VerbosityLevel       int                       `json:"verbosity_level"`
	Parsed               map[string]interface{}    `json:"parsed"`
	MaximumCallstackSize int                       `json:"maximum_callstack_size"`
	Callstack            []Callstack               `json:"callstack"`
	Scopestack           scope.Scopestack          `json:"scopestack"`
	StdPath              string                    `json:"std_path"`
	Uses                 []BirEngine               `json:"uses"`
	Thrower              thrower.Thrower           `json:"thrower"`
	ColoredOutput        bool                      `json:"colored_output"`
	Implementors         []implementor.Implementor `json:"implementors"`
	Config               map[string]interface{}    `json:"config"`
}

func NewEngine

func NewEngine(path string, std_path string, anonymous bool, colored_output bool, verbosity_level int) BirEngine

func (*BirEngine) AddImports

func (engine *BirEngine) AddImports(stack map[string]interface{})

func (*BirEngine) Feed

func (engine *BirEngine) Feed(input string) string

func (BirEngine) FindOwner

func (engine BirEngine) FindOwner(id string, expression ast.BlockCallExpression) *BirEngine

func (BirEngine) FindUpperBlockScope

func (engine BirEngine) FindUpperBlockScope() (*scope.Scope, int, *ast.BlockDeclarationStatement)

func (BirEngine) GetAnonymousIndex

func (engine BirEngine) GetAnonymousIndex(position ast.Position) string

func (BirEngine) GetCurrentCallStack

func (engine BirEngine) GetCurrentCallStack() Callstack

func (BirEngine) GetCurrentScope

func (engine BirEngine) GetCurrentScope() scope.Scope

func (BirEngine) HandleAnonymousError

func (engine BirEngine) HandleAnonymousError(err error)

func (BirEngine) HandleError

func (engine BirEngine) HandleError(err error, position ast.Position)

func (*BirEngine) Init

func (engine *BirEngine) Init()

func (*BirEngine) PopCallstack

func (engine *BirEngine) PopCallstack() []Callstack

func (BirEngine) PushArguments

func (engine BirEngine) PushArguments(expression ast.BlockCallExpression, block ast.BlockDeclarationStatement, incoming string) []scope.Value

func (*BirEngine) PushCallstack

func (engine *BirEngine) PushCallstack(callstack Callstack) []Callstack

func (BirEngine) PushVerbs

func (engine BirEngine) PushVerbs(expression ast.BlockCallExpression, block ast.BlockDeclarationStatement, incoming string) []scope.Value

func (*BirEngine) ResolveArithmeticExpression

func (engine *BirEngine) ResolveArithmeticExpression(raw map[string]interface{}) ast.IntPrimitiveExpression

func (*BirEngine) ResolveAssignStatement

func (engine *BirEngine) ResolveAssignStatement(statement ast.AssignStatement)

func (*BirEngine) ResolveBlockCall

func (engine *BirEngine) ResolveBlockCall(raw map[string]interface{}, incoming string) ast.IntPrimitiveExpression

func (*BirEngine) ResolveBlockDeclaration

func (engine *BirEngine) ResolveBlockDeclaration(statement ast.BlockDeclarationStatement)

func (*BirEngine) ResolveCallstack

func (engine *BirEngine) ResolveCallstack(callstack Callstack) ast.IntPrimitiveExpression

func (*BirEngine) ResolveConditionExpression

func (engine *BirEngine) ResolveConditionExpression(raw map[string]interface{}) ast.IntPrimitiveExpression

func (*BirEngine) ResolveExpression

func (engine *BirEngine) ResolveExpression(raw map[string]interface{}) ast.IntPrimitiveExpression

func (*BirEngine) ResolveForStatement

func (engine *BirEngine) ResolveForStatement(statement ast.ForStatement)

func (*BirEngine) ResolveIfStatement

func (engine *BirEngine) ResolveIfStatement(statement ast.IfStatement) ast.IntPrimitiveExpression

func (*BirEngine) ResolveNamespaceDeclaration

func (engine *BirEngine) ResolveNamespaceDeclaration(statement ast.NamespaceDeclarationStatement)

func (*BirEngine) ResolveNamespaceIndexerExpression

func (engine *BirEngine) ResolveNamespaceIndexerExpression(raw map[string]interface{}) ast.IntPrimitiveExpression

func (*BirEngine) ResolveQuantityModifierStatement

func (engine *BirEngine) ResolveQuantityModifierStatement(statement ast.QuantityModifierStatement)

func (*BirEngine) ResolveReferenceExpression

func (engine *BirEngine) ResolveReferenceExpression(raw map[string]interface{}) ast.IntPrimitiveExpression

func (*BirEngine) ResolveScopeMutaterExpression

func (engine *BirEngine) ResolveScopeMutaterExpression(raw map[string]interface{}) ast.IntPrimitiveExpression

func (*BirEngine) ResolveSwitchStatement

func (engine *BirEngine) ResolveSwitchStatement(statement ast.SwitchStatement) ast.IntPrimitiveExpression

func (*BirEngine) ResolveVariableDeclaration

func (engine *BirEngine) ResolveVariableDeclaration(statement ast.VariableDeclarationStatement)

func (*BirEngine) ResolveWhileStatement

func (engine *BirEngine) ResolveWhileStatement(statement ast.WhileStatement)

func (*BirEngine) ReverseCallstack

func (engine *BirEngine) ReverseCallstack() []Callstack

func (*BirEngine) Run

func (engine *BirEngine) Run()

type Callstack

type Callstack struct {
	Label      string        `json:"label"`
	Identifier string        `json:"identifier"`
	Stack      []interface{} `json:"stack"`
}

Jump to

Keyboard shortcuts

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