feature/issue-1: built out the core libraries #3
|
@ -432,20 +432,6 @@ func concatBuiltin(ctx context.Context, args invocationArgs) (object, error) {
|
||||||
return strObject(sb.String()), nil
|
return strObject(sb.String()), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
//func catBuiltin(ctx context.Context, args invocationArgs) (object, error) {
|
|
||||||
// if err := args.expectArgn(1); err != nil {
|
|
||||||
// return nil, err
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// filename, err := args.stringArg(0)
|
|
||||||
// if err != nil {
|
|
||||||
// return nil, err
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return &fileLinesStream{filename: filename}, nil
|
|
||||||
//}
|
|
||||||
|
|
||||||
func callBuiltin(ctx context.Context, args invocationArgs) (object, error) {
|
func callBuiltin(ctx context.Context, args invocationArgs) (object, error) {
|
||||||
if err := args.expectArgn(1); err != nil {
|
if err := args.expectArgn(1); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -89,10 +89,6 @@ func New(opts ...InstOption) *Inst {
|
||||||
rootEC.addMacro("foreach", macroFunc(foreachBuiltin))
|
rootEC.addMacro("foreach", macroFunc(foreachBuiltin))
|
||||||
rootEC.addMacro("proc", macroFunc(procBuiltin))
|
rootEC.addMacro("proc", macroFunc(procBuiltin))
|
||||||
|
|
||||||
//rootEC.addCmd("testTimebomb", invokableStreamFunc(errorTestBuiltin))
|
|
||||||
|
|
||||||
rootEC.setOrDefineVar("hello", strObject("world"))
|
|
||||||
|
|
||||||
inst := &Inst{
|
inst := &Inst{
|
||||||
out: os.Stdout,
|
out: os.Stdout,
|
||||||
rootEC: rootEC,
|
rootEC: rootEC,
|
||||||
|
|
Loading…
Reference in a new issue