(command.CommandList children: [ (C {(KW_Set set)} {(-o)} {(nounset)}) (C {(KW_Set set)} {(-o)} {(pipefail)}) (C {(KW_Set set)} {(-o)} {(errexit)}) (C {(source)} {(test/common.sh)}) (command.ShFunction 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'))})] ) ] ) (C {(local)} {(Lit_VarLike 'ast_bin=') (_tmp/smoke-ast.bin)}) (command.Simple 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.ShFunction name: osh-file body: (command.BraceGroup children: [ (C {(echo)} {(Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=')} {(Hello)} ) (command.Simple 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.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('(echo ComSub)\n') ('\n') ] ) ] ) (C {($ VSub_DollarName '$OSH')} {(_tmp/hi.sh)}) (C {(echo)} {(Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=')} {(EMPTY)} ) (C {(touch)} {(_tmp/empty.sh)}) (C {($ VSub_DollarName '$OSH')} {(_tmp/empty.sh)}) (C {(echo)} {(Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=')} {(NO)} {(TRAILING)} {(NEWLINE)} ) (command.Simple 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.ShFunction name: osh-stdin body: (command.BraceGroup children: [ (command.Simple words: [{($ VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(_tmp/hi.sh)})] ) (C {(echo)} {(Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=')} {(EMPTY)} ) (command.Simple words: [{($ VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(_tmp/empty.sh)})] ) (C {(echo)} {(Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=') (Lit_Equals '=')} {(NO)} {(TRAILING)} {(NEWLINE)} ) (command.Simple words: [{($ VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(_tmp/no-newline.sh)})] ) (command.Simple 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.EscapedLiteral token:<Lit_EscapedChar '\\\\'>) ('\n') ('line continuation; echo two\n') ('\n') ('cat <<EOF_INNER\n') ('here doc\n') ('EOF_INNER\n') ('\n') ('echo ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('(\n') ('echo command sub\n') (')\n') ('\n') ('func() {\n') (' echo hi\n') ('}\n') ('\n') ] ) ] ) ] ) ) (command.ShFunction 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.ShFunction name: help body: (command.BraceGroup children: [ (C {(KW_Set 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.ShFunction name: _error-case body: (command.BraceGroup children: [ (C {(echo)}) (C {(echo)} {(DQ ($ VSub_At '$@'))}) (C {(echo)}) (C {(bin/osh)} {(-c)} {(DQ ($ VSub_At '$@'))}) ] ) ) (command.ShFunction name: parse-errors body: (command.BraceGroup children: [ (C {(KW_Set 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.ShFunction name: exit-builtin-interactive body: (command.BraceGroup children: [ (C {(KW_Set 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)}) ] ) ) (C {(readonly)} {(-a)} {(Lit_VarLike 'PASSING=') (sh_array_literal left: <Op_LParen '('> words: [ {(ast)} {(osh-file)} {(osh-stdin)} {(osh-interactive)} {(exit-builtin-interactive)} {(help)} ] ) } ) (command.ShFunction name: all-passing body: (command.BraceGroup children: [ (C {(run-all)} { (DQ (braced_var_sub token: <VSub_Name PASSING> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } ) ] ) ) (C {(DQ ($ VSub_At '$@'))}) ] )