(command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (braced_var_sub token: <Id.VSub_Name VARIABLES_STACK_SH> suffix_op: (suffix_op.Unary op_id:Id.VTest_Plus arg_word:{<isset>}) ) } {<Id.Lit_RBracket ']'>} ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (C {<declare>} {<-g>} {<Id.Lit_VarLike 'VARIABLES_STACK_SH='> <true>}) (C {<.>} { (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<Id.Lit_Slash /> <'*'>}) ) </common.sh> } ) (C {<.>} { (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<Id.Lit_Slash /> <'*'>}) ) </logger.sh> } ) (C {<.>} { (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<Id.Lit_Slash /> <'*'>}) ) </variables.sh> } ) (C {<.>} { (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<Id.Lit_Slash /> <'*'>}) ) </variables.atom.sh> } ) (C {<.>} { (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<Id.Lit_Slash /> <'*'>}) ) </variables.arraylist.sh> } ) (C {<.>} { (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<Id.Lit_Slash /> <'*'>}) ) </variables.queue.sh> } ) (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <type> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <define> } {<ArrayStack>} {<ArrayList>} ) (command.ShFunction name: 'variable::ArrayStack::new' body: (command.BraceGroup children: [ (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <new>} {<ArrayStack>} {(DQ (${ Id.VSub_At '@'))} ) ] ) ) (command.ShFunction name: 'variable::ArrayStack::push' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name VARIABLES_DEBUG)} right: {<1>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Sentence child: (C {<stderr>} {(DQ <'variable::ArrayStack::push '> (${ Id.VSub_At '@'))}) terminator: <Id.Op_Semi _> ) ] spids: [181 196] ) ] ) (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayList> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <prepend> } {(DQ (${ Id.VSub_At '@'))} ) ] ) ) (command.ShFunction name: 'variable::ArrayStack::pop' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name VARIABLES_DEBUG)} right: {<1>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Sentence child: (C {<stderr>} {(DQ <'variable::ArrayStack::pop '> (${ Id.VSub_At '@'))}) terminator: <Id.Op_Semi _> ) ] spids: [253 268] ) ] ) (C {<declare>} {<Id.Lit_VarLike 'token='> (DQ (${ Id.VSub_Number 1))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <type> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <instanceOf> } {(DQ (${ Id.VSub_Name token))} {<ArrayStack>} ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <type>} {(DQ (${ Id.VSub_Name token))} ) (C {<stderr>} { (DQ <'Variable ['> (${ Id.VSub_Name token) <'] is not of type ArrayStack (actual type ['> (${ Id.VSub_Name RESULT) <'])'> ) } ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [295 317] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayList> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <isEmpty_c> } {(DQ (${ Id.VSub_Name token))} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<stderr>} {(DQ <'Cannot pop from an empty stack'>)}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [356 374] ) ] ) (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <peek> } {(DQ (${ Id.VSub_Name token))} ) terminator: <Id.Op_Semi _> ) (C {<declare>} {<Id.Lit_VarLike 'result='> ($ Id.VSub_DollarName '$RESULT')}) (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <type>} {($ Id.VSub_DollarName '$token')} ) terminator: <Id.Op_Semi _> ) (C {<declare>} {<Id.Lit_VarLike 'type='> ($ Id.VSub_DollarName '$RESULT')}) (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayList> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <rest> } {($ Id.VSub_DollarName '$token')} ) terminator: <Id.Op_Semi _> ) (C {<declare>} {<Id.Lit_VarLike 'value='> ($ Id.VSub_DollarName '$RESULT')}) (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <Id.KW_Set set>} {(DQ ($ Id.VSub_DollarName '$token'))} {(DQ ($ Id.VSub_DollarName '$type'))} {(DQ ($ Id.VSub_DollarName '$value'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RESULT) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name result))} spids: [466] ) ] ) ] ) ) (command.ShFunction name: 'variable::ArrayStack::peek' body: (command.BraceGroup children: [ (C {<declare>} {<Id.Lit_VarLike 'token='> (DQ (${ Id.VSub_Number 1))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <type> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <instanceOf> } {(DQ (${ Id.VSub_Name token))} {<ArrayStack>} ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <type>} {(DQ (${ Id.VSub_Name token))} ) (C {<stderr>} { (DQ <'Variable ['> (${ Id.VSub_Name token) <'] is not of type ArrayStack (actual type ['> (${ Id.VSub_Name RESULT) <'])'> ) } ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [511 533] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayList> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <isEmpty_c> } {($ Id.VSub_DollarName '$token')} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<stderr>} {(DQ <'Cannot peek from an empty stack'>)}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [572 586] ) ] ) (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayList> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <first> } {($ Id.VSub_DollarName '$token')} ) terminator: <Id.Op_Semi _> ) (C {<declare>} {<Id.Lit_VarLike 'result='> ($ Id.VSub_DollarName '$RESULT')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RESULT) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name result))} spids: [622] ) ] ) ] ) ) (command.ShFunction name: '_variable::ArrayStack::peek_p' body: (command.BraceGroup children: [ (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <peek> } {(DQ (${ Id.VSub_At '@'))} ) (C {<echo>} {(DQ ($ Id.VSub_DollarName '$RESULT'))}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Number '$0')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {($ Id.VSub_DollarName '$BASH_SOURCE')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)] spids: [673 687] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <new> } ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:vCode) op: assign_op.Equal rhs: {(${ Id.VSub_Name RESULT)} spids: [715] ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <new>} {<String>} {(DQ <first>)}) terminator: <Id.Op_Semi _> ) (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <push> } {(${ Id.VSub_Name vCode)} {(${ Id.VSub_Name RESULT)} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <new>} {<String>} {(DQ <second>)}) terminator: <Id.Op_Semi _> ) (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <push> } {(${ Id.VSub_Name vCode)} {(${ Id.VSub_Name RESULT)} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <new>} {<String>} {(DQ <third>)}) terminator: <Id.Op_Semi _> ) (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <push> } {(${ Id.VSub_Name vCode)} {(${ Id.VSub_Name RESULT)} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <peek> } {($ Id.VSub_DollarName '$vCode')} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <value>} {(DQ (${ Id.VSub_Name RESULT))} ) terminator: <Id.Op_Semi _> ) (C {<assert> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <equals>} {(DQ <third>)} {(DQ ($ Id.VSub_DollarName '$RESULT'))} {(DQ <'stack::peek first'>)} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <pop> } {($ Id.VSub_DollarName '$vCode')} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <value>} {(DQ (${ Id.VSub_Name RESULT))} ) terminator: <Id.Op_Semi _> ) (C {<assert> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <equals>} {(DQ <third>)} {(DQ ($ Id.VSub_DollarName '$RESULT'))} {(DQ <'stack::pop first'>)} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <peek> } {($ Id.VSub_DollarName '$vCode')} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <value>} {(DQ (${ Id.VSub_Name RESULT))} ) terminator: <Id.Op_Semi _> ) (C {<assert> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <equals>} {(DQ <second>)} {(DQ ($ Id.VSub_DollarName '$RESULT'))} {(DQ <'stack::peek second'>)} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <ArrayStack> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <pop> } {($ Id.VSub_DollarName '$vCode')} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <value>} {(DQ (${ Id.VSub_Name RESULT))} ) terminator: <Id.Op_Semi _> ) (C {<assert> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <equals>} {(DQ <second>)} {(DQ (${ Id.VSub_Name RESULT))} {(DQ <'queue::dequeue second'>)} ) ] ) (C {<assert> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <report>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Unary op_id:Id.VTest_Plus arg_word:{<isset>}) ) } {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {(DQ <debug>)} {<Id.Lit_RBracket ']'>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [(C {<variable> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <printMetadata>})] spids: [992 1022] ) ] ) ] )