Documentation
¶
Overview ¶
Package interp implements the bc interpreter / evaluator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMathLib ¶
func RegisterMathLib(ip *Interp)
RegisterMathLib installs the -l math functions and sets scale=20.
Types ¶
type Interp ¶
type Interp struct {
// contains filtered or unexported fields
}
Interp is the bc interpreter.
func (*Interp) ExecStmts ¶
ExecStmts executes a list of statements and returns whether `quit` was signalled.
func (*Interp) RegisterFunc ¶
RegisterFunc registers a function definition.
func (*Interp) SetLineLen ¶ added in v1.0.1
type RuntimeError ¶
type RuntimeError struct{ Msg string }
RuntimeError is a non-fatal error (prints message, continues REPL).
func (*RuntimeError) Error ¶
func (e *RuntimeError) Error() string
Click to show internal directories.
Click to hide internal directories.