array=(a b c) ls
  ^~~~~~
"<cmd_parse_test>":1: Environment bindings can't contain array literals
..(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike "empty=">
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike "empty=">
          lhs: (sh_lhs.Name left:<Id.Lit_VarLike "empty="> name:empty)
          op: assign_op.Equal
          rhs: {(ShArrayLiteral left:<Id.Op_LParen "("> words:[] right:<Id.Right_ShArrayLiteral ")">)}
        )
      ]
    )
  ]
)(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike "array=">
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike "array=">
          lhs: (sh_lhs.Name left:<Id.Lit_VarLike "array="> name:array)
          op: assign_op.Equal
          rhs: 
            {
              (ShArrayLiteral
                left: <Id.Op_LParen "(">
                words: [{<Id.Lit_Chars a>} {<Id.Lit_Chars b>} {<Id.Lit_Chars c>}]
                right: <Id.Right_ShArrayLiteral ")">
              )
            }
        )
      ]
    )
  ]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.ShAssignment
          left: <Id.Lit_VarLike "array=">
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike "array=">
              lhs: (sh_lhs.Name left:<Id.Lit_VarLike "array="> name:array)
              op: assign_op.Equal
              rhs: 
                {
                  (ShArrayLiteral
                    left: <Id.Op_LParen "(">
                    words: [{<Id.Lit_Chars a>} {<Id.Lit_Chars b>} {<Id.Lit_Chars c>}]
                    right: <Id.Right_ShArrayLiteral ")">
                  )
                }
            )
          ]
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike "array2=">
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike "array2=">
          lhs: (sh_lhs.Name left:<Id.Lit_VarLike "array2="> name:array2)
          op: assign_op.Equal
          rhs: 
            {
              (ShArrayLiteral
                left: <Id.Op_LParen "(">
                words: [{<Id.Lit_Chars d>} {<Id.Lit_Chars e>} {<Id.Lit_Chars f>}]
                right: <Id.Right_ShArrayLiteral ")">
              )
            }
        )
      ]
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars ls>
  more_env: []
  words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
  do_fork: T
)(command.Pipeline
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars wc>
      more_env: []
      words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_Pipe "|">]
)(command.AndOr
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars die>
      more_env: []
      words: [{<Id.Lit_Chars die>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_DPipe "||">]
)(command.AndOr
  children: [
    (command.Pipeline
      children: [
        (command.Simple
          blame_tok: <Id.Lit_Chars ls>
          more_env: []
          words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
          do_fork: T
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars wc>
          more_env: []
          words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}]
          do_fork: T
        )
      ]
      ops: [<Id.Op_Pipe "|">]
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars die>
      more_env: []
      words: [{<Id.Lit_Chars die>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_DPipe "||">]
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
  arms_start: <Id.KW_In in>
  arms: []
  arms_end: <Id.KW_Esac esac>
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.Word w:{<Id.Lit_Chars word>})
  arms_start: <Id.KW_In in>
  arms: [
    (CaseArm
      left: <Id.Lit_Chars foo>
      pattern: (pat.Words words:[{<Id.L.it_Chars foo>} {<Id.Lit_Chars foo2>} {<Id.Lit_Chars foo3>}])
      middle: <Id.Right_CasePat ")">
      action: [
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
          do_fork: T
        )
      ]
      right: <Id.Op_DSemi ";;">
    )
  ]
  arms_end: <Id.KW_Esac esac>
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.Word w:{<Id.Lit_Chars word>})
  arms_start: <Id.KW_In in>
  arms: [
    (CaseArm
      left: <Id.Lit_Chars foo>
      pattern: (pat.Words words:[{<Id.Lit_Chars foo>}])
      middle: <Id.Right_CasePat ")">
      action: [
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars one-line>}]
          do_fork: T
        )
      ]
      right: <Id.Op_DSemi ";;">
    )
  ]
  arms_end: <Id.KW_Esac esac>
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.Word w:{<Id.Lit_Chars word>})
  arms_start: <Id.KW_In in>
  arms: [
    (CaseArm
      left: <Id.Lit_Chars foo>
      pattern: (pat.Words words:[{<Id.Lit_Chars foo>}])
      middle: <Id.Right_CasePat ")">
      action: [
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars foo>}]
          do_fork: T
        )
      ]
      right: <Id.Op_DSemi ";;">
    )
    (CaseArm
      left: <Id.Lit_Chars bar>
      pattern: (pat.Words words:[{<Id.Lit_Chars bar>}])
      middle: <Id.Right_CasePat ")">
      action: [
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars bar>}]
          do_fork: T
        )
      ]
      right: <Id.Op_DSemi ";;">
    )
  ]
  arms_end: <Id.KW_Esac esac>
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.Word w:{<Id.Lit_Chars word>})
  arms_start: <Id.KW_In in>
  arms: [
    (CaseArm
      left: <Id.Lit_Chars foo>
      pattern: (pat.Words words:[{<Id.Lit_Chars foo>}])
      middle: <Id.Right_CasePat ")">
      action: [
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars foo>}]
          do_fork: T
        )
      ]
      right: <Id.Op_DSemi ";;">
    )
    (CaseArm
      left: <Id.Lit_Chars bar>
      pattern: (pat.Words words:[{<Id.Lit_Chars bar>}])
      middle: <Id.Right_CasePat ")">
      action: [
        (command.Sentence
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars bar>}]
              do_fork: T
            )
          terminator: <Id.Op_Semi ";">
        )
      ]
    )
  ]
  arms_end: <Id.KW_Esac esac>
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.Word w:{<Id.Lit_Chars word>})
  arms_start: <Id.KW_In in>
  arms: [
    (CaseArm
      left: <Id.Lit_Chars foo>
      pattern: (pat.Words words:[{<Id.Lit_Chars foo>}])
      middle: <Id.Right_CasePat ")">
      action: [
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars foo>}]
          do_fork: T
        )
      ]
      right: <Id.Op_DSemi ";;">
    )
    (CaseArm
      left: <Id.Lit_Chars bar>
      pattern: (pat.Words words:[{<Id.Lit_Chars bar>}])
      middle: <Id.Right_CasePat ")">
      action: [
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars bar>}]
          do_fork: T
        )
      ]
    )
  ]
  arms_end: <Id.KW_Esac esac>
)(command.Simple
  blame_tok: 
    (Token
      id: Id.Lit_Chars
      length: 2
      col: 0
      line: (SourceLine line_num:1 content:"ls foo" src:(source.MainFile path:"<test_lib>"))
    )
  more_env: []
  words: [
    (CompoundWord parts:[...0x7fdb5ca47f58])
    (CompoundWord parts:[(Token id:Id.Lit_Chars length:3 col:3 line:.....0x7fdb5ca42788)])
  ]
  do_fork: T
)
(command.ShFunction
  name_tok: 
    (Token
      id: Id.Lit_Chars
      length: 3
      col: 0
      line: 
        (SourceLine
          line_num: 1
          content: "fun() { echo hi; }"
          src: (source.MainFile path:"<test_lib>")
        )
    )
  name: fun
  body: 
    (BraceGroup
      left: (Token id:Id.Lit_LBrace length:1 col:6 line:...0x7fdb5ca42680)
      children: [
        (command.Sentence
          child: 
            (command.Simple
              blame_tok: (Token id:Id.Lit_Chars length:4 col:8 line:...0x7fdb5ca42680)
              more_env: []
              words: [
                (CompoundWord parts:[...0x7fdb5ca47b48])
                (CompoundWord
                  parts: [(Token id:Id.Lit_Chars length:2 col:13 line:...0x7fdb5ca42680)]
                )
              ]
              do_fork: T
            )
          terminator: (Token id:Id.Op_Semi length:1 col:15 line:...0x7fdb5ca42680)
        )
      ]
      right: (Token id:Id.Lit_RBrace length:1 col:17 line:...0x7fdb5ca42680)
    )
)
(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {
      (CommandSub
        left_token: <Id.Left_DollarParen "$(">
        child: 
          (command.Simple
            blame_tok: <Id.Lit_Chars echo>
            more_env: []
            words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars 12>}]
            do_fork: T
          )
        right: <Id.Eof_RParen ")">
      ) 
      (CommandSub
        left_token: <Id.Left_DollarParen "$(">
        child: 
          (command.Simple
            blame_tok: <Id.Lit_Chars echo>
            more_env: []
            words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars 34>}]
            do_fork: T
          )
        right: <Id.Eof_RParen ")">
      )
    }
  ]
  do_fork: T
)(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {
      (DQ 
        (CommandSub
          left_token: <Id.Left_DollarParen "$(">
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars 12>}]
              do_fork: T
            )
          right: <Id.Eof_RParen ")">
        ) 
        (CommandSub
          left_token: <Id.Left_DollarParen "$(">
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars 34>}]
              do_fork: T
            )
          right: <Id.Eof_RParen ")">
        )
      )
    }
  ]
  do_fork: T
)(command.CommandList
  children: [
    (command.DBracket
      left: <Id.KW_DLeftBracket "[[">
      expr: (bool_expr.Binary op_id:Id.BoolBinary_gt left:{($ Id.VSub_Pound)} right:{<Id.Lit_Chars 1>})
      right: <Id.Lit_DRightBracket "]]">
    )
  ]
)(command.CommandList
  children: [
    (command.DBracket
      left: <Id.KW_DLeftBracket "[[">
      expr: 
        (bool_expr.LogicalAnd
          left: 
            (bool_expr.Binary
              op_id: Id.BoolBinary_gt
              left: {($ Id.VSub_Pound)}
              right: {<Id.Lit_Chars 1>}
            )
          right: (bool_expr.WordTest w:{<Id.Lit_Chars foo>})
        )
      right: <Id.Lit_DRightBracket "]]">
    )
  ]
)(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket "[[">
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_gt
                      left: {($ Id.VSub_Pound)}
                      right: {<Id.Lit_Chars 1>}
                    )
                  right: <Id.Lit_DRightBracket "]]">
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <Id.Lit...._Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
          ]
          then_tok: <Id.KW_Then then>
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
    )
  ]
)(command.CommandList
  children: [
    (command.DBracket
      left: <Id.KW_DLeftBracket "[[">
      expr: 
        (bool_expr.Binary
          op_id: Id.BoolBinary_EqualTilde
          left: {<Id.Lit_Chars foo>}
          right: {<Id.Lit_Chars foo>}
        )
      right: <Id.Lit_DRightBracket "]]">
    )
  ]
)(command.CommandList
  children: [
    (command.DBracket
      left: <Id.KW_DLeftBracket "[[">
      expr: 
        (bool_expr.Binary
          op_id: Id.BoolBinary_EqualTilde
          left: {<Id.Lit_Chars foo>}
          right: 
            {
              (word_part.BashRegexGroup
                left: <Id.BashRegex_LParen "(">
                child: {<Id.Lit_Chars foo> <Id.Lit_Other "|"> <Id.Lit_Chars bar>}
                right: <Id.Right_BashRegexGroup ")">
              )
            }
        )
      right: <Id.Lit_DRightBracket "]]">
    )
  ]
)(command.CommandList
  children: [
    (command.DParen
      left: <Id.Op_DLeftParen "((">
      child: 
        (arith_expr.Binary
          op: <Id.Arith_Plus "+">
          left: {<Id.Lit_Digits 1>}
          right: {<Id.Lit_Digits 2>}
        )
      right: <Id.Op_DRightParen ")">
    )
  ]
)(command.CommandList
  children: [
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [i]
      iterable: (for_iter.Words words:[{<Id.Lit_Chars 1>} {<Id.Lit_Chars 2>} {<Id.Lit_Chars 3>}])
      semi_tok: <Id.Op_Semi ";">
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {($ i)}]
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [i]
      iterable: (for_iter.Words words:[])
      semi_tok: <Id.Op_Semi ";">
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {($ i)}]
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [i]
      iterable: (for_iter__Args)
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {($ i)}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [i]
      iterable: (for_iter__Args)
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {($ i)}]
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ForExpr
      keyword: <Id.KW_For for>
      init: 
        (arith_expr.BinaryAssign
          op_id: Id.Arith_Equal
          left: <Id.Lit_ArithVarLike i>
          right: {<Id.Lit_Digits 0>}
        )
      cond: 
        (arith_expr.Binary
          op: <Id.Arith_Less "<">
          left: <Id.Lit_ArithVarLike i>
          right: {<Id.Lit_Digits 5>}
        )
