(command.CommandList children: [ (C {<.>} {<../src/shflags>}) (C {<DEFINE_boolean>} {(SQ <debug>)} {<false>} {(SQ <'enable debug mode'>)} {(SQ <d>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FLAGS_HELP) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Simple words: [{<cat>}] redirects: [ (redir.HereDoc op: <Id.Redir_DLess '<<'> fd: -1 here_begin: {<EOF>} here_end_span_id: 81 stdin_parts: [ <'commands:\n'> <' speak: say something\n'> <' sing: sing something\n'> ] ) ] ) ] ) ) } spids: [64] ) ] ) (command.ShFunction name: debug body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name FLAGS_debug)} {<-eq>} {(${ Id.VSub_Name FLAGS_TRUE)} {<Id.Lit_RBracket ']'>} ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.Simple words: [{<echo>} {(DQ <'DEBUG: '> ($ Id.VSub_At '$@'))}] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})] ) ] ) ) (command.ShFunction name: die body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}) (command.Simple words: [{<echo>} {(DQ <'error: '> ($ Id.VSub_At '$@'))}] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})] ) ] ) (C {<flags_help>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<FLAGS>} {(DQ ($ Id.VSub_At '$@'))}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) (C {<eval>} {<Id.KW_Set set>} {<-->} {(DQ (${ Id.VSub_Name FLAGS_ARGV))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [194] ) ] ) (command.Case to_match: {(${ Id.VSub_Name command)} arms: [ (case_arm pat_list:[{(SQ )}] action:[(C {<die>})] spids:[206 208 212 -1]) (case_arm pat_list: [{<speak>}] action: [ (C {<debug>} {(DQ <"I'm getting ready to say something...">)}) (C {<echo>} {(SQ <'The answer to the question "What is the meaning of life?" is "42".'>)}) ] spids: [216 217 234 -1] ) (case_arm pat_list: [{<sing>}] action: [ (C {<debug>} {(DQ <"I'm getting ready to sing something...">)}) (C {<echo>} {(SQ <'I love to sing! La diddy da dum!'>)}) ] spids: [238 239 256 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<die>} {(DQ <'unrecognized command ('> (${ Id.VSub_Name command) <')'>)})] spids: [260 261 273 -1] ) ] ) ] )