(CommandList children: [ (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (C {(set)} {(-o)} {(errexit)}) (C {(source)} {(test/common.sh)}) (FuncDef name: ast body: (BraceGroup children: [ (C {(bin/osh)} {(-n)} {(-c)} {(SQ <'echo hi'>)}) (C {(bin/osh)} {(-n)} {(--ast-format)} {(text)} {(-c)} {(SQ <'echo hi'>)}) (C {(bin/osh)} {(-n)} {(--ast-format)} {(abbrev-html)} {(-c)} {(SQ <'echo hi'>)}) (C {(bin/osh)} {(-n)} {(--ast-format)} {(html)} {(-c)} {(SQ <'echo hi'>)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(bin/osh)} {(-n)} {(--ast-format)} {(oheap)} {(-c)} {(SQ <'echo hi'>)}) terminator: <Op_Semi ';'> ) ] action: [(C {(die)} {(DQ ('Should have failed'))})] spids: [16777215 128] ) ] spids: [16777215 138] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ast_bin) op: Equal rhs: {(_tmp/smoke-ast.bin)} spids: [143] ) ] spids: [141] ) (SimpleCommand words: [{(bin/osh)} {(-n)} {(--ast-format)} {(oheap)} {(-c)} {(SQ <'echo hi'>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$ast_bin')} spids: [162] ) ] ) (C {(ls)} {(-l)} {($ VSub_Name '$ast_bin')}) (C {(hexdump)} {(-C)} {($ VSub_Name '$ast_bin')}) ] spids: [47] ) spids: [43 46] ) (FuncDef name: osh-file body: (BraceGroup children: [ (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(Hello)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(_tmp/hi.sh)} spids: [207] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('\n') ('echo hi\n') ('echo bye\n') ('\n') ('func() {\n') (' echo ') (Right_DoubleQuote '"') ('inside func') (Right_DoubleQuote '"') ('\n') ('}\n') ('func 1 2 3\n') ('\n') ("# TODO: Test vars don't persist.\n") ('(echo ') (Right_DoubleQuote '"') ('in subshell') (Right_DoubleQuote '"') ('; echo ') (Right_DoubleQuote '"') (another) (Right_DoubleQuote '"') (')\n') ('\n') ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('(echo ComSub)\n') ('\n') ) } do_expansion: True here_end: EOF was_filled: T spids: [210] ) ] ) (C {($ VSub_Name '$OSH')} {(_tmp/hi.sh)}) (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(EMPTY)} ) (C {(touch)} {(_tmp/empty.sh)}) (C {($ VSub_Name '$OSH')} {(_tmp/empty.sh)}) (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(NO)} {(TRAILING)} {(NEWLINE)} ) (SimpleCommand words: [{(echo)} {(-n)} {(SQ <'echo hi'>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(_tmp/no-newline.sh)} spids: [295] ) ] ) (C {($ VSub_Name '$OSH')} {(_tmp/no-newline.sh)}) ] spids: [191] ) spids: [187 190] ) (FuncDef name: osh-stdin body: (BraceGroup children: [ (SimpleCommand words: [{($ VSub_Name '$OSH')}] redirects: [(Redir op_id:Redir_Less fd:16777215 arg_word:{(_tmp/hi.sh)} spids:[318])] ) (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(EMPTY)} ) (SimpleCommand words: [{($ VSub_Name '$OSH')}] redirects: [(Redir op_id:Redir_Less fd:16777215 arg_word:{(_tmp/empty.sh)} spids:[338])] ) (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(NO)} {(TRAILING)} {(NEWLINE)} ) (SimpleCommand words: [{($ VSub_Name '$OSH')}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(_tmp/no-newline.sh)} spids: [361] ) ] ) (SimpleCommand words: [{($ VSub_Name '$OSH')}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('echo ') (Right_DoubleQuote '"') ('\n') ('hi\n') (Right_DoubleQuote '"') ('\n') ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('\n') ('line continuation; echo two\n') ('\n') ('cat <<EOF_INNER\n') ('here doc\n') ('EOF_INNER\n') ('\n') ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('(\n') ('echo command sub\n') (')\n') ('\n') ('func() {\n') (' echo hi\n') ('}\n') ('\n') ) } do_expansion: True here_end: EOF was_filled: T spids: [373] ) ] ) ] spids: [313] ) spids: [309 312] ) (FuncDef name: osh-interactive body: (BraceGroup children: [ (Pipeline children: [(C {(echo)} {(SQ <'echo hi'>)}) (C {($ VSub_Name '$OSH')} {(-i)})] negated: F ) (Pipeline children: [(C {(echo)} {(SQ <exit>)}) (C {($ VSub_Name '$OSH')} {(-i)})] negated: F ) ] spids: [412] ) spids: [408 411] ) (FuncDef name: help body: (BraceGroup children: [ (C {(set)} {(Lit_Other '+') (o)} {(errexit)}) (C {(bin/oil.py)} {(--help)}) (C {(assert)} {($ VSub_QMark '$?')} {(-eq)} {(0)}) (C {(bin/oil.py)} {(osh)} {(--help)}) (C {(assert)} {($ VSub_QMark '$?')} {(-eq)} {(0)}) (C {(bin/oil.py)} {(oil)} {(--help)}) (C {(assert)} {($ VSub_QMark '$?')} {(-eq)} {(0)}) (C {(bin/osh)} {(--help)}) (C {(assert)} {($ VSub_QMark '$?')} {(-eq)} {(0)}) (C {(bin/oil)} {(--help)}) (C {(assert)} {($ VSub_QMark '$?')} {(-eq)} {(0)}) ] spids: [448] ) spids: [444 447] ) (FuncDef name: _error-case body: (BraceGroup children: [ (C {(echo)}) (C {(echo)} {(DQ ($ VSub_At '$@'))}) (C {(echo)}) (C {(bin/osh)} {(-c)} {(DQ ($ VSub_At '$@'))}) ] spids: [556] ) spids: [552 555] ) (FuncDef name: parse-errors body: (BraceGroup children: [ (C {(set)} {(Lit_Other '+') (o)} {(errexit)}) (C {(_error-case)} {(SQ <'echo < <<'>)}) (C {(_error-case)} {(SQ <'${foo:}'>)}) (C {(_error-case)} {(SQ <'$(( 1 + ))'>)}) (C {(_error-case)} {(SQ <'echo $( echo > >> )'>)}) ] spids: [587] ) spids: [583 586] ) (FuncDef name: exit-builtin-interactive body: (BraceGroup children: [ (C {(set)} {(Lit_Other '+') (o)} {(errexit)}) (Pipeline children: [(C {(echo)} {(SQ <'echo one; exit 42; echo two'>)}) (C {(bin/osh)} {(-i)})] negated: F ) (C {(assert)} {($ VSub_QMark '$?')} {(-eq)} {(42)}) ] spids: [636] ) spids: [632 635] ) (Assignment keyword: Assign_Readonly flags: [-a] pairs: [ (assign_pair lhs: (LhsName name:PASSING) op: Equal rhs: { (ArrayLiteralPart words: [ {(ast)} {(osh-file)} {(osh-stdin)} {(osh-interactive)} {(exit-builtin-interactive)} {(help)} ] ) } spids: [675] ) ] spids: [671] ) (FuncDef name: all-passing body: (BraceGroup children: [ (C {(run-all)} { (DQ (BracedVarSub token: <VSub_Name PASSING> bracket_op: (WholeArray op_id:Lit_At) spids: [709 714] ) ) } ) ] spids: [703] ) spids: [699 702] ) (C {(DQ ($ VSub_At '$@'))}) ] )