.      update: (arith_expr.UnaryAssign op_id:Id.Arith_DPlus child:<Id.Lit_ArithVarLike i>)
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {($ i)}]
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ForExpr
      keyword: <Id.KW_For for>
      init: 
        (arith_expr.BinaryAssign
          op_id: Id.Arith_Equal
          left: <Id.Lit_ArithVarLike i>
          right: {<Id.Lit_Digits 0>}
        )
      cond: 
        (arith_expr.Binary
          op: <Id.Arith_Less "<">
          left: <Id.Lit_ArithVarLike i>
          right: {<Id.Lit_Digits 5>}
        )
      update: (arith_expr.UnaryAssign op_id:Id.Arith_DPlus child:<Id.Lit_ArithVarLike i>)
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {($ i)}]
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ForExpr
      keyword: <Id.KW_For for>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {($ i)}]
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace "{">
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
          right: <Id.Lit_RBrace "}">
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (command.Subshell
          left: <Id.Op_LParen "(">
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
          right: <Id.Right_Subshell ")">
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (command.ForEach
          keyword: <Id.KW_For for>
          iter_names: [i]
          iterable: (for_iter.Words words:[{<Id.Lit_Chars x>}])
          semi_tok: <Id.Op_Semi ";">
          body: 
            (command.DoGroup
              left: <Id.KW_Do do>
              children: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars echo>
                      more_env: []
                      words: [{<Id.Lit_Chars echo>} {($ i)}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
              right: <Id.KW_Done done>
            )
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace "{">
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
          right: <Id.Lit_RBrace "}">
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace "{">
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
          right: <Id.Lit_RBrace "}">
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (command.Subshell
          left: <Id.Op_LParen "(">
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
          right: <Id.Right_Subshell ")">
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (command.ForEach
          keyword: <Id.KW_For for>
          iter_names: [i]
          iterable: (for_iter.Words words:[{<Id.Lit_Chars x>}])
          semi_tok: <Id.Op_Semi ";">
          body: 
            (command.DoGroup
              left: <Id.KW_Do do>
              children: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars echo>
                      more_env: []
                      words: [{<Id.Lit_Chars echo>} {($ i)}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
              right: <Id.KW_Done done>
            )
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (command.ForEach
          keyword: <Id.KW_For for>
          iter_names: [i]
          iterable: (for_iter.Words words:[{<Id.Lit_Chars x>}])
          semi_tok: <Id.Op_Semi ";">
          body: 
            (command.DoGroup
              left: <Id.KW_Do do>
              children: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars echo>
                      more_env: []
                      words: [{<Id.Lit_Chars echo>} {($ i)}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
              right: <Id.KW_Done done>
            )
        )
    )
  ]
)(command.CommandList
  children: [
    (command.ShFunction
      name_tok: <Id.Lit_Chars foo>
      name: foo
      body: 
        (command.Redirect
          child: 
            (BraceGroup
              left: <Id.Lit_LBrace "{">
              children: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars echo>
                      more_env: []
                      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
              right: <Id.Lit_RBrace "}">
            )
          redirects: [
            (Redir
              op: <Id.Redir_GreatAnd "1>&">
              loc: (redir_loc.Fd fd:1)
              arg: {<Id.Lit_Chars 2>}
            )
  ...          (Redir
              op: <Id.Redir_Great "2>">
              loc: (redir_loc.Fd fd:2)
              arg: {<Id.Lit_Slash /> <Id.Lit_Chars dev> <Id.Lit_Slash /> <Id.Lit_Chars "null">}
            )
          ]
        )
    )
  ]
)(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars "true">
                      more_env: []
                      words: [{<Id.Lit_Chars "true">}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars yes>}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
          then_tok: <Id.KW_Then then>
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
    )
  ]
)(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Subshell
                      left: <Id.Op_LParen "(">
                      child: 
                        (command.Simple
                          blame_tok: <Id.Lit_Chars "true">
                          more_env: []
                          words: [{<Id.Lit_Chars "true">}]
                          do_fork: T
                        )
                      right: <Id.Right_Subshell ")">
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars yes>}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
          then_tok: <Id.KW_Then then>
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars ifFOO>
      more_env: []
      words: [{<Id.Lit_Chars ifFOO>}]
      do_fork: T
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars ls>
  more_env: []
  words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
  do_fork: T
)(command.Pipeline
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars wc>
      more_env: []
      words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_Pipe "|">]
)(command.Pipeline
  negated: <Id.KW_Bang "!">
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars grep>
      more_env: []
      words: [{<Id.Lit_Chars grep>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_Pipe "|">]
)(command.Pipeline
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars wc>
      more_env: []
      words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}  ls foo|
         ^
"<cmd_parse_test>":1: Unexpected EOF while parsing command
....]
      do_fork: T
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars less>
      more_env: []
      words: [{<Id.Lit_Chars less>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_Pipe "|"> <Id.Op_Pipe "|">]
)(command.CommandList
  children: [
    (command.Pipeline
      children: [
        (command.Simple
          blame_tok: <Id.Lit_Chars ls>
          more_env: []
          words: [{<Id.Lit_Chars ls>}]
          do_fork: T
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
      ]
      ops: [<Id.Op_Pipe "|"> <Id.Op_PipeAmp "|&">]
    )
  ]
)(command.CommandList
  children: [
    (command.Pipeline
      children: [
        (command.Simple
          blame_tok: <Id.Lit_Chars ls>
          more_env: []
          words: [{<Id.Lit_Chars ls>}]
          do_fork: T
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
      ]
      ops: [<Id.Op_PipeAmp "|&"> <Id.Op_Pipe "|">]
    )
  ]
)(command.CommandList
  children: [
    (command.Pipeline
      children: [
        (command.Simple
          blame_tok: <Id.Lit_Chars ls>
          more_env: []
          words: [{<Id.Lit_Chars ls>}]
          do_fork: T
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
      ]
      ops: [<Id.Op_PipeAmp "|&"> <Id.Op_PipeAmp "|&">]
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [
        {<Id.Lit_Chars ls>}
        {(word_part.TildeSub left:<Id.Lit_Tilde "~">)}
        {(word_part.TildeSub left:<Id.Lit_Tilde "~"> name:<Id.Lit_Chars root> user_name:root)}
        {(word_part.TildeSub left:<Id.Lit_Tilde "~">) <Id.Lit_Slash /> <Id.Lit_Chars src>}
        {(word_part.TildeSub left:<Id.Lit_Tilde "~">) <Id.Lit_Slash /> <Id.Lit_Chars src> 
          <Id.Lit_Slash /> <Id.Lit_Chars foo>
        }
        {(word_part.TildeSub left:<Id.Lit_Tilde "~"> name:<Id.Lit_Chars root> user_name:root) 
          <Id.Lit_Slash /> <Id.Lit_Chars src>
        }
        {<Id.Lit_Tilde "~"> <Id.Lit_Chars weird> <Id.KW_Bang "!"> <Id.Lit_Chars name> <Id.Lit_Slash /> 
          <Id.Lit_Chars blah> <Id.KW_Bang "!"> <Id.Lit_Chars blah>
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.WhileUntil
      keyword: <Id.KW_Until until>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars "false">
                  more_env: []
                  words: [{<Id.Lit_Chars "false">}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Break break>)
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
        .      child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars "true">
                  more_env: []
                  words: [{<Id.Lit_Chars "true">}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Break break>)
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Simple
              blame_tok: <Id.Lit_Chars "true">
              more_env: []
              words: [{<Id.Lit_Chars "true">}]
              do_fork: T
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Break break>)
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id.Lit_LBrace "{">
  arms: []
  arms_end: <Id.Lit_RBrace "}">
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id.Lit_LBrace "{">
  arms: [
    (CaseArm
      left: <Id.Op_LParen "(">
      pattern: (pat__Else)
      middle: <Id.Lit_LBrace "{">
      action: [
        (command.Sentence
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
          terminator: <Id.Op_Semi ";">
        )
      ]
      right: <Id.Lit_RBrace "}">
    )
  ]
  arms_end: <Id.Lit_RBrace "}">
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id.Lit_LBrace "{">
  arms: [
    (CaseArm
      left: <Id.Op_LParen "(">
      pattern: 
        (pat.YshExprs
          exprs: [
            (expr.Const c:<Id.Expr_DecInt 2> val:(value.Int i:2))
            (expr.Const c:<Id.Expr_DecInt 3> val:(value.Int i:3))
          ]
        )
      middle: <Id.Lit_LBrace "{">
      action: [
        (command.Sentence
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
          terminator: <Id.Op_Semi ";">
        )
      ]
      right: <Id.Lit_RBrace "}">
    )
  ]
  arms_end: <Id.Lit_RBrace "}">
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id.Lit_LBrace "{">
  arms: [
    (CaseArm
      left: <Id.Lit_Chars bare>
      pattern: (pat.Words words:[{<Id.Lit_Chars bare>} {<Id.Lit_Chars x>} {(SQ string)}])
      middle: <Id.Lit_LBrace "{">
      action: [
        (command.Sentence
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
          terminator: <Id.Op_Semi ";">
        )
      ]
      right: <Id.Lit_RBrace "}">
    )
  ]
  arms_end: <Id.Lit_RBrace "}">
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id..Lit_LBrace "{">
  arms: [
    (CaseArm
      left: <Id.Arith_Slash />
      pattern: 
        (Eggex
          left: <Id.Arith_Slash />
          regex: (re.Repeat child:(PerlClass name:d) op:<Id.Arith_Plus "+">)
          flags: []
          canonical_flags: ""
        )
      middle: <Id.Lit_LBrace "{">
      action: [
        (command.Sentence
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars space>}]
              do_fork: T
            )
          terminator: <Id.Op_Semi ";">
        )
      ]
      right: <Id.Lit_RBrace "}">
    )
    (CaseArm
      left: <Id.Arith_Slash />
      pattern: 
        (Eggex
          left: <Id.Arith_Slash />
          regex: (re.Repeat child:(PerlClass name:d) op:<Id.Arith_Plus "+">)
          flags: []
          canonical_flags: ""
        )
      middle: <Id.Lit_LBrace "{">
      action: [
        (command.Sentence
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars space2>}]
              do_fork: T
            )
          terminator: <Id.Op_Semi ";">
        )
      ]
      right: <Id.Lit_RBrace "}">
    )
  ]
  arms_end: <Id.Lit_RBrace "}">
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id.Lit_LBrace "{">
  arms: [
    (CaseArm
      left: <Id.Lit_Chars word>
      pattern: (pat.Words words:[{<Id.Lit_Chars word>}])
      middle: <Id.Lit_LBrace "{">
      action: [(command.Expr keyword:<Id.Lit_Equals "="> e:(expr.Var left:<Id.Expr_Name x> name:x))]
      right: <Id.Lit_RBrace "}">
    )
  ]
  arms_end: <Id.Lit_RBrace "}">
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id.Lit_LBrace "{">
  arms: [
    (CaseArm
      left: <Id.Arith_Slash />
      pattern: (Eggex left:<Id.Arith_Slash /> regex:(SQ eggex) flags:[] canonical_flags:"")
      middle: <Id.Lit_LBrace "{">
      action: [(command.Expr keyword:<Id.Lit_Equals "="> e:(expr.Var left:<Id.Expr_Name x> name:x))]
      right: <Id.Lit_RBrace "}">
    )
  ]
  arms_end: <Id.Lit_RBrace "}">
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id.Lit_LBrace "{">
  arms: [
    (CaseArm
      left: <Id.Op_LParen "(">
      pattern: (pat.YshExprs exprs:[(SQ expr)])
      middle: <Id.Lit_LBrace "{">
      action: [(command.Expr keyword:<Id.Lit_Equals "="> e:(expr.Var left:<Id.Expr_Name x> name:x))]
      right: <Id.Lit_RBrace "}">
    )
  ]
  arms_end: <Id.Lit_RBrace "}">
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.YshExpr e:(expr.Var left:<Id.Expr_Name x> name:x))
  arms_start: <Id.Lit_LBrace "{">
  arms: [
    (CaseArm
      left: <Id.Op_LParen "(">
      pattern: (pat__Else)
      middle: <Id.Lit_LBrace "{">
      action: [(command.Expr keyword:<Id.Lit_Equals "="> e:(expr.Var left:<Id.Expr_Name x> name:x))]
      right: <Id.Lit_RBrace "}">
    )
  ]
  arms_end: <Id.Lit_RBrace "}">
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
  redirects: [
    (Redir
      op: <Id.Redir_Great "2>">
      loc: (redir_loc.Fd fd:2)
      arg: {<Id.Lit_Slash /> <Id.Lit_Chars dev> <Id.Lit_Slash /> <Id.Lit_Chars "null">}
    )
  ]
)(command.Pipeline
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars wc>
      more_env: []
      words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_Pipe "|">]
)(command.AndOr
  children: [
    (command.Pipeline
      children: [
        (command.Simple
          blame_tok: <Id.Lit._Chars ls>
          more_env: []
          words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
          do_fork: T
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars wc>
          more_env: []
          words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}]
          do_fork: T
        )
      ]
      ops: [<Id.Op_Pipe "|">]
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars die>
      more_env: []
      words: [{<Id.Lit_Chars die>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_DPipe "||">]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.AndOr
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <Id.Lit_Chars ls>
                  more_env: []
                  words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <Id.Lit_Chars wc>
                  more_env: []
                  words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}]
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe "|">]
            )
            (command.Simple
              blame_tok: <Id.Lit_Chars die>
              more_env: []
              words: [{<Id.Lit_Chars die>}]
              do_fork: T
            )
          ]
          ops: [<Id.Op_DPipe "||">]
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Slash />}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.AndOr
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <Id.Lit_Chars ls>
                  more_env: []
                  words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <Id.Lit_Chars wc>
                  more_env: []
                  words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}]
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe "|">]
            )
            (command.Simple
              blame_tok: <Id.Lit_Chars die>
              more_env: []
              words: [{<Id.Lit_Chars die>}]
              do_fork: T
            )
          ]
          ops: [<Id.Op_DPipe "||">]
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: []
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Slash />}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.AndOr
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <Id.Lit_Chars ls>
                  more_env: []
                  words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <Id.Lit_Chars wc>
                  more_env: []
                  words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -l>}]
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe "|">]
            )
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars fail>}]
              do_fork: T
            )
          ]
          ops: [<Id.Op_DPipe "||">]
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.AndOr
      children: [
        (command.Pipeline
          children: [
            (command.Simple
              blame_tok: <Id.Lit.  (( 1 + ))
         ^
"<cmd_parse_test>":1: Token can't be used in prefix position
.  A= (1 2)
    ^
"<cmd_parse_test>":1: Expected ( after =
.  [[ foo bar ]]
         ^~~
"<cmd_parse_test>":1: Expected ]]
  [[ foo -eq ]]
               ^
"<cmd_parse_test>":1: Expected ]]
  [[ foo$(echo <) -eq foo ]]
                ^
"<cmd_parse_test>":1: Invalid token after redirect operator
.  ls <
      ^
"<cmd_parse_test>":1: Invalid token after redirect operator
  ls < <
       ^
"<cmd_parse_test>":1: Invalid token after redirect operator
  echo foo$(ls <)bar
                ^
"<cmd_parse_test>":1: Invalid token after redirect operator
  BAD_ENV=(1 2 3) ls
  ^~~~~~~~
"<cmd_parse_test>":1: Environment bindings can't contain array literals
  for ((i=1; i<)); do echo $i; done
               ^
"<cmd_parse_test>":1: Token can't be used in prefix position
  for ((i=1; i<5; ++i)) OOPS echo $i; ERR
                        ^~~~
"<cmd_parse_test>":1: Invalid word after for expression
  for ((i=1; i<5; ++i)); OOPS echo $i; ERR
                         ^~~~
"<cmd_parse_test>":1: Expected word type Id.KW_Do, got Id.Word_Compound
  for $bad in 1 2; do echo hi; done
      ^~~~
"<cmd_parse_test>":1: Expected loop variable (a constant word)
  for foo BAD
             ^
"<cmd_parse_test>":1: Expected loop variable (a constant word)
  if foo; then echo hi; z
                         ^
"<cmd_parse_test>":1: Expected word type Id.KW_Fi, got Id.Eof_Real
  foo$(invalid) () { echo hi; }
  ^~~
"<cmd_parse_test>":1: Invalid function name
.  foo="" echo "bar
              ^
"<cmd_parse_test>":1: Unexpected EOF reading double-quoted string that began here
..  for x in 1 2 $(
                 ^
"<cmd_parse_test>":1: Invalid word in for loop
.      for [ i = 1; i < 10; i++ ]
          ^
"<cmd_parse_test>":1: Invalid loop variable name '['
      for = in a
          ^
"<cmd_parse_test>":1: Invalid loop variable name '='
.  for x in 1 2 $(cat <<EOF
                     ^~
"<cmd_parse_test>":1: Couldn't find terminator for here doc that starts here
.      foo"bar" () {
      ^~~
"<cmd_parse_test>":1: Invalid function name
.._Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars bar>}]
              do_fork: T
            )
            (command.Simple
              blame_tok: <Id.Lit_Chars wc>
              more_env: []
              words: [{<Id.Lit_Chars wc>} {<Id.Lit_Chars -c>}]
              do_fork: T
            )
          ]
          ops: [<Id.Op_Pipe "|">]
        )
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars f2>}]
          do_fork: T
        )
      ]
      ops: [<Id.Op_DPipe "||">]
    )
  ]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit_Chars cat>}]
      do_fork: T
    )
  redirects: [
    (Redir
      op: <Id.Redir_DLess "<<">
      loc: (redir_loc.Fd fd:0)
      arg: 
        (redir_param.HereDoc
          here_begin: {<Id.Lit_Chars EOF>}
          here_end_tok: <Id.Undefined_Tok "EOF\n">
          stdin_parts: [
            <Id.Lit_Chars "1 ">
            (CommandSub
              left_token: <Id.Left_DollarParen "$(">
              child: 
                (command.CommandList
                  children: [
                    (command.Simple
                      blame_tok: <Id.Lit_Chars echo>
                      more_env: []
                      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars 2>}]
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <Id.Lit_Chars echo>
                      more_env: []
                      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars 3>}]
                      do_fork: T
                    )
                  ]
                )
              right: <Id.Eof_RParen ")">
            )
            <Id.Lit_Chars " 4\n">
          ]
        )
    )
  ]
)(command.AndOr
  children: [
    (command.Redirect
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
      redirects: [
        (Redir
          op: <Id.Redir_DLess "<<">
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<Id.Lit_Chars EOF>}
              here_end_tok: <Id.Undefined_Tok "EOF\n">
              stdin_parts: [<Id.Lit_Chars "PIPE 1\n"> <Id.Lit_Chars "PIPE 2\n">]
            )
        )
      ]
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_DPipe "||">]
)(command.AndOr
  children: [
    (command.Redirect
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
      redirects: [
        (Redir
          op: <Id.Redir_DLess "<<">
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<Id.Lit_Chars EOF>}
              here_end_tok: <Id.Undefined_Tok "EOF\n">
              stdin_parts: [<Id.Lit_Chars "PIPE 1\n"> <Id.Lit_Chars "PIPE 2\n">]
            )
        )
      ]
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_DAmp "&&">]
)(command.AndOr
  children: [
    (command.Redirect
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars tac>
          more_env: []
          words: [{<Id.Lit_Chars tac>}]
          do_fork: T
        )
      redirects: [
        (Redir
          op: <Id.Redir_DLess "<<">
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<Id.Lit_Chars EOF1>}
              here_end_tok: <Id.Undefined_Tok "EOF1\n">
              stdin_parts: [<Id.Lit_Chars "PIPE A1\n"> <Id.Lit_Chars "PIPE A2\n">]
            )
        )
      ]
    )
    (command.Redir....ect
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars tac>
          more_env: []
          words: [{<Id.Lit_Chars tac>}]
          do_fork: T
        )
      redirects: [
        (Redir
          op: <Id.Redir_DLess "<<">
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<Id.Lit_Chars EOF2>}
              here_end_tok: <Id.Undefined_Tok "EOF2\n">
              stdin_parts: [<Id.Lit_Chars "PIPE B1\n"> <Id.Lit_Chars "PIPE B2\n">]
            )
        )
      ]
    )
  ]
  ops: [<Id.Op_DAmp "&&">]
)(command.Pipeline
  children: [
    (command.Redirect
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
      redirects: [
        (Redir
          op: <Id.Redir_DLess "<<">
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<Id.Lit_Chars EOF>}
              here_end_tok: <Id.Undefined_Tok "EOF\n">
              stdin_parts: [<Id.Lit_Chars "PIPE 1\n"> <Id.Lit_Chars "PIPE 2\n">]
            )
        )
      ]
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars tac>
      more_env: []
      words: [{<Id.Lit_Chars tac>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_Pipe "|">]
)(command.Pipeline
  children: [
    (command.Redirect
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars cat>
          more_env: []
          words: [{<Id.Lit_Chars cat>}]
          do_fork: T
        )
      redirects: [
        (Redir
          op: <Id.Redir_DLess "<<">
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<Id.Lit_Chars EOF>}
              here_end_tok: <Id.Undefined_Tok "EOF\n">
              stdin_parts: [<Id.Lit_Chars "PIPE 1\n"> <Id.Lit_Chars "PIPE 2\n">]
            )
        )
      ]
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars tac>
      more_env: []
      words: [{<Id.Lit_Chars tac>}]
      do_fork: T
    )
  ]
  ops: [<Id.Op_Pipe "|">]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.Redirect
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars cat>
              more_env: []
              words: [{<Id.Lit_Chars cat>}]
              do_fork: T
            )
          redirects: [
            (Redir
              op: <Id.Redir_DLess "<<">
              loc: (redir_loc.Fd fd:0)
              arg: 
                (redir_param.HereDoc
                  here_begin: {<Id.Lit_Chars EOF>}
                  here_end_tok: <Id.Undefined_Tok "EOF\n">
                  stdin_parts: [<Id.Lit_Chars "PIPE 1\n"> <Id.Lit_Chars "PIPE 2\n">]
                )
            )
          ]
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.Redirect
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars cat>
              more_env: []
              words: [{<Id.Lit_Chars cat>}]
              do_fork: T
            )
          redirects: [
            (Redir
              op: <Id.Redir_DLess "<<">
              loc: (redir_loc.Fd fd:0)
              arg: 
                (redir_param.HereDoc
                  here_begin: {<Id.Lit_Chars EOF>}
                  here_end_tok: <Id.Undefined_Tok "EOF\n">
                  stdin_parts: [<Id.Lit_Chars "PIPE 1\n"> <Id.Lit_Chars "PIPE 2\n">]
                )
            )
          ]
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
      do_fork: T
    )
  ]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit...._Chars cat>}]
      do_fork: T
    )
  redirects: [
    (Redir
      op: <Id.Redir_DLessDash "<<-">
      loc: (redir_loc.Fd fd:0)
      arg: 
        (redir_param.HereDoc
          here_begin: {<Id.Lit_Chars EOF>}
          here_end_tok: <Id.Undefined_Tok "EOF\n">
          stdin_parts: [<Id.Lit_Chars "one tab then foo: "> ($ foo) <Id.Lit_Chars "\n">]
        )
    )
  ]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit_Chars cat>}]
      do_fork: T
    )
  redirects: [
    (Redir
      op: <Id.Redir_DLess "<<">
      loc: (redir_loc.Fd fd:0)
      arg: 
        (redir_param.HereDoc
          here_begin: {(DQ <Id.Lit_Chars EOF>)}
          here_end_tok: <Id.Undefined_Tok "EOF\n">
          stdin_parts: [<Id.Lit_Chars "$v\n"> <Id.Lit_Chars "\"two\n">]
        )
    )
  ]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit_Chars cat>}]
      do_fork: T
    )
  redirects: [
    (Redir
      op: <Id.Redir_DLess "<<">
      loc: (redir_loc.Fd fd:0)
      arg: 
        (redir_param.HereDoc
          here_begin: {(SQ EOF)}
          here_end_tok: <Id.Undefined_Tok "EOF\n">
          stdin_parts: [<Id.Lit_Chars "single-quoted: $var\n">]
        )
    )
  ]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit_Chars cat>}]
      do_fork: T
    )
  redirects: [
    (Redir
      op: <Id.Redir_DLess "<<">
      loc: (redir_loc.Fd fd:0)
      arg: 
        (redir_param.HereDoc
          here_begin: 
            {<Id.Lit_Chars EO> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar "\\F"> ch:F)}
          here_end_tok: <Id.Undefined_Tok "EOF\n">
          stdin_parts: [<Id.Lit_Chars "single-quoted: $var\n">]
        )
    )
  ]
)(command.CommandList
  children: [
    (command.Pipeline
      children: [
        (command.Redirect
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars cat>
              more_env: []
              words: [{<Id.Lit_Chars cat>}]
              do_fork: T
            )
          redirects: [
            (Redir
              op: <Id.Redir_DLess "<<">
              loc: (redir_loc.Fd fd:0)
              arg: 
                (redir_param.HereDoc
                  here_begin: {<Id.Lit_Chars EOF1>}
                  here_end_tok: <Id.Undefined_Tok "EOF1\n">
                  stdin_parts: [<Id.Lit_Chars "PIPE A1\n"> <Id.Lit_Chars "PIPE A2\n">]
                )
            )
          ]
        )
        (command.Redirect
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars tac>
              more_env: []
              words: [{<Id.Lit_Chars tac>}]
              do_fork: T
            )
          redirects: [
            (Redir
              op: <Id.Redir_DLess "<<">
              loc: (redir_loc.Fd fd:0)
              arg: 
                (redir_param.HereDoc
                  here_begin: {<Id.Lit_Chars EOF2>}
                  here_end_tok: <Id.Undefined_Tok "EOF2\n">
                  stdin_parts: [<Id.Lit_Chars "PIPE B1\n"> <Id.Lit_Chars "PIPE B2\n">]
                )
            )
          ]
        )
      ]
      ops: [<Id.Op_Pipe "|">]
    )
  ]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit_Chars cat>}]
      do_fork: T
    )
  redirects: [
    (Redir
      op: <Id.Redir_DLess "<<">
      loc: (redir_loc.Fd fd:0)
      arg: 
        (redir_param.HereDoc
          here_begin: {<Id.Lit_Chars EOF>}
          here_end_tok: <Id.Undefined_Tok "EOF\n">
          stdin_parts: [($ v) <Id.Lit_Chars "\n"> <Id.Right_DoubleQuote "\""> <Id.Lit_Chars "two\n">]
        )
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {
      (CommandSub
        left_token: <Id.Left_DollarParen "$(">
        child: 
          (command.Simple
            blame_tok: <Id.Lit_Chars echo>
            more_env: [..]
            words: [
              {<Id.Lit_Chars echo>}
              {
                (word_part.ArithSub
                  left: <Id.Left_DollarDParen "$((">
                  anode: 
                    (arith_expr.Binary
                      op: <Id.Arith_Star "*">
                      left: {<Id.Lit_Digits 1>}
                      right: 
                        (arith_expr.Binary
                          op: <Id.Arith_Plus "+">
                          left: {<Id.Lit_Digits 2>}
                          right: {<Id.Lit_Digits 3>}
                        )
                    )
                  right: <Id.Right_DollarDParen ")">
                )
              }
            ]
            do_fork: T
          )
        right: <Id.Eof_RParen ")">
      )
    }
  ]
  do_fork: T
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [
            {<Id.Lit_Chars echo>}
            {
              (word_part.ArithSub
                left: <Id.Left_DollarDParen "$((">
                anode: 
                  (arith_expr.Binary
                    op: <Id.Arith_Star "*">
                    left: {<Id.Lit_Digits 1>}
                    right: 
                      (arith_expr.Binary
                        op: <Id.Arith_Plus "+">
                        left: {<Id.Lit_Digits 2>}
                        right: {<Id.Lit_Digits 3>}
                      )
                  )
                right: <Id.Right_DollarDParen ")">
              )
            }
          ]
          do_fork: T
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {
      (CommandSub
        left_token: <Id.Left_DollarParen "$(">
        child: 
          (command.Simple
            blame_tok: <Id.Lit_Chars echo>
            more_env: []
            words: [
              {<Id.Lit_Chars echo>}
              {
                (word_part.ArithSub
                  left: <Id.Left_DollarDParen "$((">
                  anode: 
                    (arith_expr.Binary
                      op: <Id.Arith_Plus "+">
                      left: {<Id.Lit_Digits 1>}
                      right: {<Id.Lit_Digits 2>}
                    )
                  right: <Id.Right_DollarDParen ")">
                )
              }
            ]
            do_fork: T
          )
        right: <Id.Eof_RParen ")">
      )
    }
  ]
  do_fork: T
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [
            {<Id.Lit_Chars echo>}
            {
              (word_part.ArithSub
                left: <Id.Left_DollarDParen "$((">
                anode: 
                  (arith_expr.Binary
                    op: <Id.Arith_Plus "+">
                    left: {<Id.Lit_Digits 1>}
                    right: {<Id.Lit_Digits 2>}
                  )
                right: <Id.Right_DollarDParen ")">
              )
            }
          ]
          do_fork: T
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [
        {<Id.Lit_Chars echo>}
        {
          (CommandSub
            left_token: <Id.Left_DollarParen "$(">
            child: 
              (command.ShAssignment
                left: <Id.Lit_VarLike "array=">
                pairs: [
                  (AssignPair
                    left: <Id.Lit_VarLike "array=">
                    lhs: (sh_lhs.Name left:<Id.Lit_VarLike "array="> name:array)
                    op: assign_op.Equal
                    rhs: 
                      {
                        (ShArrayLiteral
                          left: <Id.Op_LParen "(">
                          words: [{<Id.Lit_Cha..rs a>} {<Id.Lit_Chars b>} {<Id.Lit_Chars c>}]
                          right: <Id.Right_ShArrayLiteral ")">
                        )
                      }
                  )
                ]
              )
            right: <Id.Eof_RParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.ShAssignment
          left: <Id.Lit_VarLike "array=">
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike "array=">
              lhs: (sh_lhs.Name left:<Id.Lit_VarLike "array="> name:array)
              op: assign_op.Equal
              rhs: 
                {
                  (ShArrayLiteral
                    left: <Id.Op_LParen "(">
                    words: [{<Id.Lit_Chars a>} {<Id.Lit_Chars b>} {<Id.Lit_Chars c>}]
                    right: <Id.Right_ShArrayLiteral ")">
                  )
                }
            )
          ]
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Left_DollarParen "$(">
      more_env: []
      words: [
        {
          (CommandSub
            left_token: <Id.Left_DollarParen "$(">
            child: 
              (command.Case
                case_kw: <Id.KW_Case case>
                to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
                arms_start: <Id.KW_In in>
                arms: [
                  (CaseArm
                    left: <Id.Op_LParen "(">
                    pattern: (pat.Words words:[{<Id.Lit_Chars one>}])
                    middle: <Id.Right_CasePat ")">
                    action: [
                      (command.Simple
                        blame_tok: <Id.Lit_Chars echo>
                        more_env: []
                        words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                        do_fork: T
                      )
                    ]
                    right: <Id.Op_DSemi ";;">
                  )
                ]
                arms_end: <Id.KW_Esac esac>
              )
            right: <Id.Eof_RParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.Case
          case_kw: <Id.KW_Case case>
          to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
          arms_start: <Id.KW_In in>
          arms: [
            (CaseArm
              left: <Id.Op_LParen "(">
              pattern: (pat.Words words:[{<Id.Lit_Chars one>}])
              middle: <Id.Right_CasePat ")">
              action: [
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_fork: T
                )
              ]
              right: <Id.Op_DSemi ";;">
            )
          ]
          arms_end: <Id.KW_Esac esac>
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [
        {<Id.Lit_Chars echo>}
        {
          (CommandSub
            left_token: <Id.Left_DollarParen "$(">
            child: 
              (command.Case
                case_kw: <Id.KW_Case case>
                to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
                arms_start: <Id.KW_In in>
                arms: [
                  (CaseArm
                    left: <Id.Lit_Chars one>
                    pattern: (pat.Words words:[{<Id.Lit_Chars one>}])
                    middle: <Id.Right_CasePat ")">
                    action: [
                      (command.Simple
                        blame_tok: <Id.Lit_Chars echo>
                        more_env: []
                        words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars comsub>}]
                        do_fork: T
                      )
                   .. ]
                    right: <Id.Op_DSemi ";;">
                  )
                ]
                arms_end: <Id.KW_Esac esac>
              )
            right: <Id.Eof_RParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [
        {<Id.Lit_Chars echo>}
        {
          (CommandSub
            left_token: <Id.Left_DollarParen "$(">
            child: 
              (command.CommandList
                children: [
                  (command.Case
                    case_kw: <Id.KW_Case case>
                    to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
                    arms_start: <Id.KW_In in>
                    arms: [
                      (CaseArm
                        left: <Id.Lit_Chars one>
                        pattern: (pat.Words words:[{<Id.Lit_Chars one>}])
                        middle: <Id.Right_CasePat ")">
                        action: [
                          (command.Simple
                            blame_tok: <Id.Lit_Chars echo>
                            more_env: []
                            words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars comsub1>}]
                            do_fork: T
                          )
                        ]
                        right: <Id.Op_DSemi ";;">
                      )
                    ]
                    arms_end: <Id.KW_Esac esac>
                  )
                  (command.Case
                    case_kw: <Id.KW_Case case>
                    to_match: (case_arg.Word w:{<Id.Lit_Chars bar>})
                    arms_start: <Id.KW_In in>
                    arms: [
                      (CaseArm
                        left: <Id.Lit_Chars two>
                        pattern: (pat.Words words:[{<Id.Lit_Chars two>}])
                        middle: <Id.Right_CasePat ")">
                        action: [
                          (command.Simple
                            blame_tok: <Id.Lit_Chars echo>
                            more_env: []
                            words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars comsub2>}]
                            do_fork: T
                          )
                        ]
                        right: <Id.Op_DSemi ";;">
                      )
                    ]
                    arms_end: <Id.KW_Esac esac>
                  )
                ]
              )
            right: <Id.Eof_RParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {
      (DQ <Id.Lit_Chars "double "> 
        (CommandSub
          left_token: <Id.Left_DollarParen "$(">
          child: 
            (command.Simple
              blame_tok: <Id.Lit_Chars echo>
              more_env: []
              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
              do_fork: T
            )
          right: <Id.Eof_RParen ")">
        ) <Id.Lit_Chars " quoted">
      )
    }
    {<Id.Lit_Chars two>}
  ]
  do_fork: T
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars one>}]
          do_fork: T
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Sentence
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [
            {<Id.Lit_Chars echo>}
            {
              (CommandSub
                left_token: <Id.Left_DollarParen "$(">
                child: 
                  (command.Case
                    case_kw: <Id.KW_Case case>
                    to_match: (case_arg.Word w:{<Id.Lit_Chars one>})
                    arms_start: <Id.KW_In in>
                    arms: [
                      (CaseArm
                        left: <Id.Left_DollarParen "$(">
                        pattern: 
       ..                   (pat.Words
                            words: [
                              {
                                (CommandSub
                                  left_token: <Id.Left_DollarParen "$(">
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_Chars echo>
                                      more_env: []
                                      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars one>}]
                                      do_fork: T
                                    )
                                  right: <Id.Eof_RParen ")">
                                )
                              }
                            ]
                          )
                        middle: <Id.Right_CasePat ")">
                        action: [
                          (command.Simple
                            blame_tok: <Id.Lit_Chars echo>
                            more_env: []
                            words: [
                              {<Id.Lit_Chars echo>}
                              {
                                (CommandSub
                                  left_token: <Id.Left_DollarParen "$(">
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_Chars comsub>
                                      more_env: []
                                      words: [{<Id.Lit_Chars comsub>}]
                                      do_fork: T
                                    )
                                  right: <Id.Eof_RParen ")">
                                )
                              }
                            ]
                            do_fork: T
                          )
                        ]
                        right: <Id.Op_DSemi ";;">
                      )
                    ]
                    arms_end: <Id.KW_Esac esac>
                  )
                right: <Id.Eof_RParen ")">
              )
            }
          ]
          do_fork: T
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars two>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.Case
          case_kw: <Id.KW_Case case>
          to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
          arms_start: <Id.KW_In in>
          arms: []
          arms_end: <Id.KW_Esac esac>
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Left_DollarParen "$(">
      more_env: []
      words: [
        {
          (CommandSub
            left_token: <Id.Left_DollarParen "$(">
            child: 
              (command.ForExpr
                keyword: <Id.KW_For for>
                init: 
                  (arith_expr.BinaryAssign
                    op_id: Id.Arith_Equal
                    left: <Id.Lit_ArithVarLike i>
                    right: {<Id.Lit_Digits 0>}
                  )
                cond: 
                  (arith_expr.Binary
                    op: <Id.Arith_Less "<">
                    left: <Id.Lit_ArithVarLike i>
                    right: {<Id.Lit_Digits 3>}
                  )
                update: (arith_expr.UnaryAssign op_id:Id.Arith_DPlus child:<Id.Lit_ArithVarLike i>)
                body: 
                  (command.DoGroup
                    left: <Id.KW_Do do>
                    children: [
                      (command.Simple
                        blame_tok: <Id.Lit_Chars echo>
                        more_env: []
                        words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                        do_fork: T
                      )
                    ]
                    right: <Id.KW_Done done>
                  )
              )
      ...      right: <Id.Eof_RParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.ForExpr
          keyword: <Id.KW_For for>
          init: 
            (arith_expr.BinaryAssign
              op_id: Id.Arith_Equal
              left: <Id.Lit_ArithVarLike i>
              right: {<Id.Lit_Digits 0>}
            )
          cond: 
            (arith_expr.Binary
              op: <Id.Arith_Less "<">
              left: <Id.Lit_ArithVarLike i>
              right: {<Id.Lit_Digits 3>}
            )
          update: (arith_expr.UnaryAssign op_id:Id.Arith_DPlus child:<Id.Lit_ArithVarLike i>)
          body: 
            (command.DoGroup
              left: <Id.KW_Do do>
              children: [
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_fork: T
                )
              ]
              right: <Id.KW_Done done>
            )
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {
      (word_part.ArithSub
        left: <Id.Left_DollarDParen "$((">
        anode: 
          (arith_expr.BinaryAssign
            op_id: Id.Arith_Equal
            left: 
              (arith_expr.Binary
                op: <Id.Arith_LBracket "[">
                left: <Id.Lit_ArithVarLike a>
                right: 
                  (arith_expr.Binary
                    op: <Id.Arith_Star "*">
                    left: {<Id.Lit_Digits 1>}
                    right: 
                      (arith_expr.Binary
                        op: <Id.Arith_Plus "+">
                        left: {<Id.Lit_Digits 2>}
                        right: {<Id.Lit_Digits 3>}
                      )
                  )
              )
            right: <Id.Lit_ArithVarLike x>
          )
        right: <Id.Right_DollarDParen ")">
      )
    }
  ]
  do_fork: T
)(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {
      (CommandSub
        left_token: <Id.Left_DollarParen "$(">
        child: 
          (command.Simple
            blame_tok: <Id.Lit_Chars one>
            more_env: []
            words: [
              {<Id.Lit_Chars one> 
                (CommandSub
                  left_token: <Id.Left_DollarParen "$(">
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars echo>
                      more_env: []
                      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars two>}]
                      do_fork: T
                    )
                  right: <Id.Eof_RParen ")">
                ) <Id.Lit_Chars one>
              }
            ]
            do_fork: T
          )
        right: <Id.Eof_RParen ")">
      )
    }
    {<Id.Lit_Chars three>}
  ]
  do_fork: T
)(BraceGroup
  left: <Id.Lit_LBrace "{">
  children: [
    (command.Sentence
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars cd>
          more_env: []
          words: [{<Id.Lit_Chars cd>} {<Id.Lit_Slash />}]
          do_fork: T
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Sentence
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars PWD>}]
          do_fork: T
        )
      terminator: <Id.Op_Semi ";">
    )
  ]
  right: <Id.Lit_RBrace "}">
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (BraceGroup
          left: <Id.Lit_LBrace "{">
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars cd>
                  more_env: []
                  words: [{<Id.Lit_Chars cd>} {<Id.Lit_Slash />}]
                  do_fork: T
      ..          )
              terminator: <Id.Op_Semi ";">
            )
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars PWD>}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
          right: <Id.Lit_RBrace "}">
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars PWD>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.Subshell
          left: <Id.Op_LParen "(">
          child: 
            (command.CommandList
              children: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars cd>
                      more_env: []
                      words: [{<Id.Lit_Chars cd>} {<Id.Lit_Slash />}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars PWD>} {<Id.Lit_Chars 1>}]
                  do_fork: T
                )
              ]
            )
          right: <Id.Right_Subshell ")">
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars PWD>} {<Id.Lit_Chars 2>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [
        {<Id.Lit_Chars echo>}
        {
          (CommandSub
            left_token: <Id.Left_DollarParen "$(">
            child: 
              (command.CommandList
                children: [
                  (command.Sentence
                    child: 
                      (command.ShFunction
                        name_tok: <Id.Lit_Chars fun>
                        name: fun
                        body: 
                          (BraceGroup
                            left: <Id.Lit_LBrace "{">
                            children: [
                              (command.Sentence
                                child: 
                                  (command.Simple
                                    blame_tok: <Id.Lit_Chars echo>
                                    more_env: []
                                    words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                                    do_fork: T
                                  )
                                terminator: <Id.Op_Semi ";">
                              )
                            ]
                            right: <Id.Lit_RBrace "}">
                          )
                      )
                    terminator: <Id.Op_Semi ";">
                  )
                  (command.Simple
                    blame_tok: <Id.Lit_Chars fun>
                    more_env: []
                    words: [{<Id.Lit_Chars fun>}]
                    do_fork: T
                  )
                ]
              )
            right: <Id.Eof_RParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.CommandList
          children: [
            (command.Sentence
              child: 
                (command.ShFunction
                  name_tok: <Id.Lit_Chars fun>
                  name: fun
                  body: 
                    (BraceGroup
                      left: <Id.Lit_LBrace "{">
                      children: [
                        (command.Sentence
                          child: 
              ..              (command.Simple
                              blame_tok: <Id.Lit_Chars echo>
                              more_env: []
                              words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi ";">
                        )
                      ]
                      right: <Id.Lit_RBrace "}">
                    )
                )
              terminator: <Id.Op_Semi ";">
            )
            (command.Simple
              blame_tok: <Id.Lit_Chars fun>
              more_env: []
              words: [{<Id.Lit_Chars fun>}]
              do_fork: T
            )
          ]
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars one>}]
          do_fork: T
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Sentence
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [
            {<Id.Lit_Chars echo>}
            {
              (CommandSub
                left_token: <Id.Left_DollarParen "$(">
                child: 
                  (command.CommandList
                    children: [
                      (command.Sentence
                        child: 
                          (command.Subshell
                            left: <Id.Op_LParen "(">
                            child: 
                              (command.CommandList
                                children: [
                                  (command.Sentence
                                    child: 
                                      (command.Simple
                                        blame_tok: <Id.Lit_Chars cd>
                                        more_env: []
                                        words: [{<Id.Lit_Chars cd>} {<Id.Lit_Slash />}]
                                        do_fork: T
                                      )
                                    terminator: <Id.Op_Semi ";">
                                  )
                                  (command.Simple
                                    blame_tok: <Id.Lit_Chars echo>
                                    more_env: []
                                    words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars subshell_PWD>}]
                                    do_fork: T
                                  )
                                ]
                              )
                            right: <Id.Right_Subshell ")">
                          )
                        terminator: <Id.Op_Semi ";">
                      )
                      (command.Simple
                        blame_tok: <Id.Lit_Chars echo>
                        more_env: []
                        words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars comsub_PWD>}]
                        do_fork: T
                      )
                    ]
                  )
                right: <Id.Eof_RParen ")">
              )
            }
          ]
          do_fork: T
        )
      terminator: <Id.Op_Semi ";">
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars two>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Left_DollarParen "$(">
      more_env: []
      words: [
        {
          (CommandSub
            left_token: <Id.Left_DollarParen "$(">
            child: 
              (command.Case
                case_kw: <Id.KW_Case case>
                to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
                arms_start: <Id.KW_In in>
                arms: [
                  (CaseArm
                    left: <Id.Lit_Chars one>
                    pattern: (pat.Words words:[{<Id.Lit_Chars one>}])
      ......  errcmd=( "${SETUP_STATE[$err.cmd]}" )
                              ^
"<cmd_parse_test>":1: Unexpected token while parsing arithmetic: '.'
              middle: <Id.Right_CasePat ")">
                    action: [
                      (command.Simple
                        blame_tok: <Id.Lit_Chars echo>
                        more_env: []
                        words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                        do_fork: T
                      )
                    ]
                    right: <Id.Op_DSemi ";;">
                  )
                ]
                arms_end: <Id.KW_Esac esac>
              )
            right: <Id.Eof_RParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.Case
          case_kw: <Id.KW_Case case>
          to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
          arms_start: <Id.KW_In in>
          arms: [
            (CaseArm
              left: <Id.Lit_Chars one>
              pattern: (pat.Words words:[{<Id.Lit_Chars one>}])
              middle: <Id.Right_CasePat ")">
              action: [
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_fork: T
                )
              ]
              right: <Id.Op_DSemi ";;">
            )
          ]
          arms_end: <Id.KW_Esac esac>
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {<Id.Lit_Chars ab> 
      (CommandSub
        left_token: <Id.Left_DollarParen "$(">
        child: 
          (command.Simple
            blame_tok: <Id.Lit_Chars echo>
            more_env: []
            words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
            do_fork: T
          )
        right: <Id.Eof_RParen ")">
      ) <Id.Lit_Chars cd>
    }
    {<Id.Lit_Chars ef>}
  ]
  do_fork: T
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.DBracket
          left: <Id.KW_DLeftBracket "[[">
          expr: 
            (bool_expr.Unary
              op_id: Id.BoolUnary_n
              child: 
                {
                  (DQ 
                    (BracedVarSub
                      left: <Id.Left_DollarBrace "${">
                      token: <Id.VSub_Name marks>
                      var_name: marks
                      bracket_op: 
                        (bracket_op.ArrayIndex
                          expr: 
                            {(${ Id.VSub_Name tag_marker) <Id.Lit_Digits 002> 
                              (${ Id.VSub_Name cons_ptr)
                            }
                        )
                      right: <Id.Right_DollarBrace "}">
                    )
                  )
                }
            )
          right: <Id.Lit_DRightBracket "]]">
        )
      terminator: <Id.Op_Semi ";">
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [
        {<Id.Lit_Chars echo>}
        {
          (word_part.ArithSub
            left: <Id.Left_DollarDParen "$((">
            anode: {<Id.Lit_Digits 0> <Id.Lit_ArithVarLike x> ($ foo)}
            right: <Id.Right_DollarDParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike "errcmd=">
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike "errcmd=">
          lhs: (sh_lhs.Name left:<Id.Lit_VarLike "errcmd="> name:errcmd)
          op: assign_op.Equal
          rhs: 
            {
              (ShArrayLiteral
                left: <Id.Op_LParen "(">
                words: [
                  {
                    (DQ 
                      (BracedVarSub
                        left: <Id.Left_DollarBrace "${">
                        token: <Id.VSub_Name SETUP_STATE>
                        var_name: SETUP_STATE
                        bracket_op: (bracket_op....ArrayIndex expr:{(DQ ($ err) <Id.Lit_Chars .cmd>)})
                        right: <Id.Right_DollarBrace "}">
                      )
                    )
                  }
                ]
                right: <Id.Right_ShArrayLiteral ")">
              )
            }
        )
      ]
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [
        {<Id.Lit_Chars echo>}
        {
          (CommandSub
            left_token: <Id.Left_DollarParen "$(">
            child: (command__NoOp)
            right: <Id.Eof_RParen ")">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [
        {<Id.Lit_Chars echo>}
        {
          (CommandSub
            left_token: <Id.Left_Backtick "`">
            child: (command__NoOp)
            right: <Id.Backtick_Right "`">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars cmd>
      more_env: []
      words: [
        {<Id.Lit_Chars cmd>}
        {<Id.Lit_Chars flag>}
        {
          (CommandSub
            left_token: <Id.Left_Backtick "`">
            child: (command__NoOp)
            right: <Id.Backtick_Right "`">
          )
        }
        {<Id.Lit_Chars flag2>}
      ]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike "FOO=">
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike "FOO=">
          lhs: (sh_lhs.Name left:<Id.Lit_VarLike "FOO="> name:FOO)
          op: assign_op.Equal
          rhs: 
            {(DQ <Id.Lit_Chars bar>) 
              (CommandSub
                left_token: <Id.Left_Backtick "`">
                child: (command__NoOp)
                right: <Id.Backtick_Right "`">
              ) (DQ <Id.Lit_Chars baz>)
            }
        )
      ]
    )
  ]
)(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars "true">
                      more_env: []
                      words: [{<Id.Lit_Chars "true">}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Subshell
              left: <Id.Op_LParen "(">
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_fork: T
                )
              right: <Id.Right_Subshell ")">
            )
          ]
          then_tok: <Id.KW_Then then>
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
    )
  ]
)(command.CommandList
  children: [
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars "true">
                  more_env: []
                  words: [{<Id.Lit_Chars "true">}]
                  do_fork: T
                )
              terminator: <Id.Op_Semi ";">
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (BraceGroup
              left: <Id.Lit_LBrace "{">
              children: [
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_for.k: T
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Break break>)
              ]
              right: <Id.Lit_RBrace "}">
            )
          ]
          right: <Id.KW_Done done>
        )
    )
  ]
)(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars "true">
                      more_env: []
                      words: [{<Id.Lit_Chars "true">}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Subshell
              left: <Id.Op_LParen "(">
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Chars echo>
                  more_env: []
                  words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                  do_fork: T
                )
              right: <Id.Right_Subshell ")">
            )
          ]
          then_tok: <Id.KW_Then then>
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
    )
  ]
)(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_Chars "true">
                      more_env: []
                      words: [{<Id.Lit_Chars "true">}]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi ";">
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_Chars "true">
                              more_env: []
                              words: [{<Id.Lit_Chars "true">}]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi ";">
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <Id.Lit_Chars echo>
                      more_env: []
                      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
                      do_fork: T
                    )
                  ]
                  then_tok: <Id.KW_Then then>
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
            )
          ]
          then_tok: <Id.KW_Then then>
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
    )
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Subshell
      left: <Id.Op_LParen "(">
      child: 
        (command.AndOr
          children: [
            (command.Simple
              blame_tok: <Id.Lit_Chars cd>
              more_env: []
              words: [{<Id.Lit_Chars cd>} {(DQ ($ PACKDIR))}]
              do_fork: T
            )
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [e]
              iterable: (for_iter.Words words:[{($ existing)}])
         ...     body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Case
                      case_kw: <Id.KW_Case case>
                      to_match: 
                        (case_arg.Word
                          w: {(DQ <Id.Lit_Chars " "> ($ fullbases) <Id.Lit_Chars " ">)}
                        )
                      arms_start: <Id.KW_In in>
                      arms: [
                        (CaseArm
                          left: <Id.Lit_Star "*">
                          pattern: 
                            (pat.Words
                              words: [
                                {<Id.Lit_Star "*"> (DQ <Id.Lit_Chars " "> ($ e) <Id.Lit_Chars " ">) 
                                  <Id.Lit_Star "*">
                                }
                              ]
                            )
                          middle: <Id.Right_CasePat ")">
                          action: []
                          right: <Id.Op_DSemi ";;">
                        )
                        (CaseArm
                          left: <Id.Lit_Star "*">
                          pattern: (pat.Words words:[{<Id.Lit_Star "*">}])
                          middle: <Id.Right_CasePat ")">
                          action: [
                            (command.Simple
                              blame_tok: <Id.Lit_Chars rm>
                              more_env: []
                              words: [
                                {<Id.Lit_Chars rm>}
                                {<Id.Lit_Chars -f>}
                                {(DQ ($ e) <Id.Lit_Chars .pack>)}
                                {(DQ ($ e) <Id.Lit_Chars .idx>)}
                                {(DQ ($ e) <Id.Lit_Chars .keep>)}
                              ]
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi ";;">
                        )
                      ]
                      arms_end: <Id.KW_Esac esac>
                    )
                  ]
                  right: <Id.KW_Done done>
                )
            )
          ]
          ops: [<Id.Op_DAmp "&&">]
        )
      right: <Id.Right_Subshell ")">
    )
  ]
)(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars .>
          more_env: []
          words: [
            {<Id.Lit_Chars .>}
            {(DQ ($ TEST_DIRECTORY)) <Id.Lit_Slash /> <Id.Lit_Chars diff-lib.sh>}
          ]
          do_fork: T
        )
      terminator: <Id.Op_Semi ";">
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars foo> <Id.Lit_Pound "#"> <Id.Lit_Chars bar>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
  ]
)(command.Case
  case_kw: <Id.KW_Case case>
  to_match: (case_arg.Word w:{(DQ ($ fd) <Id.Lit_Chars ","> ($ command))})
  arms_start: <Id.KW_In in>
  arms: [
    (CaseArm
      left: <Id.Lit_Chars 3>
      pattern: 
        (pat.Words
          words: [
            {<Id.Lit_Chars 3> <Id.Lit_Comma ","> <Id.Lit_Pound "#"> <Id.Lit_Star "*">}
            {<Id.Lit_Chars 3> <Id.Lit_Comma ",">}
          ]
        )
      middle: <Id.Right_CasePat ")">
      action: []
      right: <Id.Op_DSemi ";;">
    )
  ]
  arms_end: <Id.KW_Esac esac>
)(command.CommandList
  children: [
    (command.Case
      case_kw: <Id.KW_Case case>
      to_match: (case_arg.Word w:{<Id.Lit_Chars foo>})
      arms_start: <Id.KW_In in>
      arms: [
        (CaseArm
          left: <Id.Left_Dol.........larSingleQuote "$'">
          pattern: 
            (pat.Words
              words: [
                {
                  (SingleQuoted
                    left: <Id.Left_DollarSingleQuote "$'">
                    sval: "'"
                    right: <Id.Right_SingleQuote "'">
                  )
                }
              ]
            )
          middle: <Id.Right_CasePat ")">
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike "ret+=">
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike "ret+=">
                  lhs: (sh_lhs.Name left:<Id.Lit_VarLike "ret+="> name:ret)
                  op: assign_op.PlusEqual
                  rhs: 
                    {(DQ (word_part.EscapedLiteral token:<Id.Lit_EscapedChar "\\\\"> ch:"\\")) 
                      (word_part.EscapedLiteral
                        token: <Id.Lit_EscapedChar "\\'">
                        ch: "'"
                      )
                    }
                )
              ]
            )
          ]
          right: <Id.Op_DSemi ";;">
        )
      ]
      arms_end: <Id.KW_Esac esac>
    )
  ]
)(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Left_DollarSingleQuote "$'">
      more_env: []
      words: [
        {
          (SingleQuoted
            left: <Id.Left_DollarSingleQuote "$'">
            sval: "abc\ndef"
            right: <Id.Right_SingleQuote "'">
          )
        }
      ]
      do_fork: T
    )
  ]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars echo>
      more_env: []
      words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}]
      do_fork: T
    )
  redirects: [
    (Redir op:<Id.Redir_Clobber ">|"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars clobbered.txt>})
  ]
)(Redir op:<Id.Redir_GreatAnd "1>&"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars 2>})(Redir
  op: <Id.Redir_DLess "<<">
  loc: (redir_loc.Fd fd:0)
  arg: (redir_param.HereDoc here_begin:{<Id.Lit_Chars EOF>} stdin_parts:[])
)(Redir
  op: <Id.Redir_DLessDash "<<-">
  loc: (redir_loc.Fd fd:0)
  arg: (redir_param.HereDoc here_begin:{<Id.Lit_Chars EOF>} stdin_parts:[])
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit_Chars cat>}]
      do_fork: T
    )
  redirects: [
    (Redir
      op: <Id.Redir_DLess "<<">
      loc: (redir_loc.Fd fd:0)
      arg: 
        (redir_param.HereDoc
          here_begin: {<Id.Lit_Chars EOF>}
          here_end_tok: <Id.Undefined_Tok "EOF\n">
          stdin_parts: [<Id.Lit_Chars "hi\n">]
        )
    )
    (Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars out.txt>})
  ]
)(Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars out.txt>})(Redir
  op: <Id.Redir_DLess "<<">
  loc: (redir_loc.Fd fd:0)
  arg: (redir_param.HereDoc here_begin:{<Id.Lit_Chars EOF>} stdin_parts:[])
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit_Chars cat>}]
      do_fork: T
    )
  redirects: [
    (Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars out.txt>})
    (Redir op:<Id.Redir_GreatAnd "1>&"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars 2>})
  ]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars cat>
      more_env: []
      words: [{<Id.Lit_Chars cat>}]
      do_fork: T
    )
  redirects: [(Redir op:<Id.Redir_LessAnd "<&"> loc:(redir_loc.Fd fd:0) arg:{<Id.Lit_Chars 3>})]
)(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike "ONE=">
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike "ONE=">
          lhs: (sh_lhs.Name left:<Id.Lit_VarLike "ONE="> name:ONE)
          op: assign_op.Equal
          rhs: {<Id.Lit_Chars 1>}
        )
        (AssignPair
          left: <Id.Lit_VarLike "TWO=">
          lhs: (sh_lhs.Name left:<Id.Lit_VarLike "TWO="> name:TWO)
          op: assign_op.Equal
          rhs: {<Id.Lit_Chars 2>}
        )
   ......
