apruntime

package
v0.0.0-...-8c29c1c Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

The apruntime package contains all base operations.

Index

Constants

This section is empty.

Variables

View Source
var AssignBinaryOperators = map[token.Token]interface{}{
	token.ADD_ASSIGN: add,
	token.SUB_ASSIGN: sub,
	token.MUL_ASSIGN: mul,
	token.QUO_ASSIGN: quo,
}
View Source
var BinaryOperators = map[token.Token]interface{}{
	token.ADD: add,
	token.SUB: sub,
	token.MUL: mul,
	token.QUO: quo,
	token.LSS: less,
	token.GTR: greater,
	token.LOR: lor,
	token.EQL: equal,
	token.NEQ: neq,
	token.LEQ: leq,
	token.GEQ: geq,
}
View Source
var FmtPackage = &NativePackage{
	Name: "fmt",
	Funcs: map[string]interface{}{
		"Print":   fmt.Print,
		"Println": fmt.Println,
		"Sprint":  fmt.Sprint,
	},
	Globals: map[string]*interface{}{},
}
View Source
var IncDecOperators = map[token.Token]interface{}{
	token.INC: add,
	token.DEC: sub,
}
View Source
var TimePackage = &NativePackage{
	Name: "time",
	Funcs: map[string]interface{}{
		"Now":   time.Now,
		"Since": time.Since,
	},
	Globals: map[string]*interface{}{},
}

Functions

This section is empty.

Types

type NativePackage

type NativePackage struct {
	Name    string
	Funcs   map[string]interface{}
	Globals map[string]*interface{}
}

Jump to

Keyboard shortcuts

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