(CommandList children: [ (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (C {(set)} {(-o)} {(errexit)}) (Assignment keyword: Assign_Readonly pairs: [(assign_pair lhs:(LhsName name:OSH) op:Equal rhs:{(bin/osh)} spids:[40])] spids: [38] ) (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:-1 arg_word:{(_tmp/hi.sh)} spids:[67]) (HereDoc op_id: Redir_DLess fd: -1 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: True spids: [70] ) ] ) (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:-1 arg_word:{(_tmp/no-newline.sh)} spids:[154])] ) (C {($ VSub_Name '$OSH')} {(_tmp/no-newline.sh)}) ] spids: [51] ) spids: [47 50] ) (FuncDef name: osh-stdin body: (BraceGroup children: [ (SimpleCommand words: [{($ VSub_Name '$OSH')}] redirects: [(Redir op_id:Redir_Less fd:-1 arg_word:{(_tmp/hi.sh)} spids:[177])] ) (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:-1 arg_word:{(_tmp/empty.sh)} spids:[197])] ) (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:-1 arg_word:{(_tmp/no-newline.sh)} spids:[220])] ) (SimpleCommand words: [{($ VSub_Name '$OSH')}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 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: True spids: [232] ) ] ) ] spids: [172] ) spids: [168 171] ) (FuncDef name: osh-interactive body: (BraceGroup children: [ (Pipeline children: [(C {(echo)} {(SQ <'echo hi'>)}) (C {($ VSub_Name '$OSH')} {(-i)})] negated: False ) (Pipeline children: [(C {(echo)} {(SQ <exit>)}) (C {($ VSub_Name '$OSH')} {(-i)})] negated: False ) ] spids: [270] ) spids: [266 269] ) (FuncDef name: die body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[311])] ) (C {(exit)} {(1)}) ] spids: [306] ) spids: [302 305] ) (FuncDef name: assert body: (BraceGroup children: [ (AndOr children: [ (C {(test)} {(DQ ($ VSub_At '$@'))}) (C {(die)} {(DQ ($ VSub_At '$@') (' failed'))}) ] op_id: Op_DPipe ) ] spids: [330] ) spids: [326 329] ) (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: [-1 436] ) ] spids: [-1 446] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ast_bin) op: Equal rhs: {(_tmp/smoke-ast.bin)} spids: [451] ) ] spids: [449] ) (SimpleCommand words: [{(bin/osh)} {(-n)} {(--ast-format)} {(oheap)} {(-c)} {(SQ <'echo hi'>)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name '$ast_bin')} spids: [470] ) ] ) (C {(ls)} {(-l)} {($ VSub_Name '$ast_bin')}) (C {(hexdump)} {(-C)} {($ VSub_Name '$ast_bin')}) ] spids: [355] ) spids: [351 354] ) (FuncDef name: help body: (BraceGroup children: [ (C {(set)} {(Lit_Other '+') (o)} {(errexit)}) (C {(bin/oil)} {(osh)} {(--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: [495] ) spids: [491 494] ) (FuncDef name: _error-case body: (BraceGroup children: [ (C {(echo)}) (C {(echo)} {(DQ ($ VSub_At '$@'))}) (C {(echo)}) (C {(bin/osh)} {(-c)} {(DQ ($ VSub_At '$@'))}) ] spids: [559] ) spids: [555 558] ) (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: [590] ) spids: [586 589] ) (C {(DQ ($ VSub_At '$@'))}) ] )