(command.CommandList children: [ (command.FuncDef name: source_bad_syntax body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(_tmp/bad-syntax.sh)} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 46 stdin_parts: [('if foo; echo ls; fi\n')] ) ] ) (C {(.)} {(_tmp/bad-syntax.sh)}) ] spids: [33] ) spids: [29 32] ) (command.FuncDef name: eval_bad_syntax body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:code spids:[79]) op: Equal rhs: {(SQ <'if foo; echo ls; fi'>)} spids: [79] ) ] spids: [77] ) (C {(eval)} {(DQ ('echo --\n') (' ') ($ VSub_DollarName '$code'))}) ] spids: [74] ) spids: [70 73] ) (command.FuncDef name: no_such_command body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)}) (C {(ZZZZZ)}) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [110] ) spids: [106 109] ) (command.FuncDef name: no_such_command_commandsub body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)}) (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(ZZZZZ)})]) left_token: <Left_CommandSub '$('> spids: [149 151] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [137] ) spids: [133 136] ) (command.FuncDef name: no_such_command_heredoc body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 202 stdin_parts: [ ('one\n') (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(ZZZZZ)})]) left_token: <Left_CommandSub '$('> spids: [196 198] ) ('\n') ('three\n') ] ) ] ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [167] ) spids: [163 166] ) (command.FuncDef name: failed_command body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)}) (C {(false)}) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [217] ) spids: [213 216] ) (command.FuncDef name: pipefail body: (command.BraceGroup children: [ (command.Pipeline children:[(C {(false)}) (C {(wc)} {(-l)})] negated:F) (C {(set)} {(-o)} {(errexit)}) (C {(set)} {(-o)} {(pipefail)}) (command.Pipeline children:[(C {(false)}) (C {(wc)} {(-l)})] negated:F) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [244] ) spids: [240 243] ) (command.FuncDef name: pipefail_func body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.FuncDef name: f body: (command.BraceGroup children: [ (C {(cat)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(42)} ) ] spids: [312] ) spids: [308 311] ) (command.Pipeline children: [(C {(echo)} {(hi)}) (C {(f)}) (C {(wc)})] negated: F ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [294] ) spids: [290 293] ) (command.FuncDef name: pipefail_group body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.Pipeline children: [ (C {(echo)} {(hi)}) (command.BraceGroup children: [ (command.Sentence child:(C {(cat)}) terminator:<Op_Semi ';'>) (command.Sentence child: (C {(sh)} {(-c)} {(SQ <'exit 42'>)}) terminator: <Op_Semi ';'> ) ] spids: [387] ) (C {(wc)}) ] negated: F ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [367] ) spids: [363 366] ) (command.FuncDef name: pipefail_subshell body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.Pipeline children: [ (C {(echo)} {(hi)}) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {(cat)}) terminator: <Op_Semi ';'> ) (C {(sh)} {(-c)} {(SQ <'exit 42'>)}) ] ) spids: [445 456] ) (C {(wc)}) ] negated: F ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [425] ) spids: [421 424] ) (command.FuncDef name: pipefail_while body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.Pipeline children: [ (C {(seq)} {(3)}) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (C {(read)} {(line)}) (C {(echo)} {(X)} {($ VSub_DollarName '$line')} {(X)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ VSub_DollarName '$line'))} {(Lit_Other '=')} {(2)} ) terminator: <Op_Semi ';'> ) ] action: [(C {(sh)} {(-c)} {(SQ <'exit 42'>)})] spids: [16777215 535] ) ] spids: [16777215 547] ) ] spids: [505 550] ) ) (C {(wc)}) ] negated: F ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [480] ) spids: [476 479] ) (command.FuncDef name: pipefail_multiple body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.Pipeline children: [ (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {(SQ <four>)}) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(sh)} {(-c)} {(SQ <'exit 4'>)}) terminator: <Op_Semi ';'> ) ] spids: [588] ) (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {(SQ <five>)}) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(sh)} {(-c)} {(SQ <'exit 5'>)}) terminator: <Op_Semi ';'> ) ] spids: [611] ) (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {(SQ <six>)}) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(sh)} {(-c)} {(SQ <'exit 6'>)}) terminator: <Op_Semi ';'> ) ] spids: [634] ) ] negated: F ) ] spids: [574] ) spids: [570 573] ) (command.FuncDef name: control_flow body: (command.BraceGroup children: [ (command.ControlFlow token:<ControlFlow_Break break>) (command.ControlFlow token:<ControlFlow_Continue continue>) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [664] ) spids: [660 663] ) (command.FuncDef name: nounset body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(nounset)}) (C {(echo)} {($ VSub_DollarName '$x')}) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [697] ) spids: [693 696] ) (command.FuncDef name: nounset_arith body: (command.BraceGroup children: [ (C {(set)} {(-o)} {(nounset)}) (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithVarRef token:<Lit_ArithVarLike x>) spids: [748 753] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [736] ) spids: [732 735] ) (command.FuncDef name: divzero body: (command.BraceGroup children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Slash left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) spids: [775 784] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [770] ) spids: [766 769] ) (command.FuncDef name: divzero_var body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:zero spids:[806]) op: Equal rhs: {(0)} spids: [806] ) ] spids: [804] ) (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Slash left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike zero>) ) spids: [812 821] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [801] ) spids: [797 800] ) (command.FuncDef name: string_to_int_arith body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:x spids:[846]) op: Equal rhs: {(SQ <ZZZ>)} spids: [846] ) ] spids: [844] ) (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike x>) right: (arith_expr.ArithWord w:{(Lit_Digits 5)}) ) spids: [854 863] ) } ) (C {(set)} {(-o)} {(strict-arith)}) (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike x>) right: (arith_expr.ArithWord w:{(Lit_Digits 5)}) ) spids: [877 886] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [841] ) spids: [837 840] ) (command.FuncDef name: string_to_hex body: (command.BraceGroup children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 0) (Lit_ArithVarLike xGG)}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) spids: [911 921] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [906] ) spids: [902 905] ) (command.FuncDef name: string_to_octal body: (command.BraceGroup children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 018)}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) spids: [946 955] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [941] ) spids: [937 940] ) (command.FuncDef name: string_to_intbase body: (command.BraceGroup children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithWord w: {(Lit_Digits 16) (Lit_Pound '#') (Lit_ArithVarLike GG)} ) spids: [980 987] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [975] ) spids: [971 974] ) (command.FuncDef name: string_to_int_bool body: (command.BraceGroup children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id:BoolBinary_eq left:{(a)} right:{(0)}) ) (C {(set)} {(-o)} {(strict-arith)}) (command.DBracket expr: (bool_expr.BoolBinary op_id:BoolBinary_eq left:{(a)} right:{(0)}) ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [1017] ) spids: [1013 1016] ) (command.FuncDef name: _run_test body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:t spids:[1079]) op: Equal rhs: {($ VSub_Number '$1')} spids: [1079] ) ] spids: [1077] ) (C {(echo)} {(DQ (--------))}) (C {(echo)} {(DQ (' CASE: ') ($ VSub_DollarName '$t'))}) (command.Subshell child:(C {($ VSub_DollarName '$t')}) spids:[1103 1107]) (C {(echo)} {(DQ (' STATUS: ') ($ VSub_QMark '$?'))}) (C {(echo)}) ] spids: [1074] ) spids: [1070 1073] ) (command.FuncDef name: all body: (command.BraceGroup children: [ (C {(_run_test)} {(control_flow)}) (command.ForEach iter_name: t iter_words: [ {(no_such_command)} {(no_such_command_commandsub)} {(no_such_command_heredoc)} {(failed_command)} {(pipefail)} {(pipefail_group)} {(pipefail_subshell)} {(pipefail_func)} {(pipefail_while)} {(nonexistent)} {(nounset)} {(nounset_arith)} {(divzero)} {(divzero_var)} {(string_to_int_arith)} {(string_to_hex)} {(string_to_octal)} {(string_to_intbase)} {(string_to_int_bool)} ] do_arg_iter: F body: (command.DoGroup children: [(C {(_run_test)} {($ VSub_DollarName '$t')})] spids: [1200 1209] ) spids: [1146 1198] ) ] spids: [1127] ) spids: [1123 1126] ) (C {(DQ ($ VSub_At '$@'))}) ] )