(command.CommandList children: [ (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (C {(set)} {(-o)} {(errexit)}) (C {(source)} {(test/common.sh)}) (command.FuncDef name: ast body: (command.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'>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(bin/osh)} {(-n)} {(--ast-format)} {(oheap)} {(-c)} {(SQ <'echo hi'>)}) terminator: <Op_Semi ';'> ) ] action: [(C {(die)} {(DQ ('Should have failed'))})] ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ast_bin) op: Equal rhs: {(_tmp/smoke-ast.bin)} ) ] ) (command.SimpleCommand words: [{(bin/osh)} {(-n)} {(--ast-format)} {(oheap)} {(-c)} {(SQ <'echo hi'>)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$ast_bin')} ) ] ) (C {(ls)} {(-l)} {($ VSub_DollarName '$ast_bin')}) (C {(hexdump)} {(-C)} {($ VSub_DollarName '$ast_bin')}) ] ) ) (command.FuncDef name: osh-file body: (command.BraceGroup children: [ (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(Hello)} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(_tmp/hi.sh)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 242 stdin_parts: [ ('\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 ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('(echo ComSub)\n') ('\n') ] ) ] ) (C {($ VSub_DollarName '$OSH')} {(_tmp/hi.sh)}) (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(EMPTY)} ) (C {(touch)} {(_tmp/empty.sh)}) (C {($ VSub_DollarName '$OSH')} {(_tmp/empty.sh)}) (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(NO)} {(TRAILING)} {(NEWLINE)} ) (command.SimpleCommand words: [{(echo)} {(-n)} {(SQ <'echo hi'>)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(_tmp/no-newline.sh)} ) ] ) (C {($ VSub_DollarName '$OSH')} {(_tmp/no-newline.sh)}) ] ) ) (command.FuncDef name: osh-stdin body: (command.BraceGroup children: [ (command.SimpleCommand words: [{($ VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(_tmp/hi.sh)})] ) (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(EMPTY)} ) (command.SimpleCommand words: [{($ VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(_tmp/empty.sh)})] ) (C {(echo)} {(Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=') (Lit_Other '=')} {(NO)} {(TRAILING)} {(NEWLINE)} ) (command.SimpleCommand words: [{($ VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(_tmp/no-newline.sh)})] ) (command.SimpleCommand words: [{($ VSub_DollarName '$OSH')}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 403 stdin_parts: [ ('echo ') (Right_DoubleQuote '"') ('\n') ('hi\n') (Right_DoubleQuote '"') ('\n') ('echo ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('\n') ('line continuation; echo two\n') ('\n') ('cat <<EOF_INNER\n') ('here doc\n') ('EOF_INNER\n') ('\n') ('echo ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('(\n') ('echo command sub\n') (')\n') ('\n') ('func() {\n') (' echo hi\n') ('}\n') ('\n') ] ) ] ) ] ) ) (command.FuncDef name: osh-interactive body: (command.BraceGroup children: [ (command.Pipeline children: [(C {(echo)} {(SQ <'echo hi'>)}) (C {($ VSub_DollarName '$OSH')} {(-i)})] negated: F ) (command.Pipeline children: [(C {(echo)} {(SQ <exit>)}) (C {($ VSub_DollarName '$OSH')} {(-i)})] negated: F ) ] ) ) (command.FuncDef name: help body: (command.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)}) ] ) ) (command.FuncDef name: _error-case body: (command.BraceGroup children: [ (C {(echo)}) (C {(echo)} {(DQ ($ VSub_At '$@'))}) (C {(echo)}) (C {(bin/osh)} {(-c)} {(DQ ($ VSub_At '$@'))}) ] ) ) (command.FuncDef name: parse-errors body: (command.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 > >> )'>)}) ] ) ) (command.FuncDef name: exit-builtin-interactive body: (command.BraceGroup children: [ (C {(set)} {(Lit_Other '+') (o)} {(errexit)}) (command.Pipeline children: [(C {(echo)} {(SQ <'echo one; exit 42; echo two'>)}) (C {(bin/osh)} {(-i)})] negated: F ) (C {(assert)} {($ VSub_QMark '$?')} {(-eq)} {(42)}) ] ) ) (command.Assignment keyword: Assign_Readonly flags: [-a] pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PASSING) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ {(ast)} {(osh-file)} {(osh-stdin)} {(osh-interactive)} {(exit-builtin-interactive)} {(help)} ] ) } ) ] ) (command.FuncDef name: all-passing body: (command.BraceGroup children: [ (C {(run-all)} { (DQ (word_part.BracedVarSub token: <VSub_Name PASSING> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } ) ] ) ) (C {(DQ ($ VSub_At '$@'))}) ] )