nitro

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 6 Imported by: 0

README

Nitro

Nitro is a computer language.

Notes

Using antlr version 4.9.2

Documentation

Index

Constants

View Source
const (
	OpUMinus = vm.OpUMinus
	OpAdd    = vm.OpAdd
	OpSub    = vm.OpSub
	OpMult   = vm.OpMult
	OpDiv    = vm.OpDiv
	OpMod    = vm.OpMod
	OpLT     = vm.OpLT
	OpLE     = vm.OpLE
	OpGT     = vm.OpGT
	OpGE     = vm.OpGE
	OpEq     = vm.OpEq
	OpNE     = vm.OpNE
)

Variables

View Source
var (
	True  = vm.True
	False = vm.False
)
View Source
var ErrCannotCallNil = vm.ErrCannotCallNil

Functions

func CoerceToBool

func CoerceToBool(v Value) bool

func IsIterable

func IsIterable(v Value) bool

func IsReadable

func IsReadable(v Value) bool

func TypeName

func TypeName(v Value) string

Types

type Array

type Array = vm.Array

func NewArray

func NewArray() *Array

func NewArrayFromSlice

func NewArrayFromSlice(s []Value) *Array

type Bool

type Bool = vm.Bool

func NewBool

func NewBool(v bool) Bool

type Callable

type Callable = vm.Callable

type CloseFn

type CloseFn = vm.CloseFn

type Closure

type Closure = vm.Closure

type Compiler

type Compiler = compiler.Compiler

type ErrLogger

type ErrLogger = errlogger.ErrLogger

func NewConsoleErrLogger

func NewConsoleErrLogger() ErrLogger

type Float

type Float = vm.Float

func NewFloat

func NewFloat(v float64) Float

type Frame

type Frame = vm.FrameInfo

type FrameCrumb

type FrameCrumb = vm.FrameCrumb

type Func

type Func = vm.Fn

type Indexable

type Indexable = vm.Indexable

type Int

type Int = vm.Int

func NewInt

func NewInt(v int64) Int

type Iterable

type Iterable = vm.Iterable

type Iterator

type Iterator = vm.Iterator

func MakeIterator

func MakeIterator(m *VM, v Value) (Iterator, error)

func NewIterator

func NewIterator(f func(m *VM, args []Value, nRet int) ([]Value, error), c CloseFn, nret int) Iterator

type Metadata

type Metadata = meta.Metadata

type NativeFn

type NativeFn = vm.NativeFn

func NewNativeFn added in v0.2.0

func NewNativeFn(f func(m *VM, args []Value, nRet int) ([]Value, error)) *NativeFn

type Object

type Object = vm.Object

func NewObject

func NewObject() *Object

type Op

type Op = vm.Op

type Pos

type Pos = token.Pos

type Program

type Program = vm.Program

type Readable

type Readable = vm.Readable

type Reader

type Reader = vm.Reader

func MakeReader

func MakeReader(m *VM, v Value) (Reader, error)

type Regex

type Regex = vm.Regex

func NewRegex

func NewRegex(r *regexp.Regexp) *Regex

type RuntimeError

type RuntimeError = vm.RuntimeError

type String

type String = vm.String

func NewString

func NewString(v string) String

type VM

type VM = vm.VM

func NewVM

func NewVM(p *Program) *VM

type Value

type Value = vm.Value

func EvalOp

func EvalOp(op Op, operand1, operand2 Value) (Value, error)

type ValueRef

type ValueRef = vm.ValueRef

func NewValueRef

func NewValueRef(ref *Value) ValueRef

Jump to

Keyboard shortcuts

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