Closed ire4ever1190 closed 6 months ago
Using do () syntax to pass a proc fails
do ()
foo do (): echo "test"
foo do : echo "test"
{ "kind": "nkDo", "sons": [ { "kind": "nkEmpty", "typ": }, { "kind": "nkEmpty", "typ": }, { "kind": "nkEmpty", "typ": }, { "kind": "nkFormalParams", "sons": [ { "kind": "nkEmpty", "typ": } ], "typ": }, { "kind": "nkEmpty", "typ": }, { "kind": "nkEmpty", "typ": }, { "kind": "nkStmtList", "sons": [ { "kind": "nkCommand", "sons": [ { "kind": "nkIdent", "ident": "echo", "typ": }, { "kind": "nkStrLit", "strVal": "test", "typ": } ], "typ": } ], "typ": } ], "typ": }
{ "kind": "nkCommand", "sons": [ { "kind": "nkIdent", "ident": "echo", "typ": }, { "kind": "nkStrLit", "strVal": "test", "typ": } ], "typ": }
Removing the () also causes the StmtListLambda warning to appear so its best to keep it
()
StmtListLambda
Fixed by #14 :tada:
Using
do ()
syntax to pass a proc failsInput
Formatted
PRE
POST
Removing the
()
also causes theStmtListLambda
warning to appear so its best to keep it