----------------------------------------------------------------------
Ran 83 tests in 0.193s

OK
   ]
    )
  ]
)(command.CommandList
  children: [
    (command.Redirect
      child: (command__NoOp)
      redirects: [(Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars out.txt>})]
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars echo>
  more_env: []
  words: [
    {<Id.Lit_Chars echo>}
    {(DQ <Id.Lit_Chars one>) <Id.Lit_Chars two>}
    {(DQ <Id.Lit_Chars three>) (DQ <Id.Lit_Chars four>)}
    {<Id.Lit_Chars five>}
  ]
  do_fork: T
)(command.CommandList
  children: [
    (command.Redirect
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars env>
          more_env: [
            (EnvPair
              left: <Id.Lit_VarLike "PYTHONPATH=">
              name: PYTHONPATH
              val: {<Id.Lit_Chars .>}
            )
          ]
          words: [{<Id.Lit_Chars env>}]
          do_fork: T
        )
      redirects: [(Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars out.txt>})]
    )
  ]
)(command.CommandList
  children: [
    (command.Redirect
      child: 
        (command.Simple
          blame_tok: <Id.Lit_Chars echo>
          more_env: []
          words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars 1>} {<Id.Lit_Chars 2>} {<Id.Lit_Chars 3>}]
          do_fork: T
        )
      redirects: [(Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars out.txt>})]
    )
  ]
)(command.Simple
  blame_tok: <Id.Lit_Chars ls>
  more_env: []
  words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
  do_fork: T
)(command.Simple
  blame_tok: <Id.Lit_Chars ls>
  more_env: [(EnvPair left:<Id.Lit_VarLike "FOO="> name:FOO val:{<Id.Lit_Chars bar>})]
  words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
  do_fork: T
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: [
        (EnvPair left:<Id.Lit_VarLike "FOO="> name:FOO val:{<Id.Lit_Chars bar>})
        (EnvPair left:<Id.Lit_VarLike "SPAM="> name:SPAM val:{<Id.Lit_Chars eggs>})
      ]
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
  redirects: [(Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars output.txt>})]
)(command.Redirect
  child: 
    (command.Simple
      blame_tok: <Id.Lit_Chars ls>
      more_env: [
        (EnvPair left:<Id.Lit_VarLike "FOO="> name:FOO val:{<Id.Lit_Chars bar>})
        (EnvPair left:<Id.Lit_VarLike "SPAM="> name:SPAM val:{<Id.Lit_Chars eggs>})
      ]
      words: [{<Id.Lit_Chars ls>} {<Id.Lit_Chars foo>}]
      do_fork: T
    )
  redirects: [
    (Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars output.txt>})
    (Redir op:<Id.Redir_Great ">"> loc:(redir_loc.Fd fd:1) arg:{<Id.Lit_Chars output2.txt>})
  ]
)