From 7cee075958811defaff7b839053c2076dbdad435 Mon Sep 17 00:00:00 2001 From: HAYAMA_Kaoru Date: Sat, 30 Nov 2024 10:35:10 +0900 Subject: [PATCH] Swap `(expect)` and `(expect*)` --- example.lsp | 2 +- global.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example.lsp b/example.lsp index f1d5431..7f0439b 100644 --- a/example.lsp +++ b/example.lsp @@ -2,7 +2,7 @@ (let ((ctrlc (format nil "~A" (convert 3 )))) (block main (while t - (expect + (expect* ("xxx" (send ctrlc) (sendln "exit") diff --git a/global.go b/global.go index 38b8505..de1b4d8 100644 --- a/global.go +++ b/global.go @@ -49,7 +49,7 @@ func (g *Global) spawn(ctx context.Context, w *gmnlisp.World, args []gmnlisp.Nod var symTimeout = gmnlisp.NewSymbol("timeout") -func (g *Global) expectX(ctx context.Context, w *gmnlisp.World, node gmnlisp.Node) (gmnlisp.Node, error) { +func (g *Global) expect(ctx context.Context, w *gmnlisp.World, node gmnlisp.Node) (gmnlisp.Node, error) { patterns := []string{} timeOut := 0 @@ -84,7 +84,7 @@ func (g *Global) expectX(ctx context.Context, w *gmnlisp.World, node gmnlisp.Nod return gmnlisp.Integer(result), nil } -func (g *Global) expect(ctx context.Context, w *gmnlisp.World, node gmnlisp.Node) (gmnlisp.Node, error) { +func (g *Global) expectX(ctx context.Context, w *gmnlisp.World, node gmnlisp.Node) (gmnlisp.Node, error) { patterns := []string{} actions := []gmnlisp.Node{}