(CommandList children: [ (FuncDef name: get body: (BraceGroup children:[(C {(route)} {(DQ (GET))} {($ VSub_At '$@')})] spids:[6]) spids: [1 5] ) (FuncDef name: post body: (BraceGroup children:[(C {(route)} {(DQ (POST))} {($ VSub_At '$@')})] spids:[25]) spids: [20 24] ) (FuncDef name: delete body: (BraceGroup children:[(C {(route)} {(DQ (DELETE))} {($ VSub_At '$@')})] spids:[44]) spids: [39 43] ) (FuncDef name: status body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:martin_response_status) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [66] ) ] spids: [66] ) ] spids: [63] ) spids: [58 62] ) (FuncDef name: header body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:martin_response_headers) op: Equal rhs: { (DQ ($ VSub_Name '$martin_response_headers') ($ VSub_Number '$1') (': ') ($ VSub_Number '$2') ($ VSub_Name '$LF') ) } spids: [82] ) ] spids: [82] ) ] spids: [79] ) spids: [74 78] ) (FuncDef name: not_found body: (BraceGroup children: [ (C {(status)} {(DQ (404))}) (C {(header)} {(DQ (Content-type))} {(DQ (text/plain))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(DQ ($ VSub_At '$@'))})] spids: [-1 133] ) ] else_action: [(C {(echo)} {(DQ ('Not Found: ') ($ VSub_Name '$PATH_INFO'))})] spids: [143 154] ) ] spids: [99] ) spids: [94 98] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LF) op: Equal rhs: {(SQ <Lit_EscapedChar '\\n'>)} spids: [159] ) ] spids: [159] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:martin_routes) op:Equal rhs:{(DQ )} spids:[168])] spids: [168] ) (FuncDef name: route body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:martin_routes) op: Equal rhs: { (DQ ($ VSub_Name '$martin_routes') ($ VSub_Number '$1') (',') ($ VSub_Number '$2') (',') ($ VSub_Number '$3') ($ VSub_Name '$LF') ) } spids: [181] ) ] spids: [181] ) ] spids: [178] ) spids: [173 177] ) (FuncDef name: martin_find_route body: (BraceGroup children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$martin_routes'))}) (While cond: [ (Sentence child: (SimpleCommand words: [{(read)} {(-r)} {(method)} {(path)} {(action)}] more_env: [(env_pair name:IFS val:{(DQ (','))} spids:[213])] ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ ($ VSub_Name '$method'))} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ ($ VSub_Name '$path'))} {(Lit_Other ']')} ) ] op_id: Op_DAmp ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {($ VSub_Name '$action')}) (ControlFlow token: <ControlFlow_Return return> ) ] spids: [-1 265] ) ] spids: [-1 276] ) ] spids: [229 279] ) ) ] negated: False ) ] spids: [200] ) spids: [195 199] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:martin_response_headers) op: Equal rhs: {(DQ )} spids: [284] ) ] spids: [284] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:martin_response_status) op: Equal rhs: {(DQ )} spids: [288] ) ] spids: [288] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:martin_response_file) op: Equal rhs: {(DQ ($ VSub_Name '$TMPDIR') (/martin_response) ($ VSub_Dollar '$$'))} spids: [292] ) ] spids: [292] ) (FuncDef name: martin_reset_response body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:martin_response_status) op: Equal rhs: {(DQ ('200 OK'))} spids: [308] ) ] spids: [308] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:martin_response_headers) op: Equal rhs: {(DQ )} spids: [314] ) ] spids: [314] ) ] spids: [305] ) spids: [300 304] ) (FuncDef name: martin_dispatch body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:action) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(martin_find_route)} {(DQ ($ VSub_Name '$REQUEST_METHOD'))} {(DQ ($ VSub_Name '$PATH_INFO'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [333 343] ) ) } spids: [331] ) ] spids: [329] ) (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$action'))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:action) op: Equal rhs: {(DQ (not_found))} spids: [360] ) ] spids: [360] ) ] op_id: Op_DAmp ) (C {(martin_reset_response)}) (SimpleCommand words: [{(DQ ($ VSub_Name '$action'))}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name '$martin_response_file'))} spids: [379] ) ] ) (C {(header)} {(DQ (Status))} {(DQ ($ VSub_Name '$martin_response_status'))}) (C {(header)} {(DQ (Content-Length))} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(wc)} {(-c)} {(DQ ($ VSub_Name '$martin_response_file'))}) (C {(awk)} {(SQ <'{ print $1 }'>)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [409 425] ) ) } ) (C {(echo)} {(DQ ($ VSub_Name '$martin_response_headers'))}) (C {(cat)} {(DQ ($ VSub_Name '$martin_response_file'))}) ] spids: [326] ) spids: [321 325] ) (FuncDef name: martin body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$REQUEST_METHOD')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(martin_dispatch)})] spids: [-1 467] ) ] else_action: [ (C {(.)} {(./wwwoosh.sh)}) (C {(wwwoosh)} {(martin_dispatch)} {($ VSub_Name '$PORT')}) ] spids: [477 496] ) ] spids: [455] ) spids: [450 454] ) ] )