(command.CommandList children: [ (C {<set>} {<-o>} {<nounset>}) (C {<set>} {<-o>} {<pipefail>}) (C {<set>} {<-o>} {<errexit>}) (C {<source>} {<'test/common.sh'>}) (command.ShFunction 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'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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 op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$ast_bin')} ) ] do_fork: T ) (C {<ls>} {<-l>} {($ Id.VSub_DollarName '$ast_bin')}) (C {<hexdump>} {<-C>} {($ Id.VSub_DollarName '$ast_bin')}) ] ) ) (command.ShFunction name: osh-file body: (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 op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'_tmp/hi.sh'>} ) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'> ] ) ) ] do_fork: T ) (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 op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'_tmp/no-newline.sh'>} ) ] do_fork: T ) (C {($ Id.VSub_DollarName '$OSH')} {<'_tmp/no-newline.sh'>}) ] ) ) (command.ShFunction name: osh-stdin body: (BraceGroup children: [ (command.Simple words: [{($ Id.VSub_DollarName '$OSH')}] redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'_tmp/hi.sh'>})] do_fork: T ) (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 op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {<'_tmp/empty.sh'>} ) ] do_fork: T ) (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 op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {<'_tmp/no-newline.sh'>} ) ] do_fork: T ) (command.Simple words: [{($ Id.VSub_DollarName '$OSH')}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'> ] ) ) ] do_fork: T ) ] ) ) (command.ShFunction name: osh-interactive body: (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: (BraceGroup children: [ (C {<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: (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: (BraceGroup children: [ (C {<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: (BraceGroup children: [ (C {<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: (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 '$@'))}) ] )