(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BALLS_LIB) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4) command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:9) command_list: (command.CommandList children: [(C {(dirname)} {($ Id.VSub_Number '$0')})] ) ) (/../lib) } ) ] ) ) } spids: [3] ) ] ) (C {(shopt)} {(-s)} {(extglob)}) (C {(.)} {($ Id.VSub_DollarName '$BALLS_LIB') (/balls.sh)}) (command.ShFunction name: dash_trim_r body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'str=') (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:44) prefix_op: (Id.VSub_Bang) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:str) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:str span_id:52) suffix_op: (suffix_op.Unary op_id:Id.VOp1_DPercent arg_word:{('*( )')}) ) ) } spids: [49] ) ] ) (C {(export)} {(DQ ($ Id.VSub_Number '$1')) (Id.Lit_Equals '=') (DQ ($ Id.VSub_DollarName '$str'))} ) ] ) ) (command.ShFunction name: compile body: (command.BraceGroup children: [ (C {(local)} {(code)}) (C {(local)} {(chunk)}) (C {(local)} {(Id.Lit_VarLike 'trim_next=') (0)}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:95) cond: [ (command.Sentence child: (C {(read_until)} {(SQ (Token id:Id.Lit_Chars val:'<%' span_id:100))} {(chunk)}) terminator: (Token id:Id.Op_Semi val:';' span_id:104) ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$FOUND'))} {(Id.Lit_Equals '=')} {(1)} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:122) ) ] action: [ (C {(read_until)} {(SQ (Token id:Id.Lit_Chars val:'%>' span_id:130))} {(code)} ) (C {(trim)} {(code)}) (command.Case to_match: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:code span_id:146) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) } arms: [ (case_arm pat_list: [{(Id.Lit_Equals '=')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:code) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:code span_id:164) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w: {(Id.Lit_Digits 1)} ) ) ) ) } spids: [161] ) ] ) (C {(trim)} {(code)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:code) op: assign_op.Equal rhs: {(DQ ('echo -n ') ($ Id.VSub_DollarName '$code'))} spids: [176] ) ] ) ] spids: [157 158 183 -1] ) (case_arm pat_list: [{(-)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:code) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:code span_id:193) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w: {(Id.Lit_Digits 1)} ) ) ) ) } spids: [190] ) ] ) (C {(dash_trim_r)} {(chunk)}) (C {(trim)} {(code)}) ] spids: [186 187 210 -1] ) ] ) (command.Case to_match: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:code span_id:221) suffix_op: (suffix_op.Slice begin: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id: Id.VSub_Name val: code span_id: 225 ) prefix_op: (Id.VSub_Pound) ) } ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) ) } arms: [ (case_arm pat_list: [{(-)}] action: [ (C {(read)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:code) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:code span_id:249) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w: {(Id.Lit_Digits 0)} ) length: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id: Id.VSub_Name val: code span_id: 255 ) prefix_op: (Id.VSub_Pound) ) } ) right: (arith_expr.ArithWord w: {(Id.Lit_Digits 1)} ) ) ) ) ) } spids: [246] ) ] ) (C {(trim)} {(code)}) ] spids: [235 236 268 -1] ) ] ) ] spids: [109 124] ) ] ) (C {(bash_safe)} {(chunk)}) (C {(echo)} {(DQ ('echo -n ') ($ Id.VSub_DollarName '$chunk'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$FOUND'))} {(Id.Lit_Equals '=')} {(1)} {(Id.Lit_RBracket ']')} ) (C {(echo)} {(DQ ($ Id.VSub_DollarName '$code'))}) ] ) ] ) ) (C {(true)}) ] ) ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [333] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:335) ) (C {(shift)}) ] ) (C {(export)} {(Id.Lit_VarLike 'eof=') (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:344) command_list: (command.CommandList children: [(C {(echo)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'\\004' span_id:350))})] ) ) ) } ) (command.Pipeline children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-n)} {(DQ ($ Id.VSub_DollarName '$fname'))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:367) ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(cat)} {($ Id.VSub_DollarName '$fname')}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:378) arg_word: {(1)} ) ] ) ] spids: [356 369] ) ] else_action: [(C {(cat)} {(-)})] ) (C {(compile)}) ] negated: F ) ] )