(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: 16777215 arg_word: {(_tmp/hi.sh)} spids: [67] ) (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: [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: 16777215 arg_word: {(_tmp/no-newline.sh)} spids: [155] ) ] ) (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:16777215 arg_word:{(_tmp/hi.sh)} spids:[178])] ) (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:[198])] ) (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: [221] ) ] ) (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: [233] ) ] ) ] spids: [173] ) spids: [169 172] ) (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: [272] ) spids: [268 271] ) (FuncDef name: die body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[313])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [308] ) spids: [304 307] ) (FuncDef name: assert body: (BraceGroup children: [ (AndOr ops: [Op_DPipe] children: [ (C {(test)} {(DQ ($ VSub_At '$@'))}) (C {(die)} {(DQ ($ VSub_At '$@') (' failed'))}) ] ) ] spids: [332] ) spids: [328 331] ) (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 438] ) ] spids: [16777215 448] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ast_bin) op: Equal rhs: {(_tmp/smoke-ast.bin)} spids: [453] ) ] spids: [451] ) (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: [472] ) ] ) (C {(ls)} {(-l)} {($ VSub_Name '$ast_bin')}) (C {(hexdump)} {(-C)} {($ VSub_Name '$ast_bin')}) ] spids: [357] ) spids: [353 356] ) (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: [497] ) spids: [493 496] ) (FuncDef name: _error-case body: (BraceGroup children: [ (C {(echo)}) (C {(echo)} {(DQ ($ VSub_At '$@'))}) (C {(echo)}) (C {(bin/osh)} {(-c)} {(DQ ($ VSub_At '$@'))}) ] spids: [561] ) spids: [557 560] ) (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: [592] ) spids: [588 591] ) (C {(DQ ($ VSub_At '$@'))}) ] )