(CommandList children: [ (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (C {(set)} {(-o)} {(errexit)}) (FuncDef name: change-kind body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:kind) op: Equal rhs: {($ VSub_Number '$1')} spids: [78] ) ] spids: [76] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:kind2) op: Equal rhs: { (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name '$kind')} ) spids: [85 89] ) } spids: [84] ) ] spids: [82] ) (C {(sed)} {(-r)} {(-i)} { (DQ (s/) (${ VSub_Name kind) ('_([A-Z]+)/Id.') (${ VSub_Name kind2) (_) (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) (L) (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) (1/g) ) } {(Lit_Other '*') (/) (Lit_Other '*') (.py)} ) (C {(sed)} {(-r)} {(-i)} { (DQ (s/) (${ VSub_Name kind) ('_([a-zA-Z]+)/') (${ VSub_Name kind2) (_) (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) (u) (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) (1/g) ) } {(Lit_Other '*') (/) (Lit_Other '*') (.py)} ) ] spids: [73] ) spids: [69 72] ) (FuncDef name: k2 body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:kind) op: Equal rhs: {($ VSub_Number '$1')} spids: [169] ) ] spids: [167] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:lower) op: Equal rhs: { (BracedVarSub token: <VSub_Name kind> suffix_op: (StringUnary op_id:VOp1_DComma arg_word:{}) spids: [176 179] ) } spids: [175] ) ] spids: [173] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: { (BracedVarSub token: <VSub_Name lower> suffix_op: (StringUnary op_id:VOp1_Caret arg_word:{}) spids: [186 189] ) } spids: [185] ) ] spids: [183] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:replace) op: Equal rhs: { (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name '$title')} ) spids: [195 199] ) } spids: [194] ) ] spids: [192] ) (C {(sed)} {(-r)} {(-i)} {(DQ (s/Id.) (${ VSub_Name kind) (_/Id.) (${ VSub_Name replace) (_/g))} {(Lit_Other '*') (/) (Lit_Other '*') (.py)} ) (C {(sed)} {(-r)} {(-i)} {(DQ (s/TokenKind.) (${ VSub_Name kind) (/TokenKind.) (${ VSub_Name replace) (/g))} {(Lit_Other '*') (/) (Lit_Other '*') (.py)} ) ] spids: [164] ) spids: [160 163] ) (FuncDef name: replace body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:file) op: Equal rhs: {($ VSub_Number '$1')} spids: [262] ) ] spids: [260] ) (While cond: [(Sentence child:(C {(read)} {(pat)} {(replace)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (C {(sed)} {(-r)} {(-i)} {(DQ (s/) (${ VSub_Name pat) (/) (${ VSub_Name replace) (/g))} {(Lit_Other '*') (/) (Lit_Other '*') (.py)} ) ] spids: [280 307] ) redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {($ VSub_Name '$file')} spids: [309] ) ] ) ] spids: [257] ) spids: [253 256] ) (FuncDef name: trailing-ws body: (BraceGroup children: [(C {(sed)} {(-r)} {(-i)} {(SQ <'s/[ ]+$//g'>)} {(DQ ($ VSub_At '$@'))})] spids: [320] ) spids: [316 319] ) (C {(DQ ($ VSub_At '$@'))}) ] )