(command.CommandList children: [ (command.ShFunction name: source_bad_syntax body: (command.BraceGroup children: [ (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:38) fd: -1 arg_word: {(_tmp/bad-syntax.sh)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:41) fd: -1 here_begin: {(EOF)} here_end_span_id: 46 stdin_parts: [('if foo; echo ls; fi\n')] ) ] ) (C {(.)} {(_tmp/bad-syntax.sh)}) ] ) ) (command.ShFunction name: eval_bad_syntax body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'code=') (SQ (Token id:Id.Lit_Chars val:'if foo; echo ls; fi' span_id:81)) } ) (C {(eval)} {(DQ ('echo --\n') (' ') ($ Id.VSub_DollarName '$code'))}) ] ) ) (command.ShFunction name: no_such_command body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)}) (C {(ZZZZZ)}) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:127))}) ] ) ) (command.ShFunction name: no_such_command_commandsub body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)}) (C {(echo)} { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:149) command_list: (command.CommandList children:[(C {(ZZZZZ)})]) ) } ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:157))}) ] ) ) (command.ShFunction name: no_such_command_heredoc body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)}) (command.Simple words: [{(cat)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:192) fd: -1 here_begin: {(EOF)} here_end_span_id: 202 stdin_parts: [ ('one\n') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:196) command_list: (command.CommandList children:[(C {(ZZZZZ)})]) ) ('\n') ('three\n') ] ) ] ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:207))}) ] ) ) (command.ShFunction name: failed_command body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)}) (C {(false)}) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:234))}) ] ) ) (command.ShFunction name: pipefail body: (command.BraceGroup children: [ (command.Pipeline children:[(C {(false)}) (C {(wc)} {(-l)})] negated:F) (C {(Id.KW_Set set)} {(-o)} {(errexit)}) (C {(Id.KW_Set set)} {(-o)} {(pipefail)}) (command.Pipeline children:[(C {(false)}) (C {(wc)} {(-l)})] negated:F) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:284))}) ] ) ) (command.ShFunction name: pipefail_func body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.ShFunction name: f body: (command.BraceGroup children: [ (C {(cat)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:326) arg_word: {(42)} ) ] ) ) (command.Pipeline children: [(C {(echo)} {(hi)}) (C {(f)}) (C {(wc)})] negated: F ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:351))}) ] ) ) (command.ShFunction name: pipefail_group body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.Pipeline children: [ (C {(echo)} {(hi)}) (command.BraceGroup children: [ (command.Sentence child: (C {(cat)}) terminator: (Token id:Id.Op_Semi val:';' span_id:390) ) (command.Sentence child: (C {(sh)} {(-c)} {(SQ (Token id:Id.Lit_Chars val:'exit 42' span_id:397))}) terminator: (Token id:Id.Op_Semi val:';' span_id:399) ) ] ) (C {(wc)}) ] negated: F ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:412))}) ] ) ) (command.ShFunction name: pipefail_subshell body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.Pipeline children: [ (C {(echo)} {(hi)}) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(cat)}) terminator: (Token id:Id.Op_Semi val:';' span_id:447) ) (C {(sh)} {(-c)} {(SQ (Token id:Id.Lit_Chars val:'exit 42' span_id:454))}) ] ) ) (C {(wc)}) ] negated: F ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:467))}) ] ) ) (command.ShFunction name: pipefail_while body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.Pipeline children: [ (C {(seq)} {(3)}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:500) cond: [ (command.Sentence child: (C {(true)}) terminator: (Token id:Id.Op_Semi val:';' span_id:503) ) ] body: (command.DoGroup children: [ (C {(read)} {(line)}) (C {(echo)} {(X)} {($ Id.VSub_DollarName '$line')} {(X)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ Id.VSub_DollarName '$line'))} {(Id.Lit_Equals '=')} {(2)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:533) ) ] action: [ (C {(sh)} {(-c)} {(SQ (Token id:Id.Lit_Chars val:'exit 42' span_id:543))}) ] spids: [522 535] ) ] ) ] ) ) (C {(wc)}) ] negated: F ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:561))}) ] ) ) (command.ShFunction name: pipefail_multiple body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (command.Pipeline children: [ (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:four span_id:593))}) terminator: (Token id:Id.Op_Semi val:';' span_id:595) ) (command.Sentence child: (C {(sh)} {(-c)} {(SQ (Token id:Id.Lit_Chars val:'exit 4' span_id:602))}) terminator: (Token id:Id.Op_Semi val:';' span_id:604) ) ] ) (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:five span_id:616))}) terminator: (Token id:Id.Op_Semi val:';' span_id:618) ) (command.Sentence child: (C {(sh)} {(-c)} {(SQ (Token id:Id.Lit_Chars val:'exit 5' span_id:625))}) terminator: (Token id:Id.Op_Semi val:';' span_id:627) ) ] ) (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:six span_id:639))}) terminator: (Token id:Id.Op_Semi val:';' span_id:641) ) (command.Sentence child: (C {(sh)} {(-c)} {(SQ (Token id:Id.Lit_Chars val:'exit 6' span_id:648))}) terminator: (Token id:Id.Op_Semi val:';' span_id:650) ) ] ) ] negated: F ) ] ) ) (command.ShFunction name: control_flow body: (command.BraceGroup children: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:667) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Continue val:continue span_id:670) ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:677))}) ] ) ) (command.ShFunction name: nounset body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(nounset)}) (C {(echo)} {($ Id.VSub_DollarName '$x')}) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:716))}) ] ) ) (command.ShFunction name: nounset_arith body: (command.BraceGroup children: [ (C {(Id.KW_Set set)} {(-o)} {(nounset)}) (C {(echo)} { (word_part.ArithSub anode: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:x span_id:750)) ) } ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:760))}) ] ) ) (command.ShFunction name: divzero body: (command.BraceGroup children: [ (C {(echo)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Slash left: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) } ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:791))}) ] ) ) (command.ShFunction name: divzero_var body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'zero=') (0)}) (C {(echo)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Slash left: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) right: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:zero span_id:818) ) ) ) } ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:828))}) ] ) ) (command.ShFunction name: string_to_int_arith body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'x=') (SQ (Token id:Id.Lit_Chars val:ZZZ span_id:848))}) (C {(echo)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:x span_id:856)) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 5)}) ) ) } ) (C {(Id.KW_Set set)} {(-o)} {(strict-arith)}) (C {(echo)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:x span_id:879)) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 5)}) ) ) } ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:893))}) ] ) ) (command.ShFunction name: string_to_hex body: (command.BraceGroup children: [ (C {(echo)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{(Id.Lit_Digits 0) (Id.Lit_ArithVarLike xGG)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:928))}) ] ) ) (command.ShFunction name: string_to_octal body: (command.BraceGroup children: [ (C {(echo)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{(Id.Lit_Digits 018)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:962))}) ] ) ) (command.ShFunction name: string_to_intbase body: (command.BraceGroup children: [ (C {(echo)} { (word_part.ArithSub anode: (arith_expr.ArithWord w: {(Id.Lit_Digits 16) (Id.Lit_Pound '#') (Id.Lit_ArithVarLike GG)} ) ) } ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:994))}) ] ) ) (command.ShFunction name: string_to_int_bool body: (command.BraceGroup children: [ (command.DBracket expr: (bool_expr.Binary op_id:Id.BoolBinary_eq left:{(a)} right:{(0)}) ) (C {(Id.KW_Set set)} {(-o)} {(strict-arith)}) (command.DBracket expr: (bool_expr.Binary op_id:Id.BoolBinary_eq left:{(a)} right:{(0)}) ) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'SHOULD NOT GET HERE' span_id:1054))}) ] ) ) (command.ShFunction name: _run_test body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 't=') ($ Id.VSub_Number '$1')}) (C {(echo)} {(DQ (--------))}) (C {(echo)} {(DQ (' CASE: ') ($ Id.VSub_DollarName '$t'))}) (command.Subshell command_list: (command.CommandList children:[(C {($ Id.VSub_DollarName '$t')})]) ) (C {(echo)} {(DQ (' STATUS: ') ($ Id.VSub_QMark '$?'))}) (C {(echo)}) ] ) ) (command.ShFunction 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)} {($ Id.VSub_DollarName '$t')})]) ) ] ) ) (C {(DQ ($ Id.VSub_At '$@'))}) ] )