(command.CommandList children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} { (word_part.BracedVarSub token: <VSub_Name VARIABLES_LINKEDLIST_SH> suffix_op: (suffix_op.StringUnary op_id:VTest_Plus arg_word:{(true)}) ) } {(Lit_Other ']')} ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Assignment keyword: Assign_Declare flags: [-g] pairs: [(assign_pair lhs:(lhs_expr.LhsName name:VARIABLES_LINKEDLIST_SH) op:Equal rhs:{(true)})] ) (C {(.)} { (word_part.BracedVarSub token: <VSub_Name BASH_SOURCE> suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) ) (/common.sh) } ) (C {(.)} { (word_part.BracedVarSub token: <VSub_Name BASH_SOURCE> suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) ) (/logger.sh) } ) (C {(.)} { (word_part.BracedVarSub token: <VSub_Name BASH_SOURCE> suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) ) (/variables.sh) } ) (C {(.)} { (word_part.BracedVarSub token: <VSub_Name BASH_SOURCE> suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) ) (/variables.atom.sh) } ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (define)} {(LinkedList)} ) (command.FuncDef name: 'variable::LinkedList::new' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variable::LinkedList::new ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(LinkedList)} {(DQ (${ VSub_At '@'))}) ] ) ) (command.FuncDef name: 'variable::LinkedList::append' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variable::LinkedList::append ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:list_token) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:value_token) op: Equal rhs: {($ VSub_Number '$2')} ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOfOrExit) } {(DQ (${ VSub_Name list_token))} {(LinkedList)} ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:currToken) op: Equal rhs: {(DQ (${ VSub_Name list_token))} ) ] ) (command.Assignment keyword: Assign_Declare pairs: [(assign_pair lhs:(lhs_expr.LhsName name:node) op:Equal)] ) (command.Assignment keyword: Assign_Declare flags: [-a] pairs: [(assign_pair lhs:(lhs_expr.LhsName name:nodeArr) op:Equal)] ) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name currToken))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:node) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name node))} {(Lit_Other '=') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nodeArr) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ {(DQ (${ VSub_Name value_token))} {(DQ (${ VSub_Name RESULT))} ] ) } ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (set)} {(DQ (${ VSub_Name currToken))} {(LinkedList)} { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.WholeArray op_id:Arith_Star) ) ) } ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:RESULT) op:Equal rhs:{(DQ )})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nodeArr) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{($ VSub_DollarName '$node')}])} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } {(-ne)} {(2)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(stderr)} { (DQ ('Encountered node with single element at [') (${ VSub_Name currToken) (']=[') (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) (']') ) } ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:currToken) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) ) (C {(stderr)} {(DQ ('Should never get here'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ) (command.FuncDef name: 'variable::LinkedList::prepend' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variable::LinkedList::prepend ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:list_token) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:value_token) op: Equal rhs: {($ VSub_Number '$2')} ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOfOrExit) } {(DQ (${ VSub_Name list_token))} {(LinkedList)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name list_token))}) (command.Assignment keyword: Assign_Declare flags: [-a] pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:node) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{(${ VSub_Name RESULT)}])} ) ] ) (command.Assignment keyword: Assign_Declare flags: [-a] pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:node) op: Equal rhs: { (word_part.ArrayLiteralPart words: [{(DQ (${ VSub_Name value_token))} {(DQ (${ VSub_Name list_token))}] ) } ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new) } { (DQ (word_part.BracedVarSub token: <VSub_Name node> bracket_op: (bracket_op.WholeArray op_id:Arith_Star) ) ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:RESULT) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) ) (command.FuncDef name: 'variable::LinkedList::length' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variable::LinkedList::length ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:list_token) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOfOrExit) } {(DQ (${ VSub_Name list_token))} {(LinkedList)} ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:currToken) op: Equal rhs: {(DQ (${ VSub_Name list_token))} ) ] ) (command.Assignment keyword: Assign_Declare pairs: [(assign_pair lhs:(lhs_expr.LhsName name:node) op:Equal)] ) (command.Assignment keyword: Assign_Declare flags: [-a] pairs: [(assign_pair lhs:(lhs_expr.LhsName name:nodeArr) op:Equal)] ) (command.Assignment keyword: Assign_Declare flags: [-i] pairs: [(assign_pair lhs:(lhs_expr.LhsName name:count) op:Equal rhs:{(0)})] ) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name currToken))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:node) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name node))} {(Lit_Other '=') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:RESULT) op: Equal rhs: {(${ VSub_Name count)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nodeArr) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{($ VSub_DollarName '$node')}])} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } {(-ne)} {(2)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(stderr)} { (DQ ('Encountered node with single element at [') (${ VSub_Name currToken) (']=[') (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) (']') ) } ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:count) op:PlusEqual rhs:{(1)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:currToken) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) ) (C {(stderr)} {(DQ ('Should never get here'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ) (command.FuncDef name: 'variable::LinkedList::index' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variables_list::index ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:token) op: Equal rhs: {(DQ (${ VSub_Number 1))} ) ] ) (command.Assignment keyword: Assign_Declare flags: [-i] pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:index) op: Equal rhs: {(DQ (${ VSub_Number 2))} ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOfOrExit) } {(DQ (${ VSub_Name token))} {(LinkedList)} ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:currToken) op: Equal rhs: {(DQ (${ VSub_Name token))} ) ] ) (command.Assignment keyword: Assign_Declare pairs: [(assign_pair lhs:(lhs_expr.LhsName name:node) op:Equal)] ) (command.Assignment keyword: Assign_Declare flags: [-a] pairs: [(assign_pair lhs:(lhs_expr.LhsName name:nodeArr) op:Equal)] ) (command.Assignment keyword: Assign_Declare flags: [-i] pairs: [(assign_pair lhs:(lhs_expr.LhsName name:count) op:Equal rhs:{(0)})] ) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name currToken))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:node) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name node))} {(Lit_Other '=') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(stderr)} { (DQ ('Invalid index [') (${ VSub_Name index) ('] for list of length [') (${ VSub_Name count) (']') ) } ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nodeArr) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{($ VSub_DollarName '$node')}])} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } {(-ne)} {(2)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(stderr)} { (DQ ('Encountered node with single element at [') (${ VSub_Name currToken) (']=[') (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) (']') ) } ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$count')} {(-eq)} {($ VSub_DollarName '$index')} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:RESULT) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) ) } ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:count) op:PlusEqual rhs:{(1)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:currToken) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) ) (C {(stderr)} {(DQ ('Should never get here'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ) (command.FuncDef name: 'variable::LinkedList::first' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variable::LinkedList::first ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:token) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOfOrExit) } {(DQ (${ VSub_Name token))} {(LinkedList)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (index) } {(${ VSub_Name token)} {(0)} ) ] ) ) (command.FuncDef name: 'variable::LinkedList::rest' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variable::LinkedList::rest ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:token) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOfOrExit) } {(DQ (${ VSub_Name token))} {(LinkedList)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name token))}) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:node) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name node))} {(Lit_Other '=') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(stderr)} {(DQ ('Called [rest] on empty list'))}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) (command.Assignment keyword: Assign_Declare flags: [-a] pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nodeArr) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{($ VSub_DollarName '$RESULT')}])} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:RESULT) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) ) (command.FuncDef name: 'variable::LinkedList::isEmpty_c' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variable::LinkedList::isEmpty_c ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:token) op: Equal rhs: {(DQ (${ VSub_Number 1))} ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOfOrExit) } {(DQ (${ VSub_Name token))} {(LinkedList)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name token))}) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:node) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name node))} {(Lit_Other '=') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] ) ] else_action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] ) ] ) ) (command.FuncDef name: 'variable::LinkedList::toSexp' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name VARIABLES_DEBUG)} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(stderr)} {(DQ ('variable::LinkedList::toSexp ') (${ VSub_At '@'))}) terminator: <Op_Semi ';'> ) ] ) ] ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:token) op: Equal rhs: {(DQ (${ VSub_Number 1))} ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOfOrExit) } {(DQ (${ VSub_Name token))} {(LinkedList)} ) (command.Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:currToken) op: Equal rhs: {(DQ (${ VSub_Name token))} ) ] ) (command.Assignment keyword: Assign_Declare pairs: [(assign_pair lhs:(lhs_expr.LhsName name:node) op:Equal)] ) (command.Assignment keyword: Assign_Declare flags: [-a] pairs: [(assign_pair lhs:(lhs_expr.LhsName name:nodeArr) op:Equal)] ) (command.Assignment keyword: Assign_Declare flags: [-a] pairs: [(assign_pair lhs:(lhs_expr.LhsName name:output) op:Equal rhs:{(word_part.ArrayLiteralPart)})] ) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name currToken))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:node) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name node))} {(Lit_Other '=') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: { (word_part.BracedVarSub token: <VSub_Name output> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) } right: {(0)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:RESULT) op: Equal rhs: {(DQ ('()'))} ) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:RESULT) op: Equal rhs: { (DQ ('(') (word_part.BracedVarSub token: <VSub_Name output> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) (')') ) } ) ] ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nodeArr) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{($ VSub_DollarName '$node')}])} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } {(-ne)} {(2)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(stderr)} { (DQ ('Encountered node with single element at [') (${ VSub_Name currToken) (']=[') (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) (']') ) } ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (toSexp)} { (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:output) op: PlusEqual rhs: {(word_part.ArrayLiteralPart words:[{(DQ (${ VSub_Name RESULT))}])} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:currToken) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name nodeArr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) ) (command.Sentence child: (C {(stderr)} {(DQ ('should never get here'))}) terminator: <Op_Semi ';'> ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_Number '$0')} {(KW_Bang '!') (Lit_Other '=')} {($ VSub_DollarName '$BASH_SOURCE')} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(command.ControlFlow token:<ControlFlow_Return return>)] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(String)} {(DQ (A))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:var_A) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(String)} {(DQ (B))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:var_B) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(String)} {(DQ (C))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:var_C) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (new)} {(String)} {(DQ (D))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:var_D) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new) } ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:vCode) op:Equal rhs:{(${ VSub_Name RESULT)})] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {($ VSub_DollarName '$vCode')} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(0)} {(DQ (${ VSub_Name RESULT))} {(DQ ('length empty list'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (prepend) } {(${ VSub_Name vCode)} {(${ VSub_Name var_A)} ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:vCode_1) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {(${ VSub_Name vCode_1)} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(1)} {(DQ (${ VSub_Name RESULT))} {(DQ ('length after adding 1'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {(${ VSub_Name vCode)} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(0)} {(DQ (${ VSub_Name RESULT))} {(DQ ('length after adding 1 - original list'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (prepend) } {(${ VSub_Name vCode_1)} {(${ VSub_Name var_B)} ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:vCode_2) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {(${ VSub_Name vCode_2)} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(2)} {(DQ (${ VSub_Name RESULT))} {(DQ ('length after adding 2'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {(${ VSub_Name vCode_1)} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(1)} {(DQ (${ VSub_Name RESULT))} {(DQ ('length after adding 2 - middle list'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {(${ VSub_Name vCode)} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(0)} {(DQ (${ VSub_Name RESULT))} {(DQ ('length after adding 1 - original list'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new) } ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:vCode) op:Equal rhs:{(${ VSub_Name RESULT)})] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (prepend) } {(${ VSub_Name vCode)} {(${ VSub_Name var_A)} ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:vCode) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (prepend) } {(${ VSub_Name vCode)} {(${ VSub_Name var_B)} ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:vCode) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {($ VSub_DollarName '$vCode')} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(2)} {(DQ (${ VSub_Name RESULT))} {(DQ ('prepend length 2'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (index) } {($ VSub_DollarName '$vCode')} {(0)} ) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name RESULT))}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ (B))} {(DQ (${ VSub_Name RESULT))} {(DQ ('first item of prepend list'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (index) } {($ VSub_DollarName '$vCode')} {(1)} ) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name RESULT))}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ (A))} {(DQ (${ VSub_Name RESULT))} {(DQ ('second item of prepend list'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new) } ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:vCode) op:Equal rhs:{(${ VSub_Name RESULT)})] ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {(${ VSub_Name vCode)} {(${ VSub_Name var_A)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {(${ VSub_Name vCode)} {(${ VSub_Name var_B)} ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {($ VSub_DollarName '$vCode')} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(2)} {(DQ (${ VSub_Name RESULT))} {(DQ ('append length 2'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (index) } {($ VSub_DollarName '$vCode')} {(0)} ) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name RESULT))}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ (A))} {(DQ (${ VSub_Name RESULT))} {(DQ ('first item of append list'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (index) } {($ VSub_DollarName '$vCode')} {(1)} ) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (value)} {(DQ (${ VSub_Name RESULT))}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ (B))} {(DQ (${ VSub_Name RESULT))} {(DQ ('second item of append list'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new) } ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:vCode) op:Equal rhs:{(${ VSub_Name RESULT)})] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ignore) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (index) } {($ VSub_DollarName '$vCode')} {(0)} ) ] ) left_token: <Left_DollarParen '$('> ) } ) ] ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(1)} {($ VSub_QMark '$?')} {(DQ ('exit code length of empty list'))} ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new) } ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:vCode) op:Equal rhs:{(${ VSub_Name RESULT)})] ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (type)} {($ VSub_DollarName '$vCode')}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(LinkedList)} {(DQ ($ VSub_DollarName '$RESULT'))} {(DQ ('List type'))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (type) (Lit_Other ':') (Lit_Other ':') (instanceOf) } {($ VSub_DollarName '$vCode')} {(LinkedList)} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(0)} {($ VSub_QMark '$?')} {(DQ (instanceOf))} ) ] ) (command.CommandList children: [ (command.Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new) } ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:vCode) op:Equal rhs:{(${ VSub_Name RESULT)})] ) ] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (isEmpty_c)} {(${ VSub_Name vCode)} ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(0)} {($ VSub_QMark '$?')} {(DQ ('Return code true (0)'))} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {(${ VSub_Name vCode)} {(${ VSub_Name var_A)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (isEmpty_c)} {(${ VSub_Name vCode)} ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(1)} {($ VSub_QMark '$?')} {(DQ ('Return code false (1)'))} ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (report)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} { (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id:VTest_Plus arg_word:{(isset)}) ) } {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=') (Lit_Other '=')} {(DQ (debug))} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [(C {(variable) (Lit_Other ':') (Lit_Other ':') (printMetadata)})] ) ] ) ] )