From 82b86397797ecd4d1782ee75abf7933e5d973e3c Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 16 Aug 2022 10:40:36 +0800 Subject: fix a missing argument number check. --- spec/inputs/backcall.yue | 32 ++++++++++++++++++++------------ spec/outputs/backcall.lua | 16 ++++++++++++++++ 2 files changed, 36 insertions(+), 12 deletions(-) (limited to 'spec') diff --git a/spec/inputs/backcall.yue b/spec/inputs/backcall.yue index d7ed0dd..8aadc71 100644 --- a/spec/inputs/backcall.yue +++ b/spec/inputs/backcall.yue @@ -1,32 +1,32 @@ do - (x)<- map {1,2,3} + (x) <- map {1,2,3} x * 2 do - (x)<- map _,{1,2,3} + (x) <- map _,{1,2,3} x * 2 do - (x)<- filter _, do - (x)<- map _,{1,2,3,4} + (x) <- filter _, do + (x) <- map _,{1,2,3,4} x * 2 x > 2 do - (data)<- http?.get "ajaxtest" + (data) <- http?.get "ajaxtest" body[".result"]\html data - (processed)<- http.post "ajaxprocess", data + (processed) <- http.post "ajaxprocess", data body[".result"]\append processed <- setTimeout 1000 print "done" do <- syncStatus - (err, data="nil")<- loadAsync "file.yue" + (err, data="nil") <- loadAsync "file.yue" if err print err return - (codes)<- compileAsync data + (codes) <- compileAsync data func = loadstring codes func! @@ -42,18 +42,18 @@ do do :result,:msg = do - (data)<- receiveAsync "filename.txt" + (data) <- receiveAsync "filename.txt" print data - (info)<- processAsync data + (info) <- processAsync data check info print result,msg totalSize = (for file in *files - (data)<- loadAsync file + (data) <- loadAsync file addToCache file,data) |> reduce 0,(a,b)-> a+b propA = do - (value)<= property => @_value + (value) <= property => @_value print "old value: #{@_value}" print "new value: #{value}" @_value = value @@ -67,5 +67,13 @@ propB = do alert "hi" +local x, y, z +x = do (a) < -b +x, y, z = do (a) <- b +x, y, z = do (a) <-b + +x = do a <= b +x, y, z = do (a) <= b + nil diff --git a/spec/outputs/backcall.lua b/spec/outputs/backcall.lua index 3a4c5e9..b065388 100644 --- a/spec/outputs/backcall.lua +++ b/spec/outputs/backcall.lua @@ -130,4 +130,20 @@ do end) end alert("hi") +local x, y, z +do + x = (a) < -b +end +do + x, y, z = b(function(a) end) +end +do + x, y, z = b(function(a) end) +end +do + x = a <= b +end +do + x, y, z = b(function(self, a) end) +end return nil -- cgit v1.2.3-55-g6feb