spec test index / oilshell.org
status | ysh | ysh-cpp | |
pass | 6 | 6 | |
FAIL | 1 | 1 | |
total | 7 | 7 | |
case | ysh | ysh-cpp | description |
0 | pass | pass | with eval builtin command, in global scope |
1 | pass | pass | with eval builtin command, in local scope |
2 | pass | pass | with eval builtin command, making them global with names() and setVar() |
3 | FAIL | FAIL | with parseCommand() then io->eval(), in local scope |
details | details | ||
4 | pass | pass | with parseCommand() then io->eval(cmd, vars={out_dict: {}}) |
5 | pass | pass | with evalToDict() |
6 | pass | pass | with runtime REFLECTION via __invoke__ - no parsing |
12 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
ysh | 3 with parseCommand() then io->eval(), in local scope [ysh stdout] Expected 'prefix a\nprefix b\n', got '(value.Command\n frag: \n (cmd_frag.Expr\n c: \n (Proc\n keyword: \n (Token\n id: Id.KW_Proc\n length: 4\n col: 0\n line: \n (SourceLine\n line_num: 1\n content: "proc echo_a(prefix) {\\n"\n src: \n (source.Dynamic\n what: "parseCommand()"\n location: \n (Token\n id: Id.Op_LParen\n length: 1\n col: 26\n line: \n (SourceLine\n line_num: 9\n content: " var cmd = parseCommand(s)\\n"\n src: (source.Stdin comment:"")\n )\n )\n )\n )\n )\n name: (Token id:Id.Lit_Chars length:6 col:5 line:...0x7f80f9096db8)\n sig: \n (proc_sig.Closed\n word: \n (ParamGroup\n params: [\n (Param\n blame_tok: (Token id:Id.Expr_Name length:6 col:12 line:...0x7f80f9096db8)\n name: prefix\n )\n ]\n )\n )\n body: \n (BraceGroup\n left: (Token id:Id.Lit_LBrace length:1 col:20 line:...0x7f80f9096db8)\n children: [\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 4\n col: 2\n line: \n (SourceLine\n line_num: 2\n content: " echo $prefix a\\n"\n src: ...0x7f80f8d30730\n )\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x7f80f8d2e8d8])\n (CompoundWord\n parts: [\n (SimpleVarSub\n tok: (Token id:Id.VSub_DollarName length:7 col:7 line:...0x7f80f9096f18)\n )\n ]\n )\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x7f80f9096f18)]\n )\n ]\n is_last_cmd: F\n )\n ]\n right: \n (Token\n id: Id.Lit_RBrace\n length: 1\n col: 0\n line: (SourceLine line_num:3 content:"}\\n" src:...0x7f80f8d30730)\n )\n )\n )\n )\n captured_frame: [\n Dict\n ARGV\n (Cell exported:F readonly:F nameref:F val:(value.List items:[]))\n result\n (Cell exported:F readonly:F nameref:F val:(value.Dict d:[Dict]))\n param\n (Cell exported:F readonly:F nameref:F val:(value.Str s:a))\n s\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: (value.Str s:"proc echo_a(prefix) {\\n echo $prefix a\\n}\\n")\n )\n cmd\n (Cell exported:F readonly:F nameref:F val:...0x7f80f9096f70)\n ]\n module_frame: [\n Dict\n ARGV\n (Cell exported:F readonly:F nameref:F val:(value.List items:[]))\n UID\n (Cell exported:F readonly:F nameref:F val:(value.Str s:1000))\n EUID\n (Cell exported:F readonly:F nameref:F val:(value.Str s:1000))\n PPID\n (Cell exported:F readonly:F nameref:F val:(value.Str s:33091))\n OPTIND\n (Cell exported:F readonly:F nameref:F val:(value.Str s:1))\n IFS\n (Cell exported:F readonly:F nameref:F val:(value.Str s:" \\t\\n"))\n HOSTNAME\n (Cell exported:F readonly:F nameref:F val:(value.Str s:8b9b3c0ef166))\n OSTYPE\n (Cell exported:F readonly:F nameref:F val:(value.Str s:linux))\n PS4\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: (value.Str s:"${SHX_indent}${SHX_punct}${SHX_pid_str} ")\n )\n COMP_WORDBREAKS\n (Cell exported:F readonly:F nameref:F val:(value.Str s:" \\t\\n\\"\'><=;|&(:"))\n TMP\n (Cell\n exported: T\n readonly: F\n nameref: F\n val: (value.Str s:/home/uke/oil/_tmp/spec-tmp/ysh-proc-meta.test.sh.32995/03-ysh)\n )\n REPO_ROOT\n (Cell exported:T readonly:F nameref:F val:(value.Str s:/home/uke/oil))\n PYTHONPATH\n (Cell exported:T readonly:F nameref:F val:(value.Str s:"/home/uke/oil:/home/uke/oil/vendor"))\n PWD\n (Cell\n exported: T\n readonly: F\n nameref: F\n val: (value.Str s:/home/uke/oil/_tmp/spec-tmp/ysh-proc-meta.test.sh.32995/03-ysh)\n )\n SH\n (Cell exported:T readonly:F nameref:F val:(value.Str s:/home/uke/oil/bin/ysh))\n LC_ALL\n (Cell exported:T readonly:F nameref:F val:(value.Str s:C.UTF-8))\n PATH\n (Cell\n exported: T\n readonly: F\n nameref: F\n val: \n (value.Str\n s: \n"/home/uke/oil/test/../spec/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"\n )\n )\n LOCALE_ARCHIVE\n (Cell exported:T readonly:F nameref:F val:(value.Str s:""))\n OILS_GC_ON_EXIT\n (Cell exported:T readonly:F nameref:F val:(value.Str s:1))\n SHELLOPTS\n (Cell exported:F readonly:T nameref:F val:(value.Str s:""))\n YSH_HISTFILE\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: (value.Str s:/home/uke/.local/share/oils/ysh_history)\n )\n p\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: \n (value.Proc\n name: p\n name_tok: \n (Token\n id: Id.Lit_Chars\n length: 1\n col: 5\n line: (SourceLine line_num:1 content:"proc p {\\n" src:...0x7f80f8d8dea8)\n )\n sig: (proc_sig__Open)\n body: \n (BraceGroup\n left: (Token id:Id.Lit_LBrace length:1 col:7 line:...0x7f80f9096578)\n children: [\n (command.VarDecl\n keyword: \n (Token\n id: Id.KW_Var\n length: 3\n col: 2\n line: \n (SourceLine\n line_num: 2\n content: " var result = {}\\n"\n src: ...0x7f80f8d8dea8\n )\n )\n lhs: [\n (NameType\n left: (Token id:Id.Expr_Name length:6 col:6 line:...0x7f80f90965d0)\n name: result\n )\n ]\n rhs: \n (expr.Dict\n left: (Token id:Id.Op_LBrace length:1 col:15 line:...0x7f80f90965d0)\n keys: []\n values: []\n )\n )\n (command.ForEach\n keyword: \n (Token\n id: Id.KW_For\n length: 3\n col: 2\n line: \n (SourceLine\n line_num: 3\n content: " for param in a b {\\n"\n src: ...0x7f80f8d8dea8\n )\n )\n iter_names: [param]\n iterable: \n (for_iter.Words\n words: [\n (CompoundWord\n parts: [\n (Token\n id: Id.Lit_Chars\n length: 1\n col: 15\n line: ...0x7f80f9096730\n tval: a\n )\n ]\n )\n (CompoundWord\n parts: [\n (Token\n id: Id.Lit_Chars\n length: 1\n col: 17\n line: ...0x7f80f9096730\n tval: b\n )\n ]\n )\n ]\n )\n body: \n (BraceGroup\n left: (Token id:Id.Lit_LBrace length:1 col:19 line:...0x7f80f9096730)\n children: [\n (command.VarDecl\n keyword: \n (Token\n id: Id.KW_Var\n length: 3\n col: 4\n line: \n (SourceLine\n line_num: 4\n content: " var s = \\"\\"\\"\\n"\n src: ...0x7f80f8d8dea8\n )\n )\n lhs: [\n (NameType\n left: (Token id:Id.Expr_Name length:1 col:8 line:...0x7f80f9096788)\n name: s\n )\n ]\n rhs: \n (DoubleQuoted\n left: \n (Token\n id: Id.Left_TDoubleQuote\n length: 3\n col: 12\n line: ...0x7f80f9096788\n )\n parts: [\n (Token\n id: Id.Lit_CharsWithoutPrefix\n length: 10\n col: 4\n line: \n (SourceLine\n line_num: 5\n content: " proc echo_$param(prefix) {\\n"\n src: ...0x7f80f8d8dea8\n )\n tval: "proc echo_"\n )\n (SimpleVarSub\n tok: \n (Token\n id: Id.VSub_DollarName\n length: 6\n col: 14\n line: ...0x7f80f90967e0\n tval: param\n )\n )\n (Token\n id: Id.Lit_Chars\n length: 11\n col: 20\n line: ...0x7f80f90967e0\n tval: "(prefix) {\\n"\n )\n (Token\n id: Id.Lit_CharsWithoutPrefix\n length: 7\n col: 4\n line: \n (SourceLine\n line_num: 6\n content: " echo \\\\$prefix $param\\n"\n src: ...0x7f80f8d8dea8\n )\n tval: " echo "\n )\n (word_part.EscapedLiteral\n token: \n (Token\n id: Id.Lit_EscapedChar\n length: 2\n col: 11\n line: ...0x7f80f9096838\n )\n ch: "$"\n )\n (Token\n id: Id.Lit_Chars\n length: 7\n col: 13\n line: ...0x7f80f9096838\n tval: "prefix "\n )\n (SimpleVarSub\n tok: \n (Token\n id: Id.VSub_DollarName\n length: 6\n col: 20\n line: ...0x7f80f9096838\n tval: param\n )\n )\n (Token\n id: Id.Lit_Chars\n length: 1\n col: 26\n line: ...0x7f80f9096838\n tval: "\\n"\n )\n (Token\n id: Id.Lit_CharsWithoutPrefix\n length: 2\n col: 4\n line: \n (SourceLine\n line_num: 7\n content: " }\\n"\n src: ...0x7f80f8d8dea8\n )\n tval: "}\\n"\n )\n ]\n right: \n (Token\n id: Id.Right_DoubleQuote\n length: 1\n col: 6\n line: \n (SourceLine\n line_num: 8\n content: " \\"\\"\\"\\n"\n src: ...0x7f80f8d8dea8\n )\n )\n )\n )\n (command.VarDecl\n keyword: (Token id:Id.KW_Var length:3 col:4 line:...0x7f80f9096a48)\n lhs: [\n (NameType\n left: (Token id:Id.Expr_Name length:3 col:8 line:...0x7f80f9096a48)\n name: cmd\n )\n ]\n rhs: \n (expr.FuncCall\n func: \n (expr.Var\n left: \n (Token\n id: Id.Expr_Name\n length: 12\n col: 14\n line: ...0x7f80f9096a48\n )\n name: parseCommand\n )\n args: \n (ArgList\n left: ...0x7f80f8d214c8\n pos_args: [\n (expr.Var\n left: \n (Token\n id: Id.Expr_Name\n length: 1\n col: 27\n line: ...0x7f80f9096a48\n )\n name: s\n )\n ]\n named_args: []\n right: \n (Token\n id: Id.Op_RParen\n length: 1\n col: 28\n line: ...0x7f80f9096a48\n )\n )\n )\n )\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 2\n col: 4\n line: \n (SourceLine\n line_num: 10\n content: " pp asdl_ (cmd)\\n"\n src: ...0x7f80f8d8dea8\n )\n tval: pp\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x7f80f8d21530])\n (CompoundWord\n parts: [\n (Token\n id: Id.Lit_Chars\n length: 5\n col: 7\n line: ...0x7f80f9096b50\n tval: asdl_\n )\n ]\n )\n ]\n typed_args: \n (ArgList\n left: (Token id:Id.Op_LParen length:1 col:13 line:...0x7f80f9096b50)\n pos_args: [\n (expr.Var\n left: \n (Token\n id: Id.Expr_Name\n length: 3\n col: 14\n line: ...0x7f80f9096b50\n )\n name: cmd\n )\n ]\n named_args: []\n right: (Token id:Id.Op_RParen length:1 col:17 line:...0x7f80f9096b50)\n )\n is_last_cmd: F\n )\n (command.Expr\n keyword: \n (Token\n id: Id.KW_Call\n length: 4\n col: 4\n line: \n (SourceLine\n line_num: 13\n content: " call io->eval(cmd)\\n"\n src: ...0x7f80f8d8dea8\n )\n )\n e: \n (expr.FuncCall\n func: \n (Attribute\n obj: \n (expr.Var\n left: \n (Token\n id: Id.Expr_Name\n length: 2\n col: 9\n line: ...0x7f80f9096c58\n )\n name: io\n )\n op: \n (Token\n id: Id.Expr_RArrow\n length: 2\n col: 11\n line: ...0x7f80f9096c58\n )\n attr: \n (Token\n id: Id.Expr_Name\n length: 4\n col: 13\n line: ...0x7f80f9096c58\n )\n attr_name: eval\n ctx: expr_context.Store\n )\n args: \n (ArgList\n left: \n (Token\n id: Id.Op_LParen\n length: 1\n col: 17\n line: ...0x7f80f9096c58\n )\n pos_args: [\n (expr.Var\n left: \n (Token\n id: Id.Expr_Name\n length: 3\n col: 18\n line: ...0x7f80f9096c58\n )\n name: cmd\n )\n ]\n named_args: []\n right: \n (Token\n id: Id.Op_RParen\n length: 1\n col: 21\n line: ...0x7f80f9096c58\n )\n )\n )\n )\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 6\n col: 4\n line: \n (SourceLine\n line_num: 15\n content: " echo_a zz\\n"\n src: ...0x7f80f8d8dea8\n )\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x7f80f8d21db8])\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:2 col:11 line:...0x7f80f9096d08)]\n )\n ]\n is_last_cmd: F\n )\n ]\n right: \n (Token\n id: Id.Lit_RBrace\n length: 1\n col: 2\n line: (SourceLine line_num:16 content:" }\\n" src:...0x7f80f8d8dea8)\n )\n )\n )\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 6\n col: 2\n line: \n (SourceLine\n line_num: 18\n content: " echo_a prefix\\n"\n src: ...0x7f80f8d8dea8\n )\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x7f80f8d21258])\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:6 col:9 line:...0x7f80f9096e10)]\n )\n ]\n is_last_cmd: F\n )\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 6\n col: 2\n line: \n (SourceLine\n line_num: 19\n content: " echo_b prefix\\n"\n src: ...0x7f80f8d8dea8\n )\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x7f80f8d2e328])\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:6 col:9 line:...0x7f80f9096e68)]\n )\n ]\n is_last_cmd: F\n )\n ]\n right: \n (Token\n id: Id.Lit_RBrace\n length: 1\n col: 0\n line: (SourceLine line_num:20 content:"}\\n" src:...0x7f80f8d8dea8)\n )\n )\n sh_compat: F\n module_frame: [\n Dict\n ARGV\n ...0x7f80f907cad0\n UID\n ...0x7f80f907cb30\n EUID\n ...0x7f80f907cb90\n PPID\n ...0x7f80f907cbf0\n OPTIND\n ...0x7f80f907cc50\n IFS\n ...0x7f80f907ccb0\n HOSTNAME\n ...0x7f80f907cd10\n OSTYPE\n ...0x7f80f907cd70\n PS4\n ...0x7f80f907cdd0\n COMP_WORDBREAKS\n ...0x7f80f907ce30\n TMP\n ...0x7f80f907ce90\n REPO_ROOT\n ...0x7f80f907cef0\n PYTHONPATH\n ...0x7f80f907cf50\n PWD\n ...0x7f80f907cfb0\n SH\n ...0x7f80f9032050\n LC_ALL\n ...0x7f80f90320b0\n PATH\n ...0x7f80f9032110\n LOCALE_ARCHIVE\n ...0x7f80f9032170\n OILS_GC_ON_EXIT\n ...0x7f80f90321d0\n SHELLOPTS\n ...0x7f80f9032230\n YSH_HISTFILE\n ...0x7f80f9032290\n p\n ...0x7f80f9032410\n ]\n )\n )\n ]\n)\n' stdout: (value.Command frag: (cmd_frag.Expr c: (Proc keyword: (Token id: Id.KW_Proc length: 4 col: 0 line: (SourceLine line_num: 1 content: "proc echo_a(prefix) {\n" src: (source.Dynamic what: "parseCommand()" location: (Token id: Id.Op_LParen length: 1 col: 26 line: (SourceLine line_num: 9 content: " var cmd = parseCommand(s)\n" src: (source.Stdin comment:"") ) ) ) ) ) name: (Token id:Id.Lit_Chars length:6 col:5 line:...0x7f80f9096db8) sig: (proc_sig.Closed word: (ParamGroup params: [ (Param blame_tok: (Token id:Id.Expr_Name length:6 col:12 line:...0x7f80f9096db8) name: prefix ) ] ) ) body: (BraceGroup left: (Token id:Id.Lit_LBrace length:1 col:20 line:...0x7f80f9096db8) children: [ (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 4 col: 2 line: (SourceLine line_num: 2 content: " echo $prefix a\n" src: ...0x7f80f8d30730 ) ) more_env: [] words: [ (CompoundWord parts:[...0x7f80f8d2e8d8]) (CompoundWord parts: [ (SimpleVarSub tok: (Token id:Id.VSub_DollarName length:7 col:7 line:...0x7f80f9096f18) ) ] ) (CompoundWord parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x7f80f9096f18)] ) ] is_last_cmd: F ) ] right: (Token id: Id.Lit_RBrace length: 1 col: 0 line: (SourceLine line_num:3 content:"}\n" src:...0x7f80f8d30730) ) ) ) ) captured_frame: [ Dict ARGV (Cell exported:F readonly:F nameref:F val:(value.List items:[])) result (Cell exported:F readonly:F nameref:F val:(value.Dict d:[Dict])) param (Cell exported:F readonly:F nameref:F val:(value.Str s:a)) s (Cell exported: F readonly: F nameref: F val: (value.Str s:"proc echo_a(prefix) {\n echo $prefix a\n}\n") ) cmd (Cell exported:F readonly:F nameref:F val:...0x7f80f9096f70) ] module_frame: [ Dict ARGV (Cell exported:F readonly:F nameref:F val:(value.List items:[])) UID (Cell exported:F readonly:F nameref:F val:(value.Str s:1000)) EUID (Cell exported:F readonly:F nameref:F val:(value.Str s:1000)) PPID (Cell exported:F readonly:F nameref:F val:(value.Str s:33091)) OPTIND (Cell exported:F readonly:F nameref:F val:(value.Str s:1)) IFS (Cell exported:F readonly:F nameref:F val:(value.Str s:" \t\n")) HOSTNAME (Cell exported:F readonly:F nameref:F val:(value.Str s:8b9b3c0ef166)) OSTYPE (Cell exported:F readonly:F nameref:F val:(value.Str s:linux)) PS4 (Cell exported: F readonly: F nameref: F val: (value.Str s:"${SHX_indent}${SHX_punct}${SHX_pid_str} ") ) COMP_WORDBREAKS (Cell exported:F readonly:F nameref:F val:(value.Str s:" \t\n\"'><=;|&(:")) TMP (Cell exported: T readonly: F nameref: F val: (value.Str s:/home/uke/oil/_tmp/spec-tmp/ysh-proc-meta.test.sh.32995/03-ysh) ) REPO_ROOT (Cell exported:T readonly:F nameref:F val:(value.Str s:/home/uke/oil)) PYTHONPATH (Cell exported:T readonly:F nameref:F val:(value.Str s:"/home/uke/oil:/home/uke/oil/vendor")) PWD (Cell exported: T readonly: F nameref: F val: (value.Str s:/home/uke/oil/_tmp/spec-tmp/ysh-proc-meta.test.sh.32995/03-ysh) ) SH (Cell exported:T readonly:F nameref:F val:(value.Str s:/home/uke/oil/bin/ysh)) LC_ALL (Cell exported:T readonly:F nameref:F val:(value.Str s:C.UTF-8)) PATH (Cell exported: T readonly: F nameref: F val: (value.Str s: "/home/uke/oil/test/../spec/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ) ) LOCALE_ARCHIVE (Cell exported:T readonly:F nameref:F val:(value.Str s:"")) OILS_GC_ON_EXIT (Cell exported:T readonly:F nameref:F val:(value.Str s:1)) SHELLOPTS (Cell exported:F readonly:T nameref:F val:(value.Str s:"")) YSH_HISTFILE (Cell exported: F readonly: F nameref: F val: (value.Str s:/home/uke/.local/share/oils/ysh_history) ) p (Cell exported: F readonly: F nameref: F val: (value.Proc name: p name_tok: (Token id: Id.Lit_Chars length: 1 col: 5 line: (SourceLine line_num:1 content:"proc p {\n" src:...0x7f80f8d8dea8) ) sig: (proc_sig__Open) body: (BraceGroup left: (Token id:Id.Lit_LBrace length:1 col:7 line:...0x7f80f9096578) children: [ (command.VarDecl keyword: (Token id: Id.KW_Var length: 3 col: 2 line: (SourceLine line_num: 2 content: " var result = {}\n" src: ...0x7f80f8d8dea8 ) ) lhs: [ (NameType left: (Token id:Id.Expr_Name length:6 col:6 line:...0x7f80f90965d0) name: result ) ] rhs: (expr.Dict left: (Token id:Id.Op_LBrace length:1 col:15 line:...0x7f80f90965d0) keys: [] values: [] ) ) (command.ForEach keyword: (Token id: Id.KW_For length: 3 col: 2 line: (SourceLine line_num: 3 content: " for param in a b {\n" src: ...0x7f80f8d8dea8 ) ) iter_names: [param] iterable: (for_iter.Words words: [ (CompoundWord parts: [ (Token id: Id.Lit_Chars length: 1 col: 15 line: ...0x7f80f9096730 tval: a ) ] ) (CompoundWord parts: [ (Token id: Id.Lit_Chars length: 1 col: 17 line: ...0x7f80f9096730 tval: b ) ] ) ] ) body: (BraceGroup left: (Token id:Id.Lit_LBrace length:1 col:19 line:...0x7f80f9096730) children: [ (command.VarDecl keyword: (Token id: Id.KW_Var length: 3 col: 4 line: (SourceLine line_num: 4 content: " var s = \"\"\"\n" src: ...0x7f80f8d8dea8 ) ) lhs: [ (NameType left: (Token id:Id.Expr_Name length:1 col:8 line:...0x7f80f9096788) name: s ) ] rhs: (DoubleQuoted left: (Token id: Id.Left_TDoubleQuote length: 3 col: 12 line: ...0x7f80f9096788 ) parts: [ (Token id: Id.Lit_CharsWithoutPrefix length: 10 col: 4 line: (SourceLine line_num: 5 content: " proc echo_$param(prefix) {\n" src: ...0x7f80f8d8dea8 ) tval: "proc echo_" ) (SimpleVarSub tok: (Token id: Id.VSub_DollarName length: 6 col: 14 line: ...0x7f80f90967e0 tval: param ) ) (Token id: Id.Lit_Chars length: 11 col: 20 line: ...0x7f80f90967e0 tval: "(prefix) {\n" ) (Token id: Id.Lit_CharsWithoutPrefix length: 7 col: 4 line: (SourceLine line_num: 6 content: " echo \\$prefix $param\n" src: ...0x7f80f8d8dea8 ) tval: " echo " ) (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar length: 2 col: 11 line: ...0x7f80f9096838 ) ch: "$" ) (Token id: Id.Lit_Chars length: 7 col: 13 line: ...0x7f80f9096838 tval: "prefix " ) (SimpleVarSub tok: (Token id: Id.VSub_DollarName length: 6 col: 20 line: ...0x7f80f9096838 tval: param ) ) (Token id: Id.Lit_Chars length: 1 col: 26 line: ...0x7f80f9096838 tval: "\n" ) (Token id: Id.Lit_CharsWithoutPrefix length: 2 col: 4 line: (SourceLine line_num: 7 content: " }\n" src: ...0x7f80f8d8dea8 ) tval: "}\n" ) ] right: (Token id: Id.Right_DoubleQuote length: 1 col: 6 line: (SourceLine line_num: 8 content: " \"\"\"\n" src: ...0x7f80f8d8dea8 ) ) ) ) (command.VarDecl keyword: (Token id:Id.KW_Var length:3 col:4 line:...0x7f80f9096a48) lhs: [ (NameType left: (Token id:Id.Expr_Name length:3 col:8 line:...0x7f80f9096a48) name: cmd ) ] rhs: (expr.FuncCall func: (expr.Var left: (Token id: Id.Expr_Name length: 12 col: 14 line: ...0x7f80f9096a48 ) name: parseCommand ) args: (ArgList left: ...0x7f80f8d214c8 pos_args: [ (expr.Var left: (Token id: Id.Expr_Name length: 1 col: 27 line: ...0x7f80f9096a48 ) name: s ) ] named_args: [] right: (Token id: Id.Op_RParen length: 1 col: 28 line: ...0x7f80f9096a48 ) ) ) ) (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 2 col: 4 line: (SourceLine line_num: 10 content: " pp asdl_ (cmd)\n" src: ...0x7f80f8d8dea8 ) tval: pp ) more_env: [] words: [ (CompoundWord parts:[...0x7f80f8d21530]) (CompoundWord parts: [ (Token id: Id.Lit_Chars length: 5 col: 7 line: ...0x7f80f9096b50 tval: asdl_ ) ] ) ] typed_args: (ArgList left: (Token id:Id.Op_LParen length:1 col:13 line:...0x7f80f9096b50) pos_args: [ (expr.Var left: (Token id: Id.Expr_Name length: 3 col: 14 line: ...0x7f80f9096b50 ) name: cmd ) ] named_args: [] right: (Token id:Id.Op_RParen length:1 col:17 line:...0x7f80f9096b50) ) is_last_cmd: F ) (command.Expr keyword: (Token id: Id.KW_Call length: 4 col: 4 line: (SourceLine line_num: 13 content: " call io->eval(cmd)\n" src: ...0x7f80f8d8dea8 ) ) e: (expr.FuncCall func: (Attribute obj: (expr.Var left: (Token id: Id.Expr_Name length: 2 col: 9 line: ...0x7f80f9096c58 ) name: io ) op: (Token id: Id.Expr_RArrow length: 2 col: 11 line: ...0x7f80f9096c58 ) attr: (Token id: Id.Expr_Name length: 4 col: 13 line: ...0x7f80f9096c58 ) attr_name: eval ctx: expr_context.Store ) args: (ArgList left: (Token id: Id.Op_LParen length: 1 col: 17 line: ...0x7f80f9096c58 ) pos_args: [ (expr.Var left: (Token id: Id.Expr_Name length: 3 col: 18 line: ...0x7f80f9096c58 ) name: cmd ) ] named_args: [] right: (Token id: Id.Op_RParen length: 1 col: 21 line: ...0x7f80f9096c58 ) ) ) ) (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 6 col: 4 line: (SourceLine line_num: 15 content: " echo_a zz\n" src: ...0x7f80f8d8dea8 ) ) more_env: [] words: [ (CompoundWord parts:[...0x7f80f8d21db8]) (CompoundWord parts: [(Token id:Id.Lit_Chars length:2 col:11 line:...0x7f80f9096d08)] ) ] is_last_cmd: F ) ] right: (Token id: Id.Lit_RBrace length: 1 col: 2 line: (SourceLine line_num:16 content:" }\n" src:...0x7f80f8d8dea8) ) ) ) (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 6 col: 2 line: (SourceLine line_num: 18 content: " echo_a prefix\n" src: ...0x7f80f8d8dea8 ) ) more_env: [] words: [ (CompoundWord parts:[...0x7f80f8d21258]) (CompoundWord parts: [(Token id:Id.Lit_Chars length:6 col:9 line:...0x7f80f9096e10)] ) ] is_last_cmd: F ) (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 6 col: 2 line: (SourceLine line_num: 19 content: " echo_b prefix\n" src: ...0x7f80f8d8dea8 ) ) more_env: [] words: [ (CompoundWord parts:[...0x7f80f8d2e328]) (CompoundWord parts: [(Token id:Id.Lit_Chars length:6 col:9 line:...0x7f80f9096e68)] ) ] is_last_cmd: F ) ] right: (Token id: Id.Lit_RBrace length: 1 col: 0 line: (SourceLine line_num:20 content:"}\n" src:...0x7f80f8d8dea8) ) ) sh_compat: F module_frame: [ Dict ARGV ...0x7f80f907cad0 UID ...0x7f80f907cb30 EUID ...0x7f80f907cb90 PPID ...0x7f80f907cbf0 OPTIND ...0x7f80f907cc50 IFS ...0x7f80f907ccb0 HOSTNAME ...0x7f80f907cd10 OSTYPE ...0x7f80f907cd70 PS4 ...0x7f80f907cdd0 COMP_WORDBREAKS ...0x7f80f907ce30 TMP ...0x7f80f907ce90 REPO_ROOT ...0x7f80f907cef0 PYTHONPATH ...0x7f80f907cf50 PWD ...0x7f80f907cfb0 SH ...0x7f80f9032050 LC_ALL ...0x7f80f90320b0 PATH ...0x7f80f9032110 LOCALE_ARCHIVE ...0x7f80f9032170 OILS_GC_ON_EXIT ...0x7f80f90321d0 SHELLOPTS ...0x7f80f9032230 YSH_HISTFILE ...0x7f80f9032290 p ...0x7f80f9032410 ] ) ) ] )stderr: echo_a zz ^~~~~~ [ stdin ]:15: 'echo_a' not found (OILS-ERR-100) [ stdin ]:15: errexit PID 33093: command.Simple failed with status 127 |
ysh-cpp | 3 with parseCommand() then io->eval(), in local scope [ysh-cpp stdout] Expected 'prefix a\nprefix b\n', got '(value.Command\n frag: \n (cmd_frag.Expr\n c: \n (Proc\n keyword: \n (Token\n id: Id.KW_Proc\n length: 4\n col: 0\n line: \n (SourceLine\n line_num: 1\n content: "proc echo_a(prefix) {\\n"\n src: \n (source.Dynamic\n what: "parseCommand()"\n location: \n (Token\n id: Id.Op_LParen\n length: 1\n col: 26\n line: \n (SourceLine\n line_num: 9\n content: " var cmd = parseCommand(s)\\n"\n src: (source.Stdin comment:"")\n )\n )\n )\n )\n )\n name: (Token id:Id.Lit_Chars length:6 col:5 line:...0x162a)\n sig: \n (proc_sig.Closed\n word: \n (ParamGroup\n params: [\n (Param\n blame_tok: (Token id:Id.Expr_Name length:6 col:12 line:...0x162a)\n name: prefix\n )\n ]\n )\n )\n body: \n (BraceGroup\n left: (Token id:Id.Lit_LBrace length:1 col:20 line:...0x162a)\n children: [\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 4\n col: 2\n line: (SourceLine line_num:2 content:" echo $prefix a\\n" src:...0x29fd)\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x15aa])\n (CompoundWord\n parts: [\n (SimpleVarSub\n tok: (Token id:Id.VSub_DollarName length:7 col:7 line:...0x15b2)\n )\n ]\n )\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x15b2)]\n )\n ]\n is_last_cmd: F\n )\n ]\n right: \n (Token\n id: Id.Lit_RBrace\n length: 1\n col: 0\n line: (SourceLine line_num:3 content:"}\\n" src:...0x29fd)\n )\n )\n )\n )\n captured_frame: [\n Dict\n ARGV\n (Cell exported:F readonly:F nameref:F val:(value.List items:[]))\n result\n (Cell exported:F readonly:F nameref:F val:(value.Dict d:[Dict]))\n param\n (Cell exported:F readonly:F nameref:F val:(value.Str s:a))\n s\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: (value.Str s:"proc echo_a(prefix) {\\n echo $prefix a\\n}\\n")\n )\n cmd\n (Cell exported:F readonly:F nameref:F val:...0x1fea)\n ]\n module_frame: [\n Dict\n ARGV\n (Cell exported:F readonly:F nameref:F val:(value.List items:[]))\n UID\n (Cell exported:F readonly:F nameref:F val:(value.Str s:1000))\n EUID\n (Cell exported:F readonly:F nameref:F val:(value.Str s:1000))\n PPID\n (Cell exported:F readonly:F nameref:F val:(value.Str s:33110))\n OPTIND\n (Cell exported:F readonly:F nameref:F val:(value.Str s:1))\n IFS\n (Cell exported:F readonly:F nameref:F val:(value.Str s:" \\t\\n"))\n HOSTNAME\n (Cell exported:F readonly:F nameref:F val:(value.Str s:8b9b3c0ef166))\n OSTYPE\n (Cell exported:F readonly:F nameref:F val:(value.Str s:Linux))\n PS4\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: (value.Str s:"${SHX_indent}${SHX_punct}${SHX_pid_str} ")\n )\n COMP_WORDBREAKS\n (Cell exported:F readonly:F nameref:F val:(value.Str s:" \\t\\n\\"\'><=;|&(:"))\n TMP\n (Cell\n exported: T\n readonly: F\n nameref: F\n val: (value.Str s:/home/uke/oil/_tmp/spec-tmp/ysh-proc-meta.test.sh.32995/03-ysh-cpp)\n )\n REPO_ROOT\n (Cell exported:T readonly:F nameref:F val:(value.Str s:/home/uke/oil/test/..))\n SH\n (Cell exported:T readonly:F nameref:F val:(value.Str s:/home/uke/oil/_bin/cxx-asan/ysh))\n LC_ALL\n (Cell exported:T readonly:F nameref:F val:(value.Str s:C.UTF-8))\n PATH\n (Cell\n exported: T\n readonly: F\n nameref: F\n val: \n (value.Str\n s: \n"/home/uke/oil/test/../spec/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"\n )\n )\n LOCALE_ARCHIVE\n (Cell exported:T readonly:F nameref:F val:(value.Str s:""))\n OILS_GC_ON_EXIT\n (Cell exported:T readonly:F nameref:F val:(value.Str s:1))\n LINES\n (Cell exported:T readonly:F nameref:F val:(value.Str s:24))\n COLUMNS\n (Cell exported:T readonly:F nameref:F val:(value.Str s:80))\n SHELLOPTS\n (Cell exported:F readonly:T nameref:F val:(value.Str s:""))\n PWD\n (Cell\n exported: T\n readonly: F\n nameref: F\n val: (value.Str s:/home/uke/oil/_tmp/spec-tmp/ysh-proc-meta.test.sh.32995/03-ysh-cpp)\n )\n YSH_HISTFILE\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: (value.Str s:/home/uke/.local/share/oils/ysh_history)\n )\n p\n (Cell\n exported: F\n readonly: F\n nameref: F\n val: \n (value.Proc\n name: p\n name_tok: \n (Token\n id: Id.Lit_Chars\n length: 1\n col: 5\n line: (SourceLine line_num:1 content:"proc p {\\n" src:...0x1d1d)\n )\n sig: (proc_sig.Open)\n body: \n (BraceGroup\n left: (Token id:Id.Lit_LBrace length:1 col:7 line:...0x1316)\n children: [\n (command.VarDecl\n keyword: \n (Token\n id: Id.KW_Var\n length: 3\n col: 2\n line: (SourceLine line_num:2 content:" var result = {}\\n" src:...0x1d1d)\n )\n lhs: [\n (NameType\n left: (Token id:Id.Expr_Name length:6 col:6 line:...0x12ca)\n name: result\n )\n ]\n rhs: \n (expr.Dict\n left: (Token id:Id.Op_LBrace length:1 col:15 line:...0x12ca)\n keys: []\n values: []\n )\n )\n (command.ForEach\n keyword: \n (Token\n id: Id.KW_For\n length: 3\n col: 2\n line: (SourceLine line_num:3 content:" for param in a b {\\n" src:...0x1d1d)\n )\n iter_names: [param]\n iterable: \n (for_iter.Words\n words: [\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x1216 tval:a)]\n )\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:1 col:17 line:...0x1216 tval:b)]\n )\n ]\n )\n body: \n (BraceGroup\n left: (Token id:Id.Lit_LBrace length:1 col:19 line:...0x1216)\n children: [\n (command.VarDecl\n keyword: \n (Token\n id: Id.KW_Var\n length: 3\n col: 4\n line: \n (SourceLine\n line_num: 4\n content: " var s = \\"\\"\\"\\n"\n src: ...0x1d1d\n )\n )\n lhs: [\n (NameType\n left: (Token id:Id.Expr_Name length:1 col:8 line:...0x11a6)\n name: s\n )\n ]\n rhs: \n (DoubleQuoted\n left: (Token id:Id.Left_TDoubleQuote length:3 col:12 line:...0x11a6)\n parts: [\n (Token\n id: Id.Lit_CharsWithoutPrefix\n length: 10\n col: 4\n line: \n (SourceLine\n line_num: 5\n content: " proc echo_$param(prefix) {\\n"\n src: ...0x1d1d\n )\n tval: "proc echo_"\n )\n (SimpleVarSub\n tok: \n (Token\n id: Id.VSub_DollarName\n length: 6\n col: 14\n line: ...0x110a\n tval: param\n )\n )\n (Token\n id: Id.Lit_Chars\n length: 11\n col: 20\n line: ...0x110a\n tval: "(prefix) {\\n"\n )\n (Token\n id: Id.Lit_CharsWithoutPrefix\n length: 7\n col: 4\n line: \n (SourceLine\n line_num: 6\n content: " echo \\\\$prefix $param\\n"\n src: ...0x1d1d\n )\n tval: " echo "\n )\n (word_part.EscapedLiteral\n token: (Token id:Id.Lit_EscapedChar length:2 col:11 line:...0x10f6)\n ch: "$"\n )\n (Token\n id: Id.Lit_Chars\n length: 7\n col: 13\n line: ...0x10f6\n tval: "prefix "\n )\n (SimpleVarSub\n tok: \n (Token\n id: Id.VSub_DollarName\n length: 6\n col: 20\n line: ...0x10f6\n tval: param\n )\n )\n (Token\n id: Id.Lit_Chars\n length: 1\n col: 26\n line: ...0x10f6\n tval: "\\n"\n )\n (Token\n id: Id.Lit_CharsWithoutPrefix\n length: 2\n col: 4\n line: (SourceLine line_num:7 content:" }\\n" src:...0x1d1d)\n tval: "}\\n"\n )\n ]\n right: \n (Token\n id: Id.Right_DoubleQuote\n length: 1\n col: 6\n line: (SourceLine line_num:8 content:" \\"\\"\\"\\n" src:...0x1d1d)\n )\n )\n )\n (command.VarDecl\n keyword: (Token id:Id.KW_Var length:3 col:4 line:...0x109e)\n lhs: [\n (NameType\n left: (Token id:Id.Expr_Name length:3 col:8 line:...0x109e)\n name: cmd\n )\n ]\n rhs: \n (expr.FuncCall\n func: \n (expr.Var\n left: (Token id:Id.Expr_Name length:12 col:14 line:...0x109e)\n name: parseCommand\n )\n args: \n (ArgList\n left: ...0x101a\n pos_args: [\n (expr.Var\n left: (Token id:Id.Expr_Name length:1 col:27 line:...0x109e)\n name: s\n )\n ]\n named_args: []\n right: (Token id:Id.Op_RParen length:1 col:28 line:...0x109e)\n )\n )\n )\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 2\n col: 4\n line: \n (SourceLine\n line_num: 10\n content: " pp asdl_ (cmd)\\n"\n src: ...0x1d1d\n )\n tval: pp\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x1a3a])\n (CompoundWord\n parts: [\n (Token\n id: Id.Lit_Chars\n length: 5\n col: 7\n line: ...0x1a42\n tval: asdl_\n )\n ]\n )\n ]\n typed_args: \n (ArgList\n left: (Token id:Id.Op_LParen length:1 col:13 line:...0x1a42)\n pos_args: [\n (expr.Var\n left: (Token id:Id.Expr_Name length:3 col:14 line:...0x1a42)\n name: cmd\n )\n ]\n named_args: []\n right: (Token id:Id.Op_RParen length:1 col:17 line:...0x1a42)\n )\n is_last_cmd: F\n )\n (command.Expr\n keyword: \n (Token\n id: Id.KW_Call\n length: 4\n col: 4\n line: \n (SourceLine\n line_num: 13\n content: " call io->eval(cmd)\\n"\n src: ...0x1d1d\n )\n )\n e: \n (expr.FuncCall\n func: \n (Attribute\n obj: \n (expr.Var\n left: (Token id:Id.Expr_Name length:2 col:9 line:...0x1986)\n name: io\n )\n op: (Token id:Id.Expr_RArrow length:2 col:11 line:...0x1986)\n attr: (Token id:Id.Expr_Name length:4 col:13 line:...0x1986)\n attr_name: eval\n ctx: expr_context.Store\n )\n args: \n (ArgList\n left: (Token id:Id.Op_LParen length:1 col:17 line:...0x1986)\n pos_args: [\n (expr.Var\n left: (Token id:Id.Expr_Name length:3 col:18 line:...0x1986)\n name: cmd\n )\n ]\n named_args: []\n right: (Token id:Id.Op_RParen length:1 col:21 line:...0x1986)\n )\n )\n )\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 6\n col: 4\n line: (SourceLine line_num:15 content:" echo_a zz\\n" src:...0x1d1d)\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x188e])\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:2 col:11 line:...0x1896)]\n )\n ]\n is_last_cmd: F\n )\n ]\n right: \n (Token\n id: Id.Lit_RBrace\n length: 1\n col: 2\n line: (SourceLine line_num:16 content:" }\\n" src:...0x1d1d)\n )\n )\n )\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 6\n col: 2\n line: (SourceLine line_num:18 content:" echo_a prefix\\n" src:...0x1d1d)\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x182e])\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:6 col:9 line:...0x1836)]\n )\n ]\n is_last_cmd: F\n )\n (command.Simple\n blame_tok: \n (Token\n id: Id.Lit_Chars\n length: 6\n col: 2\n line: (SourceLine line_num:19 content:" echo_b prefix\\n" src:...0x1d1d)\n )\n more_env: []\n words: [\n (CompoundWord parts:[...0x17f2])\n (CompoundWord\n parts: [(Token id:Id.Lit_Chars length:6 col:9 line:...0x17fa)]\n )\n ]\n is_last_cmd: F\n )\n ]\n right: \n (Token\n id: Id.Lit_RBrace\n length: 1\n col: 0\n line: (SourceLine line_num:20 content:"}\\n" src:...0x1d1d)\n )\n )\n sh_compat: F\n module_frame: [\n Dict\n ARGV\n ...0x845\n UID\n ...0x7d1\n EUID\n ...0x7c5\n PPID\n ...0x7b9\n OPTIND\n ...0x7ad\n IFS\n ...0x7a1\n HOSTNAME\n ...0x795\n OSTYPE\n ...0x785\n PS4\n ...0x779\n COMP_WORDBREAKS\n ...0x76d\n TMP\n ...0x761\n REPO_ROOT\n ...0x755\n SH\n ...0x749\n LC_ALL\n ...0x73d\n PATH\n ...0x731\n LOCALE_ARCHIVE\n ...0x725\n OILS_GC_ON_EXIT\n ...0x719\n LINES\n ...0x70d\n COLUMNS\n ...0x701\n SHELLOPTS\n ...0x6f5\n PWD\n ...0x6e5\n YSH_HISTFILE\n ...0x1ff5\n p\n ...0x16a5\n ]\n )\n )\n ]\n)\n' stdout: (value.Command frag: (cmd_frag.Expr c: (Proc keyword: (Token id: Id.KW_Proc length: 4 col: 0 line: (SourceLine line_num: 1 content: "proc echo_a(prefix) {\n" src: (source.Dynamic what: "parseCommand()" location: (Token id: Id.Op_LParen length: 1 col: 26 line: (SourceLine line_num: 9 content: " var cmd = parseCommand(s)\n" src: (source.Stdin comment:"") ) ) ) ) ) name: (Token id:Id.Lit_Chars length:6 col:5 line:...0x162a) sig: (proc_sig.Closed word: (ParamGroup params: [ (Param blame_tok: (Token id:Id.Expr_Name length:6 col:12 line:...0x162a) name: prefix ) ] ) ) body: (BraceGroup left: (Token id:Id.Lit_LBrace length:1 col:20 line:...0x162a) children: [ (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 4 col: 2 line: (SourceLine line_num:2 content:" echo $prefix a\n" src:...0x29fd) ) more_env: [] words: [ (CompoundWord parts:[...0x15aa]) (CompoundWord parts: [ (SimpleVarSub tok: (Token id:Id.VSub_DollarName length:7 col:7 line:...0x15b2) ) ] ) (CompoundWord parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x15b2)] ) ] is_last_cmd: F ) ] right: (Token id: Id.Lit_RBrace length: 1 col: 0 line: (SourceLine line_num:3 content:"}\n" src:...0x29fd) ) ) ) ) captured_frame: [ Dict ARGV (Cell exported:F readonly:F nameref:F val:(value.List items:[])) result (Cell exported:F readonly:F nameref:F val:(value.Dict d:[Dict])) param (Cell exported:F readonly:F nameref:F val:(value.Str s:a)) s (Cell exported: F readonly: F nameref: F val: (value.Str s:"proc echo_a(prefix) {\n echo $prefix a\n}\n") ) cmd (Cell exported:F readonly:F nameref:F val:...0x1fea) ] module_frame: [ Dict ARGV (Cell exported:F readonly:F nameref:F val:(value.List items:[])) UID (Cell exported:F readonly:F nameref:F val:(value.Str s:1000)) EUID (Cell exported:F readonly:F nameref:F val:(value.Str s:1000)) PPID (Cell exported:F readonly:F nameref:F val:(value.Str s:33110)) OPTIND (Cell exported:F readonly:F nameref:F val:(value.Str s:1)) IFS (Cell exported:F readonly:F nameref:F val:(value.Str s:" \t\n")) HOSTNAME (Cell exported:F readonly:F nameref:F val:(value.Str s:8b9b3c0ef166)) OSTYPE (Cell exported:F readonly:F nameref:F val:(value.Str s:Linux)) PS4 (Cell exported: F readonly: F nameref: F val: (value.Str s:"${SHX_indent}${SHX_punct}${SHX_pid_str} ") ) COMP_WORDBREAKS (Cell exported:F readonly:F nameref:F val:(value.Str s:" \t\n\"'><=;|&(:")) TMP (Cell exported: T readonly: F nameref: F val: (value.Str s:/home/uke/oil/_tmp/spec-tmp/ysh-proc-meta.test.sh.32995/03-ysh-cpp) ) REPO_ROOT (Cell exported:T readonly:F nameref:F val:(value.Str s:/home/uke/oil/test/..)) SH (Cell exported:T readonly:F nameref:F val:(value.Str s:/home/uke/oil/_bin/cxx-asan/ysh)) LC_ALL (Cell exported:T readonly:F nameref:F val:(value.Str s:C.UTF-8)) PATH (Cell exported: T readonly: F nameref: F val: (value.Str s: "/home/uke/oil/test/../spec/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ) ) LOCALE_ARCHIVE (Cell exported:T readonly:F nameref:F val:(value.Str s:"")) OILS_GC_ON_EXIT (Cell exported:T readonly:F nameref:F val:(value.Str s:1)) LINES (Cell exported:T readonly:F nameref:F val:(value.Str s:24)) COLUMNS (Cell exported:T readonly:F nameref:F val:(value.Str s:80)) SHELLOPTS (Cell exported:F readonly:T nameref:F val:(value.Str s:"")) PWD (Cell exported: T readonly: F nameref: F val: (value.Str s:/home/uke/oil/_tmp/spec-tmp/ysh-proc-meta.test.sh.32995/03-ysh-cpp) ) YSH_HISTFILE (Cell exported: F readonly: F nameref: F val: (value.Str s:/home/uke/.local/share/oils/ysh_history) ) p (Cell exported: F readonly: F nameref: F val: (value.Proc name: p name_tok: (Token id: Id.Lit_Chars length: 1 col: 5 line: (SourceLine line_num:1 content:"proc p {\n" src:...0x1d1d) ) sig: (proc_sig.Open) body: (BraceGroup left: (Token id:Id.Lit_LBrace length:1 col:7 line:...0x1316) children: [ (command.VarDecl keyword: (Token id: Id.KW_Var length: 3 col: 2 line: (SourceLine line_num:2 content:" var result = {}\n" src:...0x1d1d) ) lhs: [ (NameType left: (Token id:Id.Expr_Name length:6 col:6 line:...0x12ca) name: result ) ] rhs: (expr.Dict left: (Token id:Id.Op_LBrace length:1 col:15 line:...0x12ca) keys: [] values: [] ) ) (command.ForEach keyword: (Token id: Id.KW_For length: 3 col: 2 line: (SourceLine line_num:3 content:" for param in a b {\n" src:...0x1d1d) ) iter_names: [param] iterable: (for_iter.Words words: [ (CompoundWord parts: [(Token id:Id.Lit_Chars length:1 col:15 line:...0x1216 tval:a)] ) (CompoundWord parts: [(Token id:Id.Lit_Chars length:1 col:17 line:...0x1216 tval:b)] ) ] ) body: (BraceGroup left: (Token id:Id.Lit_LBrace length:1 col:19 line:...0x1216) children: [ (command.VarDecl keyword: (Token id: Id.KW_Var length: 3 col: 4 line: (SourceLine line_num: 4 content: " var s = \"\"\"\n" src: ...0x1d1d ) ) lhs: [ (NameType left: (Token id:Id.Expr_Name length:1 col:8 line:...0x11a6) name: s ) ] rhs: (DoubleQuoted left: (Token id:Id.Left_TDoubleQuote length:3 col:12 line:...0x11a6) parts: [ (Token id: Id.Lit_CharsWithoutPrefix length: 10 col: 4 line: (SourceLine line_num: 5 content: " proc echo_$param(prefix) {\n" src: ...0x1d1d ) tval: "proc echo_" ) (SimpleVarSub tok: (Token id: Id.VSub_DollarName length: 6 col: 14 line: ...0x110a tval: param ) ) (Token id: Id.Lit_Chars length: 11 col: 20 line: ...0x110a tval: "(prefix) {\n" ) (Token id: Id.Lit_CharsWithoutPrefix length: 7 col: 4 line: (SourceLine line_num: 6 content: " echo \\$prefix $param\n" src: ...0x1d1d ) tval: " echo " ) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar length:2 col:11 line:...0x10f6) ch: "$" ) (Token id: Id.Lit_Chars length: 7 col: 13 line: ...0x10f6 tval: "prefix " ) (SimpleVarSub tok: (Token id: Id.VSub_DollarName length: 6 col: 20 line: ...0x10f6 tval: param ) ) (Token id: Id.Lit_Chars length: 1 col: 26 line: ...0x10f6 tval: "\n" ) (Token id: Id.Lit_CharsWithoutPrefix length: 2 col: 4 line: (SourceLine line_num:7 content:" }\n" src:...0x1d1d) tval: "}\n" ) ] right: (Token id: Id.Right_DoubleQuote length: 1 col: 6 line: (SourceLine line_num:8 content:" \"\"\"\n" src:...0x1d1d) ) ) ) (command.VarDecl keyword: (Token id:Id.KW_Var length:3 col:4 line:...0x109e) lhs: [ (NameType left: (Token id:Id.Expr_Name length:3 col:8 line:...0x109e) name: cmd ) ] rhs: (expr.FuncCall func: (expr.Var left: (Token id:Id.Expr_Name length:12 col:14 line:...0x109e) name: parseCommand ) args: (ArgList left: ...0x101a pos_args: [ (expr.Var left: (Token id:Id.Expr_Name length:1 col:27 line:...0x109e) name: s ) ] named_args: [] right: (Token id:Id.Op_RParen length:1 col:28 line:...0x109e) ) ) ) (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 2 col: 4 line: (SourceLine line_num: 10 content: " pp asdl_ (cmd)\n" src: ...0x1d1d ) tval: pp ) more_env: [] words: [ (CompoundWord parts:[...0x1a3a]) (CompoundWord parts: [ (Token id: Id.Lit_Chars length: 5 col: 7 line: ...0x1a42 tval: asdl_ ) ] ) ] typed_args: (ArgList left: (Token id:Id.Op_LParen length:1 col:13 line:...0x1a42) pos_args: [ (expr.Var left: (Token id:Id.Expr_Name length:3 col:14 line:...0x1a42) name: cmd ) ] named_args: [] right: (Token id:Id.Op_RParen length:1 col:17 line:...0x1a42) ) is_last_cmd: F ) (command.Expr keyword: (Token id: Id.KW_Call length: 4 col: 4 line: (SourceLine line_num: 13 content: " call io->eval(cmd)\n" src: ...0x1d1d ) ) e: (expr.FuncCall func: (Attribute obj: (expr.Var left: (Token id:Id.Expr_Name length:2 col:9 line:...0x1986) name: io ) op: (Token id:Id.Expr_RArrow length:2 col:11 line:...0x1986) attr: (Token id:Id.Expr_Name length:4 col:13 line:...0x1986) attr_name: eval ctx: expr_context.Store ) args: (ArgList left: (Token id:Id.Op_LParen length:1 col:17 line:...0x1986) pos_args: [ (expr.Var left: (Token id:Id.Expr_Name length:3 col:18 line:...0x1986) name: cmd ) ] named_args: [] right: (Token id:Id.Op_RParen length:1 col:21 line:...0x1986) ) ) ) (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 6 col: 4 line: (SourceLine line_num:15 content:" echo_a zz\n" src:...0x1d1d) ) more_env: [] words: [ (CompoundWord parts:[...0x188e]) (CompoundWord parts: [(Token id:Id.Lit_Chars length:2 col:11 line:...0x1896)] ) ] is_last_cmd: F ) ] right: (Token id: Id.Lit_RBrace length: 1 col: 2 line: (SourceLine line_num:16 content:" }\n" src:...0x1d1d) ) ) ) (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 6 col: 2 line: (SourceLine line_num:18 content:" echo_a prefix\n" src:...0x1d1d) ) more_env: [] words: [ (CompoundWord parts:[...0x182e]) (CompoundWord parts: [(Token id:Id.Lit_Chars length:6 col:9 line:...0x1836)] ) ] is_last_cmd: F ) (command.Simple blame_tok: (Token id: Id.Lit_Chars length: 6 col: 2 line: (SourceLine line_num:19 content:" echo_b prefix\n" src:...0x1d1d) ) more_env: [] words: [ (CompoundWord parts:[...0x17f2]) (CompoundWord parts: [(Token id:Id.Lit_Chars length:6 col:9 line:...0x17fa)] ) ] is_last_cmd: F ) ] right: (Token id: Id.Lit_RBrace length: 1 col: 0 line: (SourceLine line_num:20 content:"}\n" src:...0x1d1d) ) ) sh_compat: F module_frame: [ Dict ARGV ...0x845 UID ...0x7d1 EUID ...0x7c5 PPID ...0x7b9 OPTIND ...0x7ad IFS ...0x7a1 HOSTNAME ...0x795 OSTYPE ...0x785 PS4 ...0x779 COMP_WORDBREAKS ...0x76d TMP ...0x761 REPO_ROOT ...0x755 SH ...0x749 LC_ALL ...0x73d PATH ...0x731 LOCALE_ARCHIVE ...0x725 OILS_GC_ON_EXIT ...0x719 LINES ...0x70d COLUMNS ...0x701 SHELLOPTS ...0x6f5 PWD ...0x6e5 YSH_HISTFILE ...0x1ff5 p ...0x16a5 ] ) ) ] )stderr: echo_a zz ^~~~~~ [ stdin ]:15: 'echo_a' not found (OILS-ERR-100) [ stdin ]:15: errexit PID 33111: command.Simple failed with status 127 |