(command.CommandList children: [ (C {<Id.KW_Set set>} {<-o>} {<nounset>}) (C {<Id.KW_Set set>} {<-o>} {<pipefail>}) (C {<Id.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: <Id.Op_Semi _> ) ] action: [(C {<die>} {(DQ <'Should have failed'>)})] spids: [111 128] ) ] ) (C {<local>} {<Id.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: <Id.Redir_Great '>'> fd: -1 arg_word: {($ Id.VSub_DollarName '$ast_bin')} ) ] ) (C {<ls>} {<-l>} {($ Id.VSub_DollarName '$ast_bin')}) (C {<hexdump>} {<-C>} {($ Id.VSub_DollarName '$ast_bin')}) ] ) ) (command.ShFunction name: osh-file body: (command.BraceGroup children: [ (C {<echo>} {<Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> } {<Hello>} ) (command.Simple words: [{<cat>}] redirects: [ (redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<_tmp/hi.sh>}) (redir.HereDoc op: <Id.Redir_DLess '<<'> fd: -1 here_begin: {<EOF>} here_end_span_id: 242 stdin_parts: [ <'\n'> <'echo hi\n'> <'echo bye\n'> <'\n'> <'func() {\n'> <' echo '> <Id.Right_DoubleQuote '"'> <'inside func'> <Id.Right_DoubleQuote '"'> <'\n'> <'}\n'> <'func 1 2 3\n'> <'\n'> <"# TODO: Test vars don't persist.\n"> <'(echo '> <Id.Right_DoubleQuote '"'> <'in subshell'> <Id.Right_DoubleQuote '"'> <'; echo '> <Id.Right_DoubleQuote '"'> <another> <Id.Right_DoubleQuote '"'> <')\n'> <'\n'> <'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'(echo ComSub)\n'> <'\n'> ] ) ] ) (C {($ Id.VSub_DollarName '$OSH')} {<_tmp/hi.sh>}) (C {<echo>} {<Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> } {<EMPTY>} ) (C {<touch>} {<_tmp/empty.sh>}) (C {($ Id.VSub_DollarName '$OSH')} {<_tmp/empty.sh>}) (C {<echo>} {<Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> } {<NO>} {<TRAILING>} {<NEWLINE>} ) (command.Simple words: [{<echo>} {<-n>} {(SQ <'echo hi'>)}] redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<_tmp/no-newline.sh>})] ) (C {($ Id.VSub_DollarName '$OSH')} {<_tmp/no-newline.sh>}) ] ) ) (command.ShFunction name: osh-stdin body: (command.BraceGroup children: [ (command.Simple words: [{($ Id.VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<_tmp/hi.sh>})] ) (C {<echo>} {<Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> } {<EMPTY>} ) (command.Simple words: [{($ Id.VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<_tmp/empty.sh>})] ) (C {<echo>} {<Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> <Id.Lit_Equals '='> } {<NO>} {<TRAILING>} {<NEWLINE>} ) (command.Simple words: [{($ Id.VSub_DollarName '$OSH')}] redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<_tmp/no-newline.sh>})] ) (command.Simple words: [{($ Id.VSub_DollarName '$OSH')}] redirects: [ (redir.HereDoc op: <Id.Redir_DLess '<<'> fd: -1 here_begin: {<EOF>} here_end_span_id: 403 stdin_parts: [ <'echo '> <Id.Right_DoubleQuote '"'> <'\n'> <'hi\n'> <Id.Right_DoubleQuote '"'> <'\n'> <'echo '> (word_part.EscapedLiteral token:<Id.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:<Id.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 {($ Id.VSub_DollarName '$OSH')} {<-i>})] negated: F ) (command.Pipeline children: [(C {<echo>} {(SQ <exit>)}) (C {($ Id.VSub_DollarName '$OSH')} {<-i>})] negated: F ) ] ) ) (command.ShFunction name: help body: (command.BraceGroup children: [ (C {<Id.KW_Set set>} {<Id.Lit_Other '+'> <o>} {<errexit>}) (C {<bin/oil.py>} {<--help>}) (C {<assert>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>}) (C {<bin/oil.py>} {<osh>} {<--help>}) (C {<assert>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>}) (C {<bin/oil.py>} {<oil>} {<--help>}) (C {<assert>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>}) (C {<bin/osh>} {<--help>}) (C {<assert>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>}) (C {<bin/oil>} {<--help>}) (C {<assert>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>}) ] ) ) (command.ShFunction name: _error-case body: (command.BraceGroup children: [ (C {<echo>}) (C {<echo>} {(DQ ($ Id.VSub_At '$@'))}) (C {<echo>}) (C {<bin/osh>} {<-c>} {(DQ ($ Id.VSub_At '$@'))}) ] ) ) (command.ShFunction name: parse-errors body: (command.BraceGroup children: [ (C {<Id.KW_Set set>} {<Id.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 {<Id.KW_Set set>} {<Id.Lit_Other '+'> <o>} {<errexit>}) (command.Pipeline children: [(C {<echo>} {(SQ <'echo one; exit 42; echo two'>)}) (C {<bin/osh>} {<-i>})] negated: F ) (C {<assert>} {($ Id.VSub_QMark '$?')} {<-eq>} {<42>}) ] ) ) (C {<readonly>} {<-a>} {<Id.Lit_VarLike 'PASSING='> (sh_array_literal left: <Id.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: <Id.VSub_Name PASSING> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ) ] ) ) (C {(DQ ($ Id.VSub_At '$@'))}) ] )