(CommandList children: [ (FuncDef name: k_bool_parse body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:value) op:Equal spids:[55])] spids: [53] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:default) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(EmptyPart)}) spids: [62 65] ) ) } spids: [60] ) ] spids: [58] ) (If arms: [ (if_arm cond: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:value) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(k_bool_parse_error)} {(DQ ($ VSub_Number '$1'))}) ] ) left_token: <Left_CommandSub '$('> spids: [73 79] ) ) } spids: [71] ) ] spids: [71] ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(DQ (${ VSub_Name value))})] spids: [16777215 83] ) ] else_action: [ (C {(echo)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(k_bool_parse)} {(DQ (${ VSub_Name default))} {(false)})] ) left_token: <Left_CommandSub '$('> spids: [101 111] ) ) } ) ] spids: [95 115] ) ] spids: [50] ) spids: [46 49] ) (FuncDef name: k_bool_parse_error body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:value) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [165] ) ] spids: [163] ) (Case to_match: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(k_string_lower)} {(DQ (${ VSub_Name value))})] ) left_token: <Left_CommandSub '$('> spids: [174 182] ) ) } arms: [ (case_arm pat_list: [{(on)} {(true)} {(yes)} {(y)} {(1)}] action: [(C {(echo)} {(true)})] spids: [188 197 205 16777215] ) (case_arm pat_list: [{(off)} {(false)} {(no)} {(n)} {(0)}] action: [(C {(echo)} {(false)})] spids: [209 218 226 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [230 231 239 16777215] ) ] spids: [171 185 243] ) ] spids: [160] ) spids: [156 159] ) (FuncDef name: k_bool_test body: (BraceGroup children: [ (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(k_bool_parse)} {(DQ ($ VSub_At '$@'))})] ) left_token: <Left_CommandSub '$('> spids: [300 306] ) ) } {(Lit_Other '=')} {(true)} {(Lit_Other ']')} ) ] spids: [294] ) spids: [290 293] ) (FuncDef name: k_bool_valid body: (BraceGroup children: [ (SimpleCommand words: [{(k_bool_parse_error)} {(DQ ($ VSub_Number '$1'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[355])] ) ] spids: [346] ) spids: [342 345] ) ] )