....(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:empty) op:Equal rhs:{(ArrayLiteralPart)} spids:[0])] spids: [0] ) ] ) (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:array) op: Equal rhs: {(ArrayLiteralPart words:[{(a)} {(b)} {(c)}])} spids: [0] ) ] spids: [0] ) ] ) Line 2 of '' ls array=(a b c) ^~~~~~ Commands can't contain array literals Line 2 of '' array=(a b c) ls ^ Environment bindings can't contain array literals (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:array) op: Equal rhs: {(ArrayLiteralPart words:[{(a)} {(b)} {(c)}])} spids: [0] ) ] spids: [0] ) terminator: ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:array2) op: Equal rhs: {(ArrayLiteralPart words:[{(d)} {(e)} {(f)}])} spids: [10] ) ] spids: [10] ) ] ) (C {(ls)} {(foo)}) (Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (AndOr ops:[Op_DPipe] children:[(C {(ls)} {(foo)}) (C {(die)})]) (AndOr ops: [Op_DPipe] children: [(Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(die)})] ) (CommandList children:[(Case to_match:{(foo)} spids:[0 4 6])]) (CommandList children: [ (Case to_match: {(word)} arms: [ (case_arm pat_list: [{(foo)} {(foo2)} {(foo3)}] action: [(C {(echo)} {(hi)})] spids: [7 12 18 16777215] ) ] spids: [0 4 20] ) ] ) (CommandList children: [ (Case to_match: {(word)} arms: [(case_arm pat_list:[{(foo)}] action:[(C {(echo)} {(one-line)})] spids:[6 7 13 16777215])] spids: [0 4 15] ) ] ) (CommandList children: [ (Case to_match: {(word)} arms: [ (case_arm pat_list:[{(foo)}] action:[(C {(echo)} {(foo)})] spids:[7 8 14 16777215]) (case_arm pat_list:[{(bar)}] action:[(C {(echo)} {(bar)})] spids:[17 18 24 16777215]) ] spids: [0 4 26] ) ] ) (CommandList children: [ (Case to_match: {(word)} arms: [ (case_arm pat_list:[{(foo)}] action:[(C {(echo)} {(foo)})] spids:[7 8 14 16777215]) (case_arm pat_list: [{(bar)}] action: [(Sentence child:(C {(echo)} {(bar)}) terminator:)] spids: [20 21 16777215 29] ) ] spids: [0 4 29] ) ] ) (CommandList children: [ (Case to_match: {(word)} arms: [ (case_arm pat_list:[{(foo)}] action:[(C {(echo)} {(foo)})] spids:[7 8 14 16777215]) (case_arm pat_list:[{(bar)}] action:[(C {(echo)} {(bar)})] spids:[20 21 16777215 27]) ] spids: [0 4 27] ) ] ) (SimpleCommand words: [ (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:ls span_id:0))]) (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:foo span_id:2))]) ] ) (FuncDef name: func body: (BraceGroup children: [ (Sentence child: (SimpleCommand words: [ (CompoundWord parts: [(LiteralPart token:(token id:Lit_Chars val:echo span_id:6))] ) (CompoundWord parts: [(LiteralPart token:(token id:Lit_Chars val:hi span_id:8))] ) ] ) terminator: (token id:Op_Semi val:';' span_id:9) ) ] spids: [4] ) spids: [0 3] ) (CommandList children: [ (SimpleCommand words: [{(ls)} {(foo)}] redirects: [(Redir op:'> fd:2 arg_word:{(/dev/null)})] ....... ) ] ) (CommandList children:[(Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F)]) (CommandList children: [ (AndOr ops: [Op_DPipe] children: [(Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(die)})] ) ] ) (CommandList children: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [(Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(die)})] ) terminator: ) (C {(ls)} {(/)}) ] ) (CommandList children:[(C {(ls)} {(foo)})]) (CommandList children: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [(Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(die)})] ) terminator: ) (C {(ls)} {(/)}) ] ) (CommandList children: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [ (Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(echo)} {(fail)}) ] ) terminator: ) (AndOr ops: [Op_DPipe] children: [ (Pipeline children:[(C {(echo)} {(bar)}) (C {(wc)} {(-c)})] negated:F) (C {(echo)} {(f2)}) ] ) ] ) (C {(echo)} { (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(12)})]) left_token: spids: [2 6] ) (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(34)})]) left_token: spids: [7 11] ) } ) (C {(echo)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(12)})]) left_token: spids: [3 7] ) (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(34)})]) left_token: spids: [8 12] ) ) } ) (CommandList children: [(DBracket expr:(BoolBinary op_id:BoolBinary_gt left:{($ VSub_Pound '$#')} right:{(1)}))] ) (CommandList children: [ (DBracket expr: (LogicalAnd left: (BoolBinary op_id:BoolBinary_gt left:{($ VSub_Pound '$#')} right:{(1)}) right: (WordTest w:{(foo)}) ) ) ] ) (CommandList children: [ (If arms: [ (if_arm cond: [(DBracket expr:(BoolBinary op_id:BoolBinary_gt left:{($ VSub_Pound '$#')} right:{(1)}))] action: [(C {(echo)} {(hi)})] spids: [16777215 12] ) ] spids: [16777215 19] ) ] ) (CommandList children: [(DBracket expr:(BoolBinary op_id:BoolBinary_EqualTilde left:{(foo)} right:{(foo)}))] ) (CommandList children: [ (DBracket expr: (BoolBinary op_id:BoolBinary_EqualTilde left:{(foo)} right:{('(') (foo) ('|') (bar) (')')}) ) ] ) (CommandList children: [ (DParen child: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 1)}) right: (ArithWord w:{(Lit_Digits 2)}) ) spids: [0 9] ) ] ) (CommandList children: [ (ForEach iter_name: i iter_words: [{(1)} {(2)} {(3)}] do_arg_iter: F body: (DoGroup children:[(C {(echo)} {($ VSub_Name '$i')})] spids:[13 20]) spids: [5 11] ) ] ) (CommandList children: [ (ForEach iter_name: i do_arg_iter: F body: (DoGroup children:[(C {(echo)} {($ VSub_Name '$i')})] spids:[8 15]) spids: [5 6] ) ] ) (CommandList children: [ (ForEach iter_name: i do_arg_iter: T body: (DoGroup children: [(Sentence child:(C {(echo)} {($ VSub_Name '$i')}) terminator:)] spids: [5 12] ) spids: [16777215 16777215] ) ] ) (CommandList children: [ (ForEach iter_name: i do_arg_iter: T body: (DoGroup children:[(C {(echo)} {($ VSub_Name '$i')})] spids:[4 11]) spids: [16777215 16777215] ) ] ) (Command..List children: [ (ForExpr init: (BinaryAssign op_id:Arith_Equal left:(LhsName name:i) right:(ArithWord w:{(Lit_Digits 0)})) cond: (ArithBinary op_id: Arith_Less left: (ArithVarRef name:i) right: (ArithWord w:{(Lit_Digits 5)}) ) update: (UnaryAssign op_id:Arith_DPlus child:(LhsName name:i)) body: (DoGroup children:[(C {(echo)} {($ VSub_Name '$i')})] spids:[19 26]) ) ] ) (CommandList children: [ (ForExpr init: (BinaryAssign op_id:Arith_Equal left:(LhsName name:i) right:(ArithWord w:{(Lit_Digits 0)})) cond: (ArithBinary op_id: Arith_Less left: (ArithVarRef name:i) right: (ArithWord w:{(Lit_Digits 5)}) ) update: (UnaryAssign op_id:Arith_DPlus child:(LhsName name:i)) body: (DoGroup children:[(C {(echo)} {($ VSub_Name '$i')})] spids:[18 25]) ) ] ) (CommandList children: [(ForExpr body:(DoGroup children:[(C {(echo)} {($ VSub_Name '$i')})] spids:[9 16]))] ) (CommandList children: [ (FuncDef name: foo body: (BraceGroup children: [(Sentence child:(C {(echo)} {(hi)}) terminator:)] spids: [4] ) spids: [0 3] ) ] ) (CommandList children: [(FuncDef name:foo body:(Subshell child:(C {(echo)} {(hi)}) spids:[4 10]) spids:[0 3])] ) (CommandList children: [ (FuncDef name: foo body: (ForEach iter_name: i iter_words: [{(x)}] do_arg_iter: F body: (DoGroup children: [(Sentence child:(C {(echo)} {($ VSub_Name '$i')}) terminator:)] spids: [13 20] ) spids: [9 11] ) spids: [0 3] ) ] ) (CommandList children: [ (FuncDef name: foo body: (BraceGroup children: [(Sentence child:(C {(echo)} {(hi)}) terminator:)] spids: [4] ) spids: [0 3] ) ] ) (CommandList children: [ (FuncDef name: foo body: (BraceGroup children: [(Sentence child:(C {(echo)} {(hi)}) terminator:)] spids: [7] ) spids: [0 6] ) ] ) (CommandList children: [(FuncDef name:foo body:(Subshell child:(C {(echo)} {(hi)}) spids:[6 12]) spids:[0 5])] ) (CommandList children: [ (FuncDef name: foo body: (ForEach iter_name: i iter_words: [{(x)}] do_arg_iter: F body: (DoGroup children: [(Sentence child:(C {(echo)} {($ VSub_Name '$i')}) terminator:)] spids: [15 22] ) spids: [11 13] ) spids: [0 5] ) ] ) (CommandList children: [ (FuncDef name: foo body: (ForEach iter_name: i iter_words: [{(x)}] do_arg_iter: F body: (DoGroup children: [(Sentence child:(C {(echo)} {($ VSub_Name '$i')}) terminator:)] spids: [13 20] ) spids: [9 11] ) spids: [0 3] ) ] ) (CommandList children: [ (FuncDef name: foo body: (BraceGroup children: [(Sentence child:(C {(echo)} {(hi)}) terminator:)] spids: [4] ) redirects: [ (Redir op:&'> fd:1 arg_word:{(2)}) (Redir op:'> fd:2 arg_word:{(/dev/null)}) ] spids: [0 3] ) ] ) (CommandList children: [ (If arms: [ (if_arm cond: [(Sentence child:(C {(true)}) terminator:)] action: [(Sentence child:(C {(echo)} {(yes)}) terminator:)] spids: [16777215 5] ) ] spids: [16777215 12] ) ] ) (CommandList children: [ (If arms: [ (if_arm cond: [(Sentence child:(Subshell child:(C {(true)}) spids:[2 4]) terminator:)] action: [(Sentence .........Error compiling regex: Un-matched parenthesis group operators. ..child:(C {(echo)} {(yes)}) terminator:)] spids: [16777215 7] ) ] spids: [16777215 14] ) ] ) (CommandList children:[(C {(ifFOO)})]) (C {(ls)} {(foo)}) (Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (Pipeline children:[(C {(echo)} {(foo)}) (C {(grep)} {(foo)})] negated:T) (Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)}) (C {(less)})] negated:F) Line 2 of '' ls foo| ^ Unexpected EOF while parsing command (CommandList children: [(Pipeline children:[(C {(ls)}) (C {(cat)}) (C {(cat)})] negated:F stderr_indices:[1])] ) (CommandList children: [(Pipeline children:[(C {(ls)}) (C {(cat)}) (C {(cat)})] negated:F stderr_indices:[0])] ) (CommandList children: [(Pipeline children:[(C {(ls)}) (C {(cat)}) (C {(cat)})] negated:F stderr_indices:[0 1])] ) (CommandList children: [ (C {(ls)} {(TildeSubPart token:)} {(TildeSubPart token:)} {(TildeSubPart token:) (/src)} {(TildeSubPart token:) (/src/foo)} {(TildeSubPart token:) (/src)} {(Lit_TildeLike '~weird') (KW_Bang '!') (name/blah) (KW_Bang '!') (blah)} ) ] ) (CommandList children: [ (Until cond: [(Sentence child:(C {(false)}) terminator:)] body: (DoGroup children: [(C {(echo)} {(hi)}) (ControlFlow token:)] spids: [5 15] ) ) ] ) (CommandList children: [ (While cond: [(Sentence child:(C {(true)}) terminator:)] body: (DoGroup children: [(C {(echo)} {(hi)}) (ControlFlow token:)] spids: [5 15] ) ) ] ) (CommandList children: [ (While cond: [(C {(true)})] body: (DoGroup children: [(C {(echo)} {(hi)}) (ControlFlow token:)] spids: [7 26] ) ) ] ) Line 2 of '' (( 1 + )) ^ Token can't be used in prefix position Line 2 of '' A= (1 2) ^ Expected ( after =, got ' ' Line 2 of '' [[ foo bar ]] ^~~ Expected ]] Line 2 of '' [[ foo -eq ]] ^ Expected ]] Line 2 of '' [[ foo$(echo <) -eq foo ]] ^ Invalid token after redirect operator Line 2 of '' [[ foo =~ \( ]] ^~ Invalid regex: '(' Line 2 of '' ls < ^ Invalid token after redirect operator Line 2 of '' ls < < ^ Invalid token after redirect operator Line 2 of '' echo foo$(ls <)bar ^ Invalid token after redirect operator Line 2 of '' BAD_ENV=(1 2 3) ls ^ Environment bindings can't contain array literals Line 2 of '' ls BAD_ENV=(1 2 3) ^~~~~~~~ Commands can't contain array literals Line 2 of '' ENV1=A ENV2=B local foo=bar ^ Assignments shouldn't have environment bindings Line 2 of '' for ((i=1; i<)); do echo $i; done ^ Token can't be used in prefix position Line 2 of '' for ((i=1; i<5; ++i)) OOPS echo $i; ERR ^~~~ Invalid word after for expression Line 2 of '' for ((i=1; i<5; ++i)); OOPS echo $i; ERR ^~~~ Expected word type KW_Do Line 2 of '' for $bad in 1 2; do echo hi; done ^~~~ Loop variable name should be a constant Line 2 of '' for foo BAD ^~~ Unexpected word after for loop variable Line 2 of '' if foo; then echo hi; z ^ Expected word type KW_Fi Line 2 of '' foo$(invalid) () { echo hi; } ^~~ Invalid function name Line 2 of '' foo="" echo "bar ^ Unexpected EOF reading double-quoted string that be..........gan here Line 2 of '' for x in 1 2 $( ^ Invalid word in for loop Line 2 of '' for ( i = 1; i < 10; i++ ) ^ Loop variable name should be a constant Line 2 of '' for = in a ^ Invalid loop variable name Line 2 of '' for x in 1 2 $(cat <' foo"bar" () { ^~~ Invalid function name Line 2 of '' x=1 >/dev/null ^~ Global assignment shouldn't have redirects Line 2 of '' echo hi; x=1 >/dev/null ^~ Global assignment shouldn't have redirects Line 2 of '' declare x=1 >/dev/null ^~~~~~~ Assignments shouldn't have redirects (CommandList children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 17 stdin_parts: [ ('1 ') (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(2)}) (C {(echo)} {(3)})]) left_token: spids: [6 14] ) (' 4\n') ] ) ] ) ] ) (CommandList children: [ (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) (C {(echo)} {(hi)}) ] ) ] ) (CommandList children: [ (AndOr ops: [Op_DAmp] children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 14 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) (C {(echo)} {(hi)}) ] ) ] ) (CommandList children: [ (AndOr ops: [Op_DAmp] children: [ (SimpleCommand words: [{(tac)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF1)} here_end_span_id: 15 stdin_parts: [('PIPE A1\n') ('PIPE A2\n')] ) ] ) (SimpleCommand words: [{(tac)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF2)} here_end_span_id: 19 stdin_parts: [('PIPE B1\n') ('PIPE B2\n')] ) ] ) ] ) ] ) (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 12 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) (C {(tac)}) ] negated: F ) ] ) (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) (C {(tac)}) ] negated: F ) ] ) (CommandList children: [ (Sentence child: (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 ...... here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) terminator: ) (C {(echo)} {(hi)}) ] ) (CommandList children: [ (Sentence child: (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 14 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) terminator: ) (C {(echo)} {(hi)}) ] ) (CommandList children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('one tab then foo: ') ($ VSub_Name '$foo') ('\n')] ) ] ) ] ) (CommandList children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(DQ (EOF))} here_end_span_id: 9 stdin_parts: [('$v\n') ('"two\n')] ) ] ) ] ) (CommandList children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(SQ )} here_end_span_id: 8 stdin_parts: [('single-quoted: $var\n')] ) ] ) ] ) (CommandList children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EO) (EscapedLiteralPart token:)} here_end_span_id: 8 stdin_parts: [('single-quoted: $var\n')] ) ] ) ] ) (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF1)} here_end_span_id: 15 stdin_parts: [('PIPE A1\n') ('PIPE A2\n')] ) ] ) (SimpleCommand words: [{(tac)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF2)} here_end_span_id: 19 stdin_parts: [('PIPE B1\n') ('PIPE B2\n')] ) ] ) ] negated: F ) ] ) (CommandList children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [($ VSub_Name '$v') ('\n') (Right_DoubleQuote '"') ('two\n')] ) ] ) ] ) (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(Lit_Digits 1)}) right: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 2)}) right: (ArithWord w:{(Lit_Digits 3)}) ) ) spids: [5 14] ) } ) ] ) left_token: spids: [2 16] ) } ) (CommandList children: [ (Subshell child: (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(Lit_Digits 1)}) .... right: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 2)}) right: (ArithWord w:{(Lit_Digits 3)}) ) ) spids: [3 12] ) } ) spids: [0 14] ) ] ) (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 1)}) right: (ArithWord w:{(Lit_Digits 2)}) ) spids: [5 10] ) } ) ] ) left_token: spids: [2 11] ) } ) (CommandList children: [ (Subshell child: (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 1)}) right: (ArithWord w:{(Lit_Digits 2)}) ) spids: [3 8] ) } ) spids: [0 9] ) ] ) (CommandList children: [ (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:array) op: Equal rhs: {(ArrayLiteralPart words:[{(a)} {(b)} {(c)}])} spids: [3] ) ] spids: [3] ) ] ) left_token: spids: [2 11] ) } ) ] ) (CommandList children: [ (Subshell child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:array) op: Equal rhs: {(ArrayLiteralPart words:[{(a)} {(b)} {(c)}])} spids: [1] ) ] spids: [1] ) spids: [0 9] ) ] ) (CommandList children: [ (C { (CommandSubPart command_list: (CommandList children: [ (Case to_match: {(foo)} arms: [ (case_arm pat_list: [{(one)}] action: [(C {(echo)} {(hi)})] spids: [9 11 17 16777215] ) ] spids: [2 6 20] ) ] ) left_token: spids: [0 22] ) } ) ] ) (CommandList children: [ (Subshell child: (Case to_match: {(foo)} arms: [(case_arm pat_list:[{(one)}] action:[(C {(echo)} {(hi)})] spids:[9 11 17 16777215])] spids: [2 6 20] ) spids: [0 22] ) ] ) (CommandList children: [ (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (Case to_match: {(foo)} arms: [ (case_arm pat_list: [{(one)}] action: [(C {(echo)} {(comsub)})] spids: [10 11 16 16777215] ) ] spids: [4 8 18] ) ] ) left_token: spids: [2 19] ) } ) ] ) (CommandList children: [ (C {(echo)} { (CommandSubPart command_list: (CommandList chil....dren: [ (Case to_match: {(foo)} arms: [ (case_arm pat_list: [{(one)}] action: [(C {(echo)} {(comsub1)})] spids: [10 11 16 16777215] ) ] spids: [4 8 18] ) (Case to_match: {(bar)} arms: [ (case_arm pat_list: [{(two)}] action: [(C {(echo)} {(comsub2)})] spids: [26 27 32 16777215] ) ] spids: [20 24 34] ) ] ) left_token: spids: [2 36] ) } ) ] ) (C {(echo)} { (DQ ('double ') (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(hi)})]) left_token: spids: [4 8] ) (' quoted') ) } {(two)} ) (CommandList children: [ (Sentence child:(C {(echo)} {(one)}) terminator:) (Sentence child: (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (Case to_match: {(one)} arms: [ (case_arm pat_list: [ { (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(one)})]) left_token: spids: [15 19] ) } ] action: [ (C {(echo)} { (CommandSubPart command_list: (CommandList children:[(C {(comsub)})]) left_token: spids: [24 26] ) } ) ] spids: [15 20 27 16777215] ) ] spids: [9 13 29] ) ] ) left_token: spids: [7 31] ) } ) terminator: ) (C {(echo)} {(two)}) ] ) (CommandList children:[(Subshell child:(Case to_match:{(foo)} spids:[2 6 9]) spids:[0 11])]) (CommandList children: [ (C { (CommandSubPart command_list: (CommandList children: [ (ForExpr init: (BinaryAssign op_id: Arith_Equal left: (LhsName name:i) right: (ArithWord w:{(Lit_Digits 0)}) ) cond: (ArithBinary op_id: Arith_Less left: (ArithVarRef name:i) right: (ArithWord w:{(Lit_Digits 3)}) ) update: (UnaryAssign op_id:Arith_DPlus child:(LhsName name:i)) body: (DoGroup children:[(C {(echo)} {(hi)})] spids:[21 29]) ) ] ) left_token: spids: [0 31] ) } ) ] ) (CommandList children: [ (Subshell child: (ForExpr init: (BinaryAssign op_id: Arith_Equal left: (LhsName name:i) right: (ArithWord w:{(Lit_Digits 0)}) ) cond: (ArithBinary o......p_id: Arith_Less left: (ArithVarRef name:i) right: (ArithWord w:{(Lit_Digits 3)}) ) update: (UnaryAssign op_id:Arith_DPlus child:(LhsName name:i)) body: (DoGroup children:[(C {(echo)} {(hi)})] spids:[21 29]) ) spids: [0 31] ) ] ) (CommandList children: [ (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (Sentence child: (FuncDef name: func body: (BraceGroup children: [(Sentence child:(C {(echo)} {(hi)}) terminator:)] spids: [7] ) spids: [3 6] ) terminator: ) (C {(func)}) ] ) left_token: spids: [2 18] ) } ) ] ) (CommandList children: [ (Subshell child: (CommandList children: [ (Sentence child: (FuncDef name: func body: (BraceGroup children: [(Sentence child:(C {(echo)} {(hi)}) terminator:)] spids: [5] ) spids: [1 4] ) terminator: ) (C {(func)}) ] ) spids: [0 16] ) ] ) (C {(echo)} { (ArithSubPart anode: (BinaryAssign op_id: Arith_Equal left: (LhsIndexedName name: a index: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(Lit_Digits 1)}) right: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 2)}) right: (ArithWord w:{(Lit_Digits 3)}) ) ) ) right: (ArithVarRef name:x) ) spids: [2 16] ) } ) (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (C {(one) (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(two)})]) left_token: spids: [4 8] ) (one) } ) ] ) left_token: spids: [2 10] ) } {(three)} ) (CommandList children: [ (BraceGroup children: [ (Sentence child:(C {(cd)} {(/)}) terminator:) (Sentence child:(C {(echo)} {(PWD)}) terminator:) ] spids: [0] ) ] ) (CommandList children: [ (Sentence child: (BraceGroup children: [ (Sentence child:(C {(cd)} {(/)}) terminator:) (Sentence child:(C {(echo)} {(PWD)}) terminator:) ] spids: [0] ) terminator: ) (C {(echo)} {(PWD)}) ] ) (CommandList children: [ (Sentence child: (Subshell child: (CommandList children: [ (Sentence child:(C {(cd)} {(/)}) terminator:) (C {(echo)} {(PWD)} {(1)}) ] ) spids: [0 11] ) terminator: ) (C {(echo)} {(PWD)} {(2)}) ] ) (CommandList children: [ (Sentence child:(C {(echo)} {(one)}) terminator:) (Sentence child: (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ ...... (Sentence child: (Subshell child: (CommandList children: [ (Sentence child: (C {(cd)} {(/)}) terminator: ) (C {(echo)} {(subshell_PWD)}) ] ) spids: [9 18] ) terminator: ) (C {(echo)} {(comsub_PWD)}) ] ) left_token: spids: [7 24] ) } ) terminator: ) (C {(echo)} {(two)}) ] ) (CommandList children: [ (C { (CommandSubPart command_list: (CommandList children: [ (Case to_match: {(foo)} arms: [ (case_arm pat_list: [{(one)}] action: [(C {(echo)} {(hi)})] spids: [9 10 16 16777215] ) ] spids: [2 6 19] ) ] ) left_token: spids: [0 21] ) } ) ] ) (CommandList children: [ (Subshell child: (Case to_match: {(foo)} arms: [(case_arm pat_list:[{(one)}] action:[(C {(echo)} {(hi)})] spids:[9 10 16 16777215])] spids: [2 6 19] ) spids: [0 21] ) ] ) (C {(echo)} {(ab) (CommandSubPart command_list: (CommandList children:[(C {(echo)} {(hi)})]) left_token: spids: [3 7] ) (cd) } {(ef)} ) (CommandList children: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_n child: { (DQ (BracedVarSub token: bracket_op: (ArrayIndex expr: (ArithWord w: {(${ VSub_Name tag_marker) (Lit_Digits 002) (${ VSub_Name cons_ptr)} ) ) spids: [7 18] ) ) } ) ) terminator: ) ] ) (CommandList children: [ (C {(echo)} { (ArithSubPart anode: (ArithWord w:{(Lit_Digits 0) (Lit_ArithVarLike x) ($ VSub_Name '$foo')}) spids: [3 10] ) } ) ] ) Line 2 of '' errcmd=( "${SETUP_STATE[$err.cmd]}" ) ^ Unexpected token in arithmetic context (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:errcmd) op: Equal rhs: { (ArrayLiteralPart words: [ { (DQ (BracedVarSub token: bracket_op: (ArrayIndex expr:(ArithWord w:{(DQ ($ VSub_Name '$err') (.cmd))})) spids: [5 13] ) ) } ] ) } spids: [1] ) ] spids: [1] ) ] ) (CommandList children: [ (C {(echo)} {(CommandSubPart command_list:(NoOp) left_token: spids:[2 3])}) ] ) (CommandList children: [ (C {(echo)} {(CommandSubPart command_list:(NoOp) left_token: spids:[2 3])}) ] ) (Comma....ndList children: [ (C {(cmd)} {(flag)} {(CommandSubPart command_list:(NoOp) left_token: spids:[4 8])} ) ] ) (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FOO) op: Equal rhs: {(DQ (bar)) (CommandSubPart command_list: (NoOp) left_token: spids: [4 7] ) (DQ (baz)) } spids: [0] ) ] spids: [0] ) ] ) (CommandList children: [ (If arms: [ (if_arm cond: [(Sentence child:(C {(true)}) terminator:)] action: [(Subshell child:(C {(echo)} {(hi)}) spids:[7 14])] spids: [16777215 5] ) ] spids: [16777215 16] ) ] ) (CommandList children: [ (While cond: [(Sentence child:(C {(true)}) terminator:)] body: (DoGroup children: [ (BraceGroup children: [(C {(echo)} {(hi)}) (ControlFlow token:)] spids: [7] ) ] spids: [5 19] ) ) ] ) (CommandList children: [ (If arms: [ (if_arm cond: [(Sentence child:(C {(true)}) terminator:)] action: [(Subshell child:(C {(echo)} {(hi)}) spids:[7 14])] spids: [16777215 5] ) ] spids: [16777215 16] ) ] ) (CommandList children: [ (If arms: [ (if_arm cond: [(Sentence child:(C {(true)}) terminator:)] action: [ (If arms: [ (if_arm cond: [(Sentence child:(C {(true)}) terminator:)] action: [(C {(echo)} {(hi)})] spids: [16777215 13] ) ] spids: [16777215 21] ) ] spids: [16777215 5] ) ] spids: [16777215 23] ) (C {(echo)} {(hi)}) ] ) (CommandList children: [ (Subshell child: (AndOr ops: [Op_DAmp] children: [ (C {(cd)} {(DQ ($ VSub_Name '$PACKDIR'))}) (ForEach iter_name: e iter_words: [{($ VSub_Name '$existing')}] do_arg_iter: F body: (DoGroup children: [ (Case to_match: {(DQ (' ') ($ VSub_Name '$fullbases') (' '))} arms: [ (case_arm pat_list: [ {(Lit_Other '*') (DQ (' ') ($ VSub_Name '$e') (' ')) (Lit_Other '*')} ] spids: [34 41 43 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$e') (.pack))} {(DQ ($ VSub_Name '$e') (.idx))} {(DQ ($ VSub_Name '$e') (.keep))} ) ] spids: [46 47 68 16777215] ) ] spids: [23 31 71] ) ] spids: [20 74] ) spids: [16 16777215] ) ] ) spids: [0 76] ) ] ) (CommandList children: [ (Sentence child: (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/diff-lib.sh)}) terminator: ) ] ) (CommandList children:[(C {(echo)} {(foo) (Lit_Pound '#') (bar)})]) (CommandList children:[(C {(echo)} {(foo)})]) (CommandList children:[(C {(echo)} {(foo)})]) (CommandList children: [ (Case to_match: {(DQ ($ VSub_Name '$fd') (',') ($ VSub_Name '$command'))} arms: [ ................. (case_arm pat_list: [{(3) (Lit_Comma ',') (Lit_Pound '#') (Lit_Other '*')} {(3) (Lit_Comma ',')}] spids: [11 18 25 16777215] ) ] spids: [0 8 27] ) ] ) (CommandList children: [ (Case to_match: {(foo)} arms: [ (case_arm pat_list: [ { (SingleQuotedPart left: tokens: [] spids: [7 9] ) } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ret) op: PlusEqual rhs: {(DQ (EscapedLiteralPart token:)) (EscapedLiteralPart token:) } spids: [13] ) ] spids: [13] ) ] spids: [7 10 20 16777215] ) ] spids: [1 5 22] ) ] ) (CommandList children: [ (C { (SingleQuotedPart left: tokens: [ ] spids: [1 5] ) } ) ] ) (SimpleCommand words: [{(echo)} {(hi)}] redirects: [(Redir op:|'> fd:16777215 arg_word:{(clobbered.txt)})] ) (Redir op:&'> fd:1 arg_word:{(2)}) (HereDoc op: fd:16777215 here_begin:{(EOF)} here_end_span_id:None) (HereDoc op: fd:16777215 here_begin:{(EOF)} here_end_span_id:None) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('hi\n')] ) (Redir op:'> fd:16777215 arg_word:{(out.txt)}) ] ) (Redir op:'> fd:16777215 arg_word:{(out.txt)}) (HereDoc op: fd:16777215 here_begin:{(EOF)} here_end_span_id:None) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op:'> fd:16777215 arg_word:{(out.txt)}) (Redir op:&'> fd:1 arg_word:{(2)}) ] ) (SimpleCommand words: [{(cat)}] redirects: [(Redir op: fd:16777215 arg_word:{(3)})] ) (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs:(LhsName name:ONE) op:Equal rhs:{(1)} spids:[0]) (assign_pair lhs:(LhsName name:TWO) op:Equal rhs:{(2)} spids:[3]) ] spids: [0] ) ] ) (CommandList children: [ (SimpleCommand redirects:[(Redir op:'> fd:16777215 arg_word:{(out.txt)})]) ] ) (C {(echo)} {(DQ (one)) (two)} {(DQ (three)) (DQ (four))} {(five)}) (CommandList children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(LhsName name:foo) op:Equal rhs:{(bar)} spids:[2]) (assign_pair lhs:(LhsName name:spam) op:Equal spids:[5]) (assign_pair lhs:(LhsName name:eggs) op:Equal spids:[7]) (assign_pair lhs:(LhsName name:one) op:Equal rhs:{(1)} spids:[9]) ] spids: [0] ) ] ) (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:foo) op:Equal rhs:{(bar)} spids:[0])] spids: [0] ) ] ) Line 2 of '' FOO=bar local foo=$(env) ^~~ Assignments shouldn't have environment bindings (CommandList children: [ (SimpleCommand words: [{(env)}] redirects: [(Redir op:'> fd:16777215 arg_word:{(out.txt)})] more_env: [(env_pair name:PYTHONPATH val:{(.)} spids:[3])] ) ] ) (CommandList children: [ (SimpleCommand words: [{(echo)} {(1)} {(2)} {(3)}] redirects: [(Redir op:'> fd:16777215 arg_word:{(out.txt)})] ) ] ) (C {(ls)} {(foo)}) (SimpleCommand words:[{(ls)} {(foo)}] more_en.. ---------------------------------------------------------------------- Ran 83 tests in 0.142s OK v:[(env_pair name:FOO val:{(bar)} spids:[0])]) (SimpleCommand words: [{(ls)} {(foo)}] redirects: [(Redir op:'> fd:16777215 arg_word:{(output.txt)})] more_env: [(env_pair name:FOO val:{(bar)} spids:[0]) (env_pair name:SPAM val:{(eggs)} spids:[6])] ) (SimpleCommand words: [{(ls)} {(foo)}] redirects: [ (Redir op:'> fd:16777215 arg_word:{(output.txt)}) (Redir op:'> fd:16777215 arg_word:{(output2.txt)}) ] more_env: [(env_pair name:FOO val:{(bar)} spids:[0]) (env_pair name:SPAM val:{(eggs)} spids:[6])] ) (CommandList children: [ (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs:(LhsName name:ONE) op:Equal rhs:{(1)} spids:[2]) (assign_pair lhs:(LhsName name:TWO) op:Equal rhs:{(2)} spids:[5]) (assign_pair lhs:(LhsName name:THREE) op:Equal spids:[8]) ] spids: [0] ) ] )