interpreter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package interpreter implements functions to interpreter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interpreter

type Interpreter struct {
	// contains filtered or unexported fields
}

func New

func New() *Interpreter

func (*Interpreter) Array

func (i *Interpreter) Array(na *ast.Array, sc *runtime.Scope) runtime.Data

func (*Interpreter) ArrayInfix

func (i *Interpreter) ArrayInfix(operator string, left, right runtime.Data) (runtime.Data, error)

func (*Interpreter) ArraySubscript

func (i *Interpreter) ArraySubscript(array, index runtime.Data) runtime.Data

func (*Interpreter) As

func (i *Interpreter) As(na *ast.As, sc *runtime.Scope) runtime.Data

func (*Interpreter) Assign

func (i *Interpreter) Assign(na *ast.Assign, sc *runtime.Scope) runtime.Data

func (*Interpreter) AssignSubscript

func (i *Interpreter) AssignSubscript(ns *ast.Subscript, original runtime.Data, value runtime.Data, sc *runtime.Scope) (runtime.Data, error)

func (*Interpreter) BitwiseNotPrefix

func (i *Interpreter) BitwiseNotPrefix(data runtime.Data) (runtime.Data, error)

func (*Interpreter) BlockStatement

func (i *Interpreter) BlockStatement(nb *ast.BlockStatement, sc *runtime.Scope) runtime.Data

func (*Interpreter) BooleanInfix

func (i *Interpreter) BooleanInfix(operator string, left, right runtime.Data) (runtime.Data, error)

func (*Interpreter) Dictionary

func (i *Interpreter) Dictionary(nd *ast.Dictionary, sc *runtime.Scope) runtime.Data

func (*Interpreter) DictionaryInfix

func (i *Interpreter) DictionaryInfix(operator string, left, right runtime.Data) (runtime.Data, error)

func (*Interpreter) DictionarySubscript

func (i *Interpreter) DictionarySubscript(dictionary, index runtime.Data) runtime.Data

func (*Interpreter) FloatInfix

func (i *Interpreter) FloatInfix(operator string, left, right float64) (runtime.Data, error)

func (*Interpreter) ForArray

func (i *Interpreter) ForArray(nr *ast.Repeat, array *runtime.TArray, sc *runtime.Scope) runtime.Data

func (*Interpreter) ForDictionary

func (i *Interpreter) ForDictionary(nr *ast.Repeat, dictionary *runtime.TDictionary, sc *runtime.Scope) runtime.Data

func (*Interpreter) Function

func (i *Interpreter) Function(nf *ast.FunctionCall, sc *runtime.Scope) runtime.Data

func (*Interpreter) Identifier

func (i *Interpreter) Identifier(ni *ast.Identifier, sc *runtime.Scope) runtime.Data

func (*Interpreter) If

func (i *Interpreter) If(ni *ast.If, sc *runtime.Scope) runtime.Data

func (*Interpreter) InfixExpression

func (i *Interpreter) InfixExpression(ni *ast.InfixExpression, sc *runtime.Scope) runtime.Data

func (*Interpreter) IntegerInfix

func (i *Interpreter) IntegerInfix(operator string, left, right runtime.Data) (runtime.Data, error)

func (*Interpreter) Interpreter

func (i *Interpreter) Interpreter(ni ast.Node, sc *runtime.Scope) runtime.Data

func (*Interpreter) Is

func (i *Interpreter) Is(ni *ast.Is, sc *runtime.Scope) runtime.Data

func (*Interpreter) Match

func (i *Interpreter) Match(nm *ast.Match, sc *runtime.Scope) runtime.Data

func (*Interpreter) MatchWhen

func (i *Interpreter) MatchWhen(whens []*ast.MatchWhen, control runtime.Data, sc *runtime.Scope) (*ast.MatchWhen, error)

func (*Interpreter) MinusPrefix

func (i *Interpreter) MinusPrefix(data runtime.Data) (runtime.Data, error)

func (*Interpreter) Module

func (i *Interpreter) Module(nm *ast.Module, sc *runtime.Scope) runtime.Data

func (*Interpreter) ModuleAccess

func (i *Interpreter) ModuleAccess(na *ast.ModuleAccess, sc *runtime.Scope) runtime.Data

func (*Interpreter) NilInfix

func (i *Interpreter) NilInfix(operator string, left, right runtime.Data) (runtime.Data, error)

func (*Interpreter) Pipe

func (i *Interpreter) Pipe(np *ast.Pipe, sc *runtime.Scope) runtime.Data

func (*Interpreter) PrefixExpression

func (i *Interpreter) PrefixExpression(np *ast.PrefixExpression, sc *runtime.Scope) runtime.Data

func (*Interpreter) Program

func (i *Interpreter) Program(np *ast.Program, sc *runtime.Scope) runtime.Data

func (*Interpreter) RangeIntegerInfix

func (i *Interpreter) RangeIntegerInfix(left, right int64) runtime.Data

func (*Interpreter) RangeStringInfix

func (i *Interpreter) RangeStringInfix(left, right string) (runtime.Data, error)

func (*Interpreter) Repeat

func (i *Interpreter) Repeat(nr *ast.Repeat, sc *runtime.Scope) runtime.Data

func (*Interpreter) RepeatInfinite

func (i *Interpreter) RepeatInfinite(nr *ast.Repeat, sc *runtime.Scope) runtime.Data

func (*Interpreter) RuntimeFunction

func (i *Interpreter) RuntimeFunction(nf *ast.FunctionCall, fn runtime.TRuntimeFn, sc *runtime.Scope) runtime.Data

func (*Interpreter) StringInfix

func (i *Interpreter) StringInfix(operator string, left, right string) (runtime.Data, error)

func (*Interpreter) StringSubscript

func (i *Interpreter) StringSubscript(str, index runtime.Data) (runtime.Data, error)

func (*Interpreter) Subscript

func (i *Interpreter) Subscript(ns *ast.Subscript, sc *runtime.Scope) runtime.Data

func (*Interpreter) Use

func (i *Interpreter) Use(nu *ast.Use, sc *runtime.Scope) runtime.Data

func (*Interpreter) Val

func (i *Interpreter) Val(nl *ast.Val, sc *runtime.Scope) runtime.Data

func (*Interpreter) Var

func (i *Interpreter) Var(nv *ast.Var, sc *runtime.Scope) runtime.Data

Jump to

Keyboard shortcuts

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