ninja: no work to do.
---
skipping ysh/testdata/assign.osh
---
(command.CommandList
  children: [
    (command.ShFunction
      name_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: 
            (SourceLine
              line_num: 19
              content: "argv() {\n"
              src: (source.MainFile path:ysh/testdata/sigil-pairs.sh)
            )
        )
      name: argv
      body: 
        (BraceGroup
          left: (Token id:Id.Lit_LBrace length:1 col:7 line:...0x12ae)
          children: [
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 6
                  col: 2
                  line: 
                    (SourceLine
                      line_num: 20
                      content: "  python -c 'import sys;print(sys.argv[1:])' @ARGV\n"
                      src: ...0x1c5d
                    )
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x1266])
                (CompoundWord
                  parts: [(Token id:Id.Lit_Chars length:2 col:9 line:...0x126e)]
                )
                (CompoundWord
                  parts: [
                    (SingleQuoted
                      left: (Token id:Id.Left_SingleQuote length:1 col:12 line:...0x126e)
                      sval: "import sys;print(sys.argv[1:])"
                      right: (Token id:Id.Right_SingleQuote length:1 col:43 line:...0x126e)
                    )
                  ]
                )
                (CompoundWord
                  parts: [(Token id:Id.Lit_Splice length:5 col:45 line:...0x126e)]
                )
              ]
              is_last_cmd: F
            )
          ]
          right: 
            (Token
              id: Id.Lit_RBrace
              length: 1
              col: 0
              line: (SourceLine line_num:21 content:"}\n" src:...0x1c5d)
            )
        )
    )
    (command.ShFunction
      name_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:23 content:"show() {\n" src:...0x1c5d)
        )
      name: show
      body: 
        (BraceGroup
          left: (Token id:Id.Lit_LBrace length:1 col:7 line:...0x11ca)
          children: [
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 2
                  line: (SourceLine line_num:24 content:"  echo '====='\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x118a])
                (CompoundWord
                  parts: [
                    (SingleQuoted
                      left: (Token id:Id.Left_SingleQuote length:1 col:7 line:...0x1192)
                      sval: "====="
                      right: (Token id:Id.Right_SingleQuote length:1 col:13 line:...0x1192)
                    )
                  ]
                )
              ]
              is_last_cmd: F
            )
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 2
                  line: (SourceLine line_num:25 content:"  argv @ARGV\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x112e])
                (CompoundWord
                  parts: [(Token id:Id.Lit_Splice length:5 col:7 line:...0x1136)]
                )
              ]
              is_last_cmd: F
            )
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 2
                  line: (SourceLine line_num:26 content:"  echo\n" src:...0x1c5d)
                )
              more_env: []
              words: [(CompoundWord parts:[...0x10ee])]
              is_last_cmd: F
            )
          ]
          right: 
            (Token
              id: Id.Lit_RBrace
              length: 1
              col: 0
              line: (SourceLine line_num:27 content:"}\n" src:...0x1c5d)
            )
        )
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:30 content:"var strarray = %(\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:8 col:4 line:...0x1096) name:strarray)]
      rhs: 
        (ShArrayLiteral
          left: (Token id:Id.Left_PercentParen length:2 col:15 line:...0x1096)
          words: [
            (CompoundWord
              parts: [
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 4
                  line: 
                    (SourceLine
                      line_num: 31
                      content: "    bare words *.sh {a,b}@example.com 'sq' \"dq ${x:-default}\"\n"
                      src: ...0x1c5d
                    )
                )
              ]
            )
            (CompoundWord parts:[(Token id:Id.Lit_Chars length:5 col:9 line:...0x1006)])
            (CompoundWord
              parts: [
                (Token id:Id.Lit_Star length:1 col:15 line:...0x1006)
                (Token id:Id.Lit_Chars length:3 col:16 line:...0x1006)
              ]
            )
            (word.BracedTree
              parts: [
                (word_part.BracedTuple
                  words: [
                    (CompoundWord
                      parts: [(Token id:Id.Lit_Chars length:1 col:21 line:...0x1006)]
                    )
                    (CompoundWord
                      parts: [(Token id:Id.Lit_Chars length:1 col:23 line:...0x1006)]
                    )
                  ]
                )
                (Token id:Id.Lit_Splice length:8 col:25 line:...0x1006)
                (Token id:Id.Lit_Chars length:4 col:33 line:...0x1006)
              ]
            )
            (CompoundWord
              parts: [
                (SingleQuoted
                  left: (Token id:Id.Left_SingleQuote length:1 col:38 line:...0x1006)
                  sval: sq
                  right: (Token id:Id.Right_SingleQuote length:1 col:41 line:...0x1006)
                )
              ]
            )
            (CompoundWord
              parts: [
                (DoubleQuoted
                  left: (Token id:Id.Left_DoubleQuote length:1 col:43 line:...0x1006)
                  parts: [
                    (Token id:Id.Lit_Chars length:3 col:44 line:...0x1006)
                    (BracedVarSub
                      left: (Token id:Id.Left_DollarBrace length:2 col:47 line:...0x1006)
                      token: (Token id:Id.VSub_Name length:1 col:49 line:...0x1006)
                      var_name: x
                      suffix_op: 
                        (suffix_op.Unary
                          op: (Token id:Id.VTest_ColonHyphen length:2 col:50 line:...0x1006)
                          arg_word: 
                            (CompoundWord
                              parts: [(Token id:Id.Lit_Chars length:7 col:52 line:...0x1006)]
                            )
                        )
                      right: (Token id:Id.Right_DollarBrace length:1 col:59 line:...0x1006)
                    )
                  ]
                  right: (Token id:Id.Right_DoubleQuote length:1 col:60 line:...0x1006)
                )
              ]
            )
          ]
          right: 
            (Token
              id: Id.Right_ShArrayLiteral
              length: 1
              col: 0
              line: (SourceLine line_num:32 content:")\n" src:...0x1c5d)
            )
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:34 content:"show @strarray\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x19a2])
        (CompoundWord parts:[(Token id:Id.Lit_Splice length:9 col:5 line:...0x19a6)])
      ]
      is_last_cmd: F
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:36 content:"var cmd_sub = $(\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:7 col:4 line:...0x195a) name:cmd_sub)]
      rhs: 
        (CommandSub
          left_token: (Token id:Id.Left_DollarParen length:2 col:14 line:...0x195a)
          child: 
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 4
                  line: 
                    (SourceLine
                      line_num: 37
                      content: 
"    echo bare words *.sh {a,b}@example.com 'sq' \"dq ${x:-default}\"\n"
                      src: ...0x1c5d
                    )
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x18c2])
                (CompoundWord
                  parts: [(Token id:Id.Lit_Chars length:4 col:9 line:...0x18ca)]
                )
                (CompoundWord
                  parts: [(Token id:Id.Lit_Chars length:5 col:14 line:...0x18ca)]
                )
                (CompoundWord
                  parts: [
                    (Token id:Id.Lit_Star length:1 col:20 line:...0x18ca)
                    (Token id:Id.Lit_Chars length:3 col:21 line:...0x18ca)
                  ]
                )
                (word.BracedTree
                  parts: [
                    (word_part.BracedTuple
                      words: [
                        (CompoundWord
                          parts: [(Token id:Id.Lit_Chars length:1 col:26 line:...0x18ca)]
                        )
                        (CompoundWord
                          parts: [(Token id:Id.Lit_Chars length:1 col:28 line:...0x18ca)]
                        )
                      ]
                    )
                    (Token id:Id.Lit_Splice length:8 col:30 line:...0x18ca)
                    (Token id:Id.Lit_Chars length:4 col:38 line:...0x18ca)
                  ]
                )
                (CompoundWord
                  parts: [
                    (SingleQuoted
                      left: (Token id:Id.Left_SingleQuote length:1 col:43 line:...0x18ca)
                      sval: sq
                      right: (Token id:Id.Right_SingleQuote length:1 col:46 line:...0x18ca)
                    )
                  ]
                )
                (CompoundWord
                  parts: [
                    (DoubleQuoted
                      left: (Token id:Id.Left_DoubleQuote length:1 col:48 line:...0x18ca)
                      parts: [
                        (Token
                          id: Id.Lit_Chars
                          length: 3
                          col: 49
                          line: ...0x18ca
                        )
                        (BracedVarSub
                          left: (Token id:Id.Left_DollarBrace length:2 col:52 line:...0x18ca)
                          token: (Token id:Id.VSub_Name length:1 col:54 line:...0x18ca)
                          var_name: x
                          suffix_op: 
                            (suffix_op.Unary
                              op: (Token id:Id.VTest_ColonHyphen length:2 col:55 line:...0x18ca)
                              arg_word: 
                                (CompoundWord
                                  parts: [(Token id:Id.Lit_Chars length:7 col:57 line:...0x18ca)]
                                )
                            )
                          right: (Token id:Id.Right_DollarBrace length:1 col:64 line:...0x18ca)
                        )
                      ]
                      right: (Token id:Id.Right_DoubleQuote length:1 col:65 line:...0x18ca)
                    )
                  ]
                )
              ]
              is_last_cmd: F
            )
          right: 
            (Token
              id: Id.Eof_RParen
              length: 1
              col: 0
              line: (SourceLine line_num:38 content:")\n" src:...0x1c5d)
            )
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:40 content:"show $cmd_sub\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x179e])
        (CompoundWord
          parts: [(SimpleVarSub tok:(Token id:Id.VSub_DollarName length:8 col:5 line:...0x17a2))]
        )
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: 
            (SourceLine
              line_num: 42
              content: "show $['quoted ' ++ 'words ' ++ \"dq ${x:-default}\"]\n"
              src: ...0x1c5d
            )
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x1756])
        (CompoundWord
          parts: [
            (word_part.ExprSub
              left: (Token id:Id.Left_DollarBracket length:2 col:5 line:...0x175a)
              child: 
                (expr.Binary
                  op: (Token id:Id.Arith_DPlus length:2 col:29 line:...0x175a)
                  left: 
                    (expr.Binary
                      op: (Token id:Id.Arith_DPlus length:2 col:17 line:...0x175a)
                      left: 
                        (SingleQuoted
                          left: (Token id:Id.Left_SingleQuote length:1 col:7 line:...0x175a)
                          sval: "quoted "
                          right: (Token id:Id.Right_SingleQuote length:1 col:15 line:...0x175a)
                        )
                      right: 
                        (SingleQuoted
                          left: (Token id:Id.Left_SingleQuote length:1 col:20 line:...0x175a)
                          sval: "words "
                          right: (Token id:Id.Right_SingleQuote length:1 col:27 line:...0x175a)
                        )
                    )
                  right: 
                    (DoubleQuoted
                      left: (Token id:Id.Left_DoubleQuote length:1 col:32 line:...0x175a)
                      parts: [
                        (Token
                          id: Id.Lit_Chars
                          length: 3
                          col: 33
                          line: ...0x175a
                        )
                        (BracedVarSub
                          left: (Token id:Id.Left_DollarBrace length:2 col:36 line:...0x175a)
                          token: (Token id:Id.VSub_Name length:1 col:38 line:...0x175a)
                          var_name: x
                          suffix_op: 
                            (suffix_op.Unary
                              op: (Token id:Id.VTest_ColonHyphen length:2 col:39 line:...0x175a)
                              arg_word: 
                                (CompoundWord
                                  parts: [(Token id:Id.Lit_Chars length:7 col:41 line:...0x175a)]
                                )
                            )
                          right: (Token id:Id.Right_DollarBrace length:1 col:48 line:...0x175a)
                        )
                      ]
                      right: (Token id:Id.Right_DoubleQuote length:1 col:49 line:...0x175a)
                    )
                )
              right: (Token id:Id.Op_RBracket length:1 col:50 line:...0x175a)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
  ]
)
---
(command.CommandList
  children: [
    (command.ShAssignment
      left: 
        (Token
          id: Id.Lit_VarLike
          length: 11
          col: 0
          line: 
            (SourceLine
              line_num: 1
              content: "global_var=global\n"
              src: (source.MainFile path:ysh/testdata/no-dynamic-scope.osh)
            )
        )
      pairs: [
        (AssignPair
          left: ...0x13e6
          lhs: (sh_lhs.Name left:...0x13e6 name:global_var)
          op: assign_op.Equal
          rhs: (CompoundWord parts:[(Token id:Id.Lit_Chars length:6 col:11 line:...0x13ee)])
        )
      ]
    )
    (command.ShFunction
      name_tok: 
        (Token
          id: Id.Lit_Chars
          length: 1
          col: 0
          line: (SourceLine line_num:3 content:"g() {\n" src:...0x1c5d)
        )
      name: g
      body: 
        (BraceGroup
          left: (Token id:Id.Lit_LBrace length:1 col:4 line:...0x1396)
          children: [
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 5
                  col: 2
                  line: (SourceLine line_num:4 content:"  local g_var=f\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x134a])
                (CompoundWord
                  parts: [
                    (Token id:Id.Lit_VarLike length:6 col:8 line:...0x1352)
                    (Token id:Id.Lit_Chars length:1 col:14 line:...0x1352)
                  ]
                )
              ]
              is_last_cmd: F
            )
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 2
                  line: (SourceLine line_num:5 content:"  echo $g_var\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x1302])
                (CompoundWord
                  parts: [
                    (SimpleVarSub
                      tok: (Token id:Id.VSub_DollarName length:6 col:7 line:...0x130a)
                    )
                  ]
                )
              ]
              is_last_cmd: F
            )
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 2
                  line: (SourceLine line_num:6 content:"  echo $f_var\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x12be])
                (CompoundWord
                  parts: [
                    (SimpleVarSub
                      tok: (Token id:Id.VSub_DollarName length:6 col:7 line:...0x12c6)
                    )
                  ]
                )
              ]
              is_last_cmd: F
            )
            (command.VarDecl
              keyword: 
                (Token
                  id: Id.KW_Var
                  length: 3
                  col: 2
                  line: (SourceLine line_num:8 content:"  var oil_var = global_var\n" src:...0x1c5d)
                )
              lhs: [
                (NameType
                  left: (Token id:Id.Expr_Name length:7 col:6 line:...0x127e)
                  name: oil_var
                )
              ]
              rhs: 
                (expr.Var
                  left: (Token id:Id.Expr_Name length:10 col:16 line:...0x127e)
                  name: global_var
                )
            )
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 2
                  line: (SourceLine line_num:9 content:"  echo $oil_var\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x11ca])
                (CompoundWord
                  parts: [
                    (SimpleVarSub
                      tok: (Token id:Id.VSub_DollarName length:8 col:7 line:...0x11d2)
                    )
                  ]
                )
              ]
              is_last_cmd: F
            )
          ]
          right: 
            (Token
              id: Id.Lit_RBrace
              length: 1
              col: 0
              line: (SourceLine line_num:10 content:"}\n" src:...0x1c5d)
            )
        )
    )
    (command.ShFunction
      name_tok: 
        (Token
          id: Id.Lit_Chars
          length: 1
          col: 0
          line: (SourceLine line_num:12 content:"f() {\n" src:...0x1c5d)
        )
      name: f
      body: 
        (BraceGroup
          left: (Token id:Id.Lit_LBrace length:1 col:4 line:...0x1172)
          children: [
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 5
                  col: 2
                  line: (SourceLine line_num:13 content:"  local f_var=f\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x1132])
                (CompoundWord
                  parts: [
                    (Token id:Id.Lit_VarLike length:6 col:8 line:...0x113a)
                    (Token id:Id.Lit_Chars length:1 col:14 line:...0x113a)
                  ]
                )
              ]
              is_last_cmd: F
            )
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 2
                  line: (SourceLine line_num:14 content:"  echo $f_var\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x10ea])
                (CompoundWord
                  parts: [
                    (SimpleVarSub
                      tok: (Token id:Id.VSub_DollarName length:6 col:7 line:...0x10f2)
                    )
                  ]
                )
              ]
              is_last_cmd: F
            )
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 1
                  col: 2
                  line: (SourceLine line_num:15 content:"  g\n" src:...0x1c5d)
                )
              more_env: []
              words: [(CompoundWord parts:[...0x10aa])]
              is_last_cmd: F
            )
          ]
          right: 
            (Token
              id: Id.Lit_RBrace
              length: 1
              col: 0
              line: (SourceLine line_num:16 content:"}\n" src:...0x1c5d)
            )
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 1
          col: 0
          line: (SourceLine line_num:18 content:"f\n" src:...0x1c5d)
        )
      more_env: []
      words: [(CompoundWord parts:[...0x105a])]
      is_last_cmd: F
    )
  ]
)
---
(command.CommandList
  children: [
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: 
            (SourceLine
              line_num: 2
              content: "echo 'This is a shell script with OSH extensions!'\n"
              src: (source.MainFile path:ysh/testdata/hello.osh)
            )
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x13de])
        (CompoundWord
          parts: [
            (SingleQuoted
              left: (Token id:Id.Left_SingleQuote length:1 col:5 line:...0x13e2)
              sval: "This is a shell script with OSH extensions!"
              right: (Token id:Id.Right_SingleQuote length:1 col:49 line:...0x13e2)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:3 content:"echo\n" src:...0x1c5d)
        )
      more_env: []
      words: [(CompoundWord parts:[...0x1382])]
      is_last_cmd: F
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:5 content:"var x = 1 + 2*3\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:1 col:4 line:...0x1346) name:x)]
      rhs: 
        (expr.Binary
          op: (Token id:Id.Arith_Plus length:1 col:10 line:...0x1346)
          left: 
            (expr.Const
              c: (Token id:Id.Expr_DecInt length:1 col:8 line:...0x1346)
              val: (value.Int i:1)
            )
          right: 
            (expr.Binary
              op: (Token id:Id.Arith_Star length:1 col:13 line:...0x1346)
              left: 
                (expr.Const
                  c: (Token id:Id.Expr_DecInt length:1 col:12 line:...0x1346)
                  val: (value.Int i:2)
                )
              right: 
                (expr.Const
                  c: (Token id:Id.Expr_DecInt length:1 col:14 line:...0x1346)
                  val: (value.Int i:3)
                )
            )
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:7 content:"echo \"x: $x\"\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x125e])
        (CompoundWord
          parts: [
            (DoubleQuoted
              left: (Token id:Id.Left_DoubleQuote length:1 col:5 line:...0x1262)
              parts: [
                (Token id:Id.Lit_Chars length:3 col:6 line:...0x1262)
                (SimpleVarSub
                  tok: (Token id:Id.VSub_DollarName length:2 col:9 line:...0x1262)
                )
              ]
              right: (Token id:Id.Right_DoubleQuote length:1 col:11 line:...0x1262)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
    (command.Mutation
      keyword: 
        (Token
          id: Id.KW_SetVar
          length: 6
          col: 0
          line: (SourceLine line_num:10 content:"setvar x += 1   \n" src:...0x1c5d)
        )
      lhs: [(Token id:Id.Expr_Name length:1 col:7 line:...0x11f2 tval:x)]
      op: (Token id:Id.Arith_PlusEqual length:2 col:9 line:...0x11f2)
      rhs: (expr.Const c:(Token id:Id.Expr_DecInt length:1 col:12 line:...0x11f2) val:(value.Int i:1))
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:12 content:"echo \"x: $x\"\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x1122])
        (CompoundWord
          parts: [
            (DoubleQuoted
              left: (Token id:Id.Left_DoubleQuote length:1 col:5 line:...0x1126)
              parts: [
                (Token id:Id.Lit_Chars length:3 col:6 line:...0x1126)
                (SimpleVarSub
                  tok: (Token id:Id.VSub_DollarName length:2 col:9 line:...0x1126)
                )
              ]
              right: (Token id:Id.Right_DoubleQuote length:1 col:11 line:...0x1126)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:14 content:"var mylist = [1, 2, 3]\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:6 col:4 line:...0x10c6) name:mylist)]
      rhs: 
        (expr.List
          left: (Token id:Id.Op_LBracket length:1 col:13 line:...0x10c6)
          elts: [
            (expr.Const
              c: (Token id:Id.Expr_DecInt length:1 col:14 line:...0x10c6)
              val: (value.Int i:1)
            )
            (expr.Const
              c: (Token id:Id.Expr_DecInt length:1 col:17 line:...0x10c6)
              val: (value.Int i:2)
            )
            (expr.Const
              c: (Token id:Id.Expr_DecInt length:1 col:20 line:...0x10c6)
              val: (value.Int i:3)
            )
          ]
          ctx: expr_context.Store
        )
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:16 content:"var y = mylist[1] * 10\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:1 col:4 line:...0x19e6) name:y)]
      rhs: 
        (expr.Binary
          op: (Token id:Id.Arith_Star length:1 col:18 line:...0x19e6)
          left: 
            (Subscript
              left: (Token id:Id.Op_LBracket length:1 col:14 line:...0x19e6)
              obj: (expr.Var left:(Token id:Id.Expr_Name length:6 col:8 line:...0x19e6) name:mylist)
              index: 
                (expr.Const
                  c: (Token id:Id.Expr_DecInt length:1 col:15 line:...0x19e6)
                  val: (value.Int i:1)
                )
            )
          right: 
            (expr.Const
              c: (Token id:Id.Expr_DecInt length:2 col:20 line:...0x19e6)
              val: (value.Int i:10)
            )
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:18 content:"echo \"y: $y\"\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x18da])
        (CompoundWord
          parts: [
            (DoubleQuoted
              left: (Token id:Id.Left_DoubleQuote length:1 col:5 line:...0x18de)
              parts: [
                (Token id:Id.Lit_Chars length:3 col:6 line:...0x18de)
                (SimpleVarSub
                  tok: (Token id:Id.VSub_DollarName length:2 col:9 line:...0x18de)
                )
              ]
              right: (Token id:Id.Right_DoubleQuote length:1 col:11 line:...0x18de)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:20 content:"var list2 = mylist ++ [4, 5]\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:5 col:4 line:...0x187e) name:list2)]
      rhs: 
        (expr.Binary
          op: (Token id:Id.Arith_DPlus length:2 col:19 line:...0x187e)
          left: (expr.Var left:(Token id:Id.Expr_Name length:6 col:12 line:...0x187e) name:mylist)
          right: 
            (expr.List
              left: (Token id:Id.Op_LBracket length:1 col:22 line:...0x187e)
              elts: [
                (expr.Const
                  c: (Token id:Id.Expr_DecInt length:1 col:23 line:...0x187e)
                  val: (value.Int i:4)
                )
                (expr.Const
                  c: (Token id:Id.Expr_DecInt length:1 col:26 line:...0x187e)
                  val: (value.Int i:5)
                )
              ]
              ctx: expr_context.Store
            )
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 2
          col: 0
          line: (SourceLine line_num:26 content:"pp cell list2\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x16da])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:4 col:3 line:...0x16de)])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:5 col:8 line:...0x16de)])
      ]
      is_last_cmd: F
    )
    (command.ShAssignment
      left: 
        (Token
          id: Id.Lit_VarLike
          length: 5
          col: 0
          line: 
            (SourceLine
              line_num: 28
              content: "str1='shell string'  # traditinoal shell-style assignment\n"
              src: ...0x1c5d
            )
        )
      pairs: [
        (AssignPair
          left: ...0x1686
          lhs: (sh_lhs.Name left:...0x1686 name:str1)
          op: assign_op.Equal
          rhs: 
            (CompoundWord
              parts: [
                (SingleQuoted
                  left: (Token id:Id.Left_SingleQuote length:1 col:5 line:...0x168a)
                  sval: "shell string"
                  right: (Token id:Id.Right_SingleQuote length:1 col:18 line:...0x168a)
                )
              ]
            )
        )
      ]
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:31 content:"var str2 = \"Oil string\"\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:4 col:4 line:...0x1602) name:str2)]
      rhs: 
        (DoubleQuoted
          left: (Token id:Id.Left_DoubleQuote length:1 col:11 line:...0x1602)
          parts: [(Token id:Id.Lit_Chars length:10 col:12 line:...0x1602)]
          right: (Token id:Id.Right_DoubleQuote length:1 col:22 line:...0x1602)
        )
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:33 content:"var str3 = str1 ++ str2\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:4 col:4 line:...0x1fe6) name:str3)]
      rhs: 
        (expr.Binary
          op: (Token id:Id.Arith_DPlus length:2 col:16 line:...0x1fe6)
          left: (expr.Var left:(Token id:Id.Expr_Name length:4 col:11 line:...0x1fe6) name:str1)
          right: (expr.Var left:(Token id:Id.Expr_Name length:4 col:19 line:...0x1fe6) name:str2)
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:35 content:"echo \"str3 = $str3\"\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x1f16])
        (CompoundWord
          parts: [
            (DoubleQuoted
              left: (Token id:Id.Left_DoubleQuote length:1 col:5 line:...0x1f1a)
              parts: [
                (Token id:Id.Lit_Chars length:7 col:6 line:...0x1f1a)
                (SimpleVarSub
                  tok: (Token id:Id.VSub_DollarName length:5 col:13 line:...0x1f1a)
                )
              ]
              right: (Token id:Id.Right_DoubleQuote length:1 col:18 line:...0x1f1a)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
  ]
)
---
(command.CommandList
  children: [
    (command.ShFunction
      name_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: 
            (SourceLine
              line_num: 8
              content: "argv() { spec/bin/argv.py \"$@\"; }\n"
              src: (source.MainFile path:ysh/testdata/array-rewrite-1.sh)
            )
        )
      name: argv
      body: 
        (BraceGroup
          left: (Token id:Id.Lit_LBrace length:1 col:7 line:...0x1376)
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: (Token id:Id.Lit_Chars length:4 col:9 line:...0x1376)
                  more_env: []
                  words: [
                    (CompoundWord
                      parts: [
                        ...0x1336
                        (Token
                          id: Id.Lit_Slash
                          length: 1
                          col: 13
                          line: ...0x1376
                        )
                        (Token
                          id: Id.Lit_Chars
                          length: 3
                          col: 14
                          line: ...0x1376
                        )
                        (Token
                          id: Id.Lit_Slash
                          length: 1
                          col: 17
                          line: ...0x1376
                        )
                        (Token
                          id: Id.Lit_Chars
                          length: 7
                          col: 18
                          line: ...0x1376
                        )
                      ]
                    )
                    (CompoundWord
                      parts: [
                        (DoubleQuoted
                          left: (Token id:Id.Left_DoubleQuote length:1 col:26 line:...0x1376)
                          parts: [
                            (SimpleVarSub
                              tok: (Token id:Id.VSub_At length:2 col:27 line:...0x1376)
                            )
                          ]
                          right: (Token id:Id.Right_DoubleQuote length:1 col:29 line:...0x1376)
                        )
                      ]
                    )
                  ]
                  is_last_cmd: F
                )
              terminator: (Token id:Id.Op_Semi length:1 col:30 line:...0x1376)
            )
          ]
          right: (Token id:Id.Lit_RBrace length:1 col:32 line:...0x1376)
        )
    )
    (command.ShAssignment
      left: 
        (Token
          id: Id.Lit_VarLike
          length: 6
          col: 0
          line: (SourceLine line_num:14 content:"regex=(old1 old2)\n" src:...0x1c5d)
        )
      pairs: [
        (AssignPair
          left: ...0x1262
          lhs: (sh_lhs.Name left:...0x1262 name:regex)
          op: assign_op.Equal
          rhs: 
            (CompoundWord
              parts: [
                (ShArrayLiteral
                  left: (Token id:Id.Op_LParen length:1 col:6 line:...0x1266)
                  words: [
                    (CompoundWord
                      parts: [(Token id:Id.Lit_Chars length:4 col:7 line:...0x1266)]
                    )
                    (CompoundWord
                      parts: [(Token id:Id.Lit_Chars length:4 col:12 line:...0x1266)]
                    )
                  ]
                  right: (Token id:Id.Right_ShArrayLiteral length:1 col:16 line:...0x1266)
                )
              ]
            )
        )
      ]
    )
    (command.ShAssignment
      left: 
        (Token
          id: Id.Lit_VarLike
          length: 6
          col: 0
          line: (SourceLine line_num:15 content:"flags=()\n" src:...0x1c5d)
        )
      pairs: [
        (AssignPair
          left: ...0x11f6
          lhs: (sh_lhs.Name left:...0x11f6 name:flags)
          op: assign_op.Equal
          rhs: 
            (CompoundWord
              parts: [
                (ShArrayLiteral
                  left: (Token id:Id.Op_LParen length:1 col:6 line:...0x11fa)
                  words: []
                  right: (Token id:Id.Right_ShArrayLiteral length:1 col:7 line:...0x11fa)
                )
              ]
            )
        )
      ]
    )
    (command.ForEach
      keyword: 
        (Token
          id: Id.KW_For
          length: 3
          col: 0
          line: (SourceLine line_num:17 content:"for r in \"${regex[@]}\"; do\n" src:...0x1c5d)
        )
      iter_names: [r]
      iterable: 
        (for_iter.Words
          words: [
            (CompoundWord
              parts: [
                (DoubleQuoted
                  left: (Token id:Id.Left_DoubleQuote length:1 col:9 line:...0x11a6)
                  parts: [
                    (BracedVarSub
                      left: (Token id:Id.Left_DollarBrace length:2 col:10 line:...0x11a6)
                      token: (Token id:Id.VSub_Name length:5 col:12 line:...0x11a6)
                      var_name: regex
                      bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                      right: (Token id:Id.Right_DollarBrace length:1 col:20 line:...0x11a6)
                    )
                  ]
                  right: (Token id:Id.Right_DoubleQuote length:1 col:21 line:...0x11a6)
                )
              ]
            )
          ]
        )
      semi_tok: (Token id:Id.Op_Semi length:1 col:22 line:...0x11a6)
      body: 
        (command.DoGroup
          left: (Token id:Id.KW_Do length:2 col:24 line:...0x11a6)
          children: [
            (command.ShAssignment
              left: 
                (Token
                  id: Id.Lit_ArrayLhsOpen
                  length: 6
                  col: 2
                  line: 
                    (SourceLine
                      line_num: 18
                      content: "  flags[${#flags[@]}]=\"--regex=$r\"\n"
                      src: ...0x1c5d
                    )
                )
              pairs: [
                (AssignPair
                  left: ...0x1116
                  lhs: 
                    (sh_lhs.IndexedName
                      left: ...0x1116
                      name: flags
                      index: 
                        (CompoundWord
                          parts: [
                            (BracedVarSub
                              left: 
                                (Token
                                  id: Id.Left_DollarBrace
                                  length: 2
                                  col: 0
                                  line: 
                                    (SourceLine
                                      line_num: 1
                                      content: "${#flags[@]}"
                                      src: 
                                        (source.Reparsed
                                          what: "array LHS"
                                          left_token: ...0x1116
                                          right_token: 
                                            (Token
                                              id: Id.Lit_ArrayLhsClose
                                              length: 2
                                              col: 20
                                              line: ...0x111e
                                            )
                                        )
                                    )
                                )
                              token: (Token id:Id.VSub_Name length:5 col:3 line:...0x109e)
                              var_name: flags
                              prefix_op: (Token id:Id.VSub_Pound length:1 col:2 line:...0x109e)
                              bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                              right: (Token id:Id.Right_DollarBrace length:1 col:11 line:...0x109e)
                            )
                          ]
                        )
                    )
                  op: assign_op.Equal
                  rhs: 
                    (CompoundWord
                      parts: [
                        (DoubleQuoted
                          left: (Token id:Id.Left_DoubleQuote length:1 col:22 line:...0x111e)
                          parts: [
                            (Token
                              id: Id.Lit_Chars
                              length: 8
                              col: 23
                              line: ...0x111e
                            )
                            (SimpleVarSub
                              tok: (Token id:Id.VSub_DollarName length:2 col:31 line:...0x111e)
                            )
                          ]
                          right: (Token id:Id.Right_DoubleQuote length:1 col:33 line:...0x111e)
                        )
                      ]
                    )
                )
              ]
            )
          ]
          right: 
            (Token
              id: Id.KW_Done
              length: 4
              col: 0
              line: (SourceLine line_num:19 content:"done\n" src:...0x1c5d)
            )
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:21 content:"argv \"${flags[@]}\"\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x1032])
        (CompoundWord
          parts: [
            (DoubleQuoted
              left: (Token id:Id.Left_DoubleQuote length:1 col:5 line:...0x1036)
              parts: [
                (BracedVarSub
                  left: (Token id:Id.Left_DollarBrace length:2 col:6 line:...0x1036)
                  token: (Token id:Id.VSub_Name length:5 col:8 line:...0x1036)
                  var_name: flags
                  bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                  right: (Token id:Id.Right_DollarBrace length:1 col:16 line:...0x1036)
                )
              ]
              right: (Token id:Id.Right_DoubleQuote length:1 col:17 line:...0x1036)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 5
          col: 0
          line: (SourceLine line_num:34 content:"shopt -s simple_word_eval parse_at\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x19c2])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:2 col:6 line:...0x19c6)])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:16 col:9 line:...0x19c6)])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:8 col:26 line:...0x19c6)])
      ]
      is_last_cmd: F
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:36 content:"var regex2 = %(new1 new2)\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:6 col:4 line:...0x1962) name:regex2)]
      rhs: 
        (ShArrayLiteral
          left: (Token id:Id.Left_PercentParen length:2 col:13 line:...0x1962)
          words: [
            (CompoundWord parts:[(Token id:Id.Lit_Chars length:4 col:15 line:...0x1962)])
            (CompoundWord parts:[(Token id:Id.Lit_Chars length:4 col:20 line:...0x1962)])
          ]
          right: (Token id:Id.Right_ShArrayLiteral length:1 col:24 line:...0x1962)
        )
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: (SourceLine line_num:37 content:"var flags2 = %()\n" src:...0x1c5d)
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:6 col:4 line:...0x188e) name:flags2)]
      rhs: 
        (ShArrayLiteral
          left: (Token id:Id.Left_PercentParen length:2 col:13 line:...0x188e)
          words: []
          right: (Token id:Id.Right_ShArrayLiteral length:1 col:15 line:...0x188e)
        )
    )
    (command.ForEach
      keyword: 
        (Token
          id: Id.KW_For
          length: 3
          col: 0
          line: (SourceLine line_num:39 content:"for r in @regex2; do\n" src:...0x1c5d)
        )
      iter_names: [r]
      iterable: 
        (for_iter.Words
          words: [(CompoundWord parts:[(Token id:Id.Lit_Splice length:7 col:9 line:...0x17d2)])]
        )
      semi_tok: (Token id:Id.Op_Semi length:1 col:16 line:...0x17d2)
      body: 
        (command.DoGroup
          left: (Token id:Id.KW_Do length:2 col:18 line:...0x17d2)
          children: [
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 6
                  col: 2
                  line: 
                    (SourceLine
                      line_num: 40
                      content: "  append \"--regex=$r\" (flags2)\n"
                      src: ...0x1c5d
                    )
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x1762])
                (CompoundWord
                  parts: [
                    (DoubleQuoted
                      left: (Token id:Id.Left_DoubleQuote length:1 col:9 line:...0x176a)
                      parts: [
                        (Token
                          id: Id.Lit_Chars
                          length: 8
                          col: 10
                          line: ...0x176a
                        )
                        (SimpleVarSub
                          tok: (Token id:Id.VSub_DollarName length:2 col:18 line:...0x176a)
                        )
                      ]
                      right: (Token id:Id.Right_DoubleQuote length:1 col:20 line:...0x176a)
                    )
                  ]
                )
              ]
              typed_args: 
                (ArgList
                  left: (Token id:Id.Op_LParen length:1 col:22 line:...0x176a)
                  pos_args: [
                    (expr.Var
                      left: (Token id:Id.Expr_Name length:6 col:23 line:...0x176a)
                      name: flags2
                    )
                  ]
                  named_args: []
                  right: (Token id:Id.Op_RParen length:1 col:29 line:...0x176a)
                )
              is_last_cmd: F
            )
          ]
          right: 
            (Token
              id: Id.KW_Done
              length: 4
              col: 0
              line: (SourceLine line_num:41 content:"done\n" src:...0x1c5d)
            )
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:43 content:"argv @flags2\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x167e])
        (CompoundWord parts:[(Token id:Id.Lit_Splice length:7 col:5 line:...0x1682)])
      ]
      is_last_cmd: F
    )
  ]
)
---
(command.CommandList
  children: [
    (command.ShFunction
      name_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: 
            (SourceLine
              line_num: 8
              content: "argv() { spec/bin/argv.py \"$@\"; }\n"
              src: (source.MainFile path:ysh/testdata/array-rewrite-2.sh)
            )
        )
      name: argv
      body: 
        (BraceGroup
          left: (Token id:Id.Lit_LBrace length:1 col:7 line:...0x137a)
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: (Token id:Id.Lit_Chars length:4 col:9 line:...0x137a)
                  more_env: []
                  words: [
                    (CompoundWord
                      parts: [
                        ...0x133a
                        (Token
                          id: Id.Lit_Slash
                          length: 1
                          col: 13
                          line: ...0x137a
                        )
                        (Token
                          id: Id.Lit_Chars
                          length: 3
                          col: 14
                          line: ...0x137a
                        )
                        (Token
                          id: Id.Lit_Slash
                          length: 1
                          col: 17
                          line: ...0x137a
                        )
                        (Token
                          id: Id.Lit_Chars
                          length: 7
                          col: 18
                          line: ...0x137a
                        )
                      ]
                    )
                    (CompoundWord
                      parts: [
                        (DoubleQuoted
                          left: (Token id:Id.Left_DoubleQuote length:1 col:26 line:...0x137a)
                          parts: [
                            (SimpleVarSub
                              tok: (Token id:Id.VSub_At length:2 col:27 line:...0x137a)
                            )
                          ]
                          right: (Token id:Id.Right_DoubleQuote length:1 col:29 line:...0x137a)
                        )
                      ]
                    )
                  ]
                  is_last_cmd: F
                )
              terminator: (Token id:Id.Op_Semi length:1 col:30 line:...0x137a)
            )
          ]
          right: (Token id:Id.Lit_RBrace length:1 col:32 line:...0x137a)
        )
    )
    (command.ShAssignment
      left: 
        (Token
          id: Id.Lit_VarLike
          length: 16
          col: 0
          line: (SourceLine line_num:15 content:"CONFIG_HAVE_FOO=yes\n" src:...0x1c5d)
        )
      pairs: [
        (AssignPair
          left: ...0x1256
          lhs: (sh_lhs.Name left:...0x1256 name:CONFIG_HAVE_FOO)
          op: assign_op.Equal
          rhs: (CompoundWord parts:[(Token id:Id.Lit_Chars length:3 col:16 line:...0x125a)])
        )
      ]
    )
    (command.ShAssignment
      left: 
        (Token
          id: Id.Lit_VarLike
          length: 5
          col: 0
          line: (SourceLine line_num:16 content:"path='/etc/path with spaces'\n" src:...0x1c5d)
        )
      pairs: [
        (AssignPair
          left: ...0x120a
          lhs: (sh_lhs.Name left:...0x120a name:path)
          op: assign_op.Equal
          rhs: 
            (CompoundWord
              parts: [
                (SingleQuoted
                  left: (Token id:Id.Left_SingleQuote length:1 col:5 line:...0x120e)
                  sval: "/etc/path with spaces"
                  right: (Token id:Id.Right_SingleQuote length:1 col:27 line:...0x120e)
                )
              ]
            )
        )
      ]
    )
    (command.ShAssignment
      left: 
        (Token
          id: Id.Lit_VarLike
          length: 6
          col: 0
          line: (SourceLine line_num:17 content:"flags=''\n" src:...0x1c5d)
        )
      pairs: [
        (AssignPair
          left: ...0x11aa
          lhs: (sh_lhs.Name left:...0x11aa name:flags)
          op: assign_op.Equal
          rhs: 
            (CompoundWord
              parts: [
                (SingleQuoted
                  left: (Token id:Id.Left_SingleQuote length:1 col:6 line:...0x11ae)
                  sval: ""
                  right: (Token id:Id.Right_SingleQuote length:1 col:7 line:...0x11ae)
                )
              ]
            )
        )
      ]
    )
    (command.If
      if_kw: 
        (Token
          id: Id.KW_If
          length: 2
          col: 0
          line: 
            (SourceLine
              line_num: 20
              content: "if [ -n \"${CONFIG_HAVE_FOO}\" ]; then\n"
              src: ...0x1c5d
            )
        )
      arms: [
        (IfArm
          keyword: ...0x1152
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: (Token id:Id.Lit_LBracket length:1 col:3 line:...0x1156)
                      more_env: []
                      words: [
                        (CompoundWord parts:[...0x113e])
                        (CompoundWord
                          parts: [(Token id:Id.Lit_Chars length:2 col:5 line:...0x1156)]
                        )
                        (CompoundWord
                          parts: [
                            (DoubleQuoted
                              left: (Token id:Id.Left_DoubleQuote length:1 col:8 line:...0x1156)
                              parts: [
                                (BracedVarSub
                                  left: (Token id:Id.Left_DollarBrace length:2 col:9 line:...0x1156)
                                  token: (Token id:Id.VSub_Name length:15 col:11 line:...0x1156)
                                  var_name: CONFIG_HAVE_FOO
                                  right: 
                                    (Token
                                      id: Id.Right_DollarBrace
                                      length: 1
                                      col: 26
                                      line: ...0x1156
                                    )
                                )
                              ]
                              right: (Token id:Id.Right_DoubleQuote length:1 col:27 line:...0x1156)
                            )
                          ]
                        )
                        (CompoundWord
                          parts: [(Token id:Id.Lit_RBracket length:1 col:29 line:...0x1156)]
                        )
                      ]
                      is_last_cmd: F
                    )
                  terminator: (Token id:Id.Op_Semi length:1 col:30 line:...0x1156)
                )
              ]
            )
          then_kw: (Token id:Id.KW_Then length:4 col:32 line:...0x1156)
          action: [
            (command.ShAssignment
              left: 
                (Token
                  id: Id.Lit_VarLike
                  length: 6
                  col: 2
                  line: 
                    (SourceLine
                      line_num: 21
                      content: "  flags=\"${flags} --foo=$path\"\n"
                      src: ...0x1c5d
                    )
                )
              pairs: [
                (AssignPair
                  left: ...0x10ae
                  lhs: (sh_lhs.Name left:...0x10ae name:flags)
                  op: assign_op.Equal
                  rhs: 
                    (CompoundWord
                      parts: [
                        (DoubleQuoted
                          left: (Token id:Id.Left_DoubleQuote length:1 col:8 line:...0x10b6)
                          parts: [
                            (BracedVarSub
                              left: (Token id:Id.Left_DollarBrace length:2 col:9 line:...0x10b6)
                              token: (Token id:Id.VSub_Name length:5 col:11 line:...0x10b6)
                              var_name: flags
                              right: (Token id:Id.Right_DollarBrace length:1 col:16 line:...0x10b6)
                            )
                            (Token
                              id: Id.Lit_Chars
                              length: 7
                              col: 17
                              line: ...0x10b6
                            )
                            (SimpleVarSub
                              tok: (Token id:Id.VSub_DollarName length:5 col:24 line:...0x10b6)
                            )
                          ]
                          right: (Token id:Id.Right_DoubleQuote length:1 col:29 line:...0x10b6)
                        )
                      ]
                    )
                )
              ]
            )
          ]
          then_tok: ...0x10ce
        )
      ]
      else_action: []
      fi_kw: 
        (Token
          id: Id.KW_Fi
          length: 2
          col: 0
          line: (SourceLine line_num:22 content:"fi\n" src:...0x1c5d)
        )
    )
    (command.If
      if_kw: 
        (Token
          id: Id.KW_If
          length: 2
          col: 0
          line: 
            (SourceLine
              line_num: 24
              content: "if [ -n \"${CONFIG_HAVE_BAR}\" ]; then\n"
              src: ...0x1c5d
            )
        )
      arms: [
        (IfArm
          keyword: ...0x102e
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: (Token id:Id.Lit_LBracket length:1 col:3 line:...0x1032)
                      more_env: []
                      words: [
                        (CompoundWord parts:[...0x101a])
                        (CompoundWord
                          parts: [(Token id:Id.Lit_Chars length:2 col:5 line:...0x1032)]
                        )
                        (CompoundWord
                          parts: [
                            (DoubleQuoted
                              left: (Token id:Id.Left_DoubleQuote length:1 col:8 line:...0x1032)
                              parts: [
                                (BracedVarSub
                                  left: (Token id:Id.Left_DollarBrace length:2 col:9 line:...0x1032)
                                  token: (Token id:Id.VSub_Name length:15 col:11 line:...0x1032)
                                  var_name: CONFIG_HAVE_BAR
                                  right: 
                                    (Token
                                      id: Id.Right_DollarBrace
                                      length: 1
                                      col: 26
                                      line: ...0x1032
                                    )
                                )
                              ]
                              right: (Token id:Id.Right_DoubleQuote length:1 col:27 line:...0x1032)
                            )
                          ]
                        )
                        (CompoundWord
                          parts: [(Token id:Id.Lit_RBracket length:1 col:29 line:...0x1032)]
                        )
                      ]
                      is_last_cmd: F
                    )
                  terminator: (Token id:Id.Op_Semi length:1 col:30 line:...0x1032)
                )
              ]
            )
          then_kw: (Token id:Id.KW_Then length:4 col:32 line:...0x1032)
          action: [
            (command.ShAssignment
              left: 
                (Token
                  id: Id.Lit_VarLike
                  length: 6
                  col: 2
                  line: (SourceLine line_num:25 content:"  flags=\"${flags} --bar\"\n" src:...0x1c5d)
                )
              pairs: [
                (AssignPair
                  left: ...0x1a32
                  lhs: (sh_lhs.Name left:...0x1a32 name:flags)
                  op: assign_op.Equal
                  rhs: 
                    (CompoundWord
                      parts: [
                        (DoubleQuoted
                          left: (Token id:Id.Left_DoubleQuote length:1 col:8 line:...0x1a3a)
                          parts: [
                            (BracedVarSub
                              left: (Token id:Id.Left_DollarBrace length:2 col:9 line:...0x1a3a)
                              token: (Token id:Id.VSub_Name length:5 col:11 line:...0x1a3a)
                              var_name: flags
                              right: (Token id:Id.Right_DollarBrace length:1 col:16 line:...0x1a3a)
                            )
                            (Token
                              id: Id.Lit_Chars
                              length: 6
                              col: 17
                              line: ...0x1a3a
                            )
                          ]
                          right: (Token id:Id.Right_DoubleQuote length:1 col:23 line:...0x1a3a)
                        )
                      ]
                    )
                )
              ]
            )
          ]
          then_tok: ...0x1a52
        )
      ]
      else_action: []
      fi_kw: 
        (Token
          id: Id.KW_Fi
          length: 2
          col: 0
          line: (SourceLine line_num:26 content:"fi\n" src:...0x1c5d)
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: 
            (SourceLine
              line_num: 28
              content: "argv ${flags}  # unquoted splitting\n"
              src: ...0x1c5d
            )
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x19b6])
        (CompoundWord
          parts: [
            (BracedVarSub
              left: (Token id:Id.Left_DollarBrace length:2 col:5 line:...0x19ba)
              token: (Token id:Id.VSub_Name length:5 col:7 line:...0x19ba)
              var_name: flags
              right: (Token id:Id.Right_DollarBrace length:1 col:12 line:...0x19ba)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 3
          col: 0
          line: (SourceLine line_num:40 content:"set -o errexit\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x18be])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:2 col:4 line:...0x18c2)])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:7 col:7 line:...0x18c2)])
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 5
          col: 0
          line: (SourceLine line_num:41 content:"shopt -s parse_at simple_word_eval\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x1872])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:2 col:6 line:...0x1876)])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:8 col:9 line:...0x1876)])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:16 col:18 line:...0x1876)])
      ]
      is_last_cmd: F
    )
    (command.Mutation
      keyword: 
        (Token
          id: Id.KW_SetVar
          length: 6
          col: 0
          line: 
            (SourceLine
              line_num: 43
              content: "setvar CONFIG_HAVE_FOO = \"yes\"  # TODO: change to single quotes\n"
              src: ...0x1c5d
            )
        )
      lhs: [(Token id:Id.Expr_Name length:15 col:7 line:...0x1816 tval:CONFIG_HAVE_FOO)]
      op: (Token id:Id.Arith_Equal length:1 col:23 line:...0x1816)
      rhs: 
        (DoubleQuoted
          left: (Token id:Id.Left_DoubleQuote length:1 col:25 line:...0x1816)
          parts: [(Token id:Id.Lit_Chars length:3 col:26 line:...0x1816)]
          right: (Token id:Id.Right_DoubleQuote length:1 col:29 line:...0x1816)
        )
    )
    (command.Mutation
      keyword: 
        (Token
          id: Id.KW_SetVar
          length: 6
          col: 0
          line: 
            (SourceLine
              line_num: 44
              content: "setvar path = \"/etc/path with spaces\"\n"
              src: ...0x1c5d
            )
        )
      lhs: [(Token id:Id.Expr_Name length:4 col:7 line:...0x1732 tval:path)]
      op: (Token id:Id.Arith_Equal length:1 col:12 line:...0x1732)
      rhs: 
        (DoubleQuoted
          left: (Token id:Id.Left_DoubleQuote length:1 col:14 line:...0x1732)
          parts: [(Token id:Id.Lit_Chars length:21 col:15 line:...0x1732)]
          right: (Token id:Id.Right_DoubleQuote length:1 col:36 line:...0x1732)
        )
    )
    (command.Mutation
      keyword: 
        (Token
          id: Id.KW_SetVar
          length: 6
          col: 0
          line: (SourceLine line_num:45 content:"setvar flags = %()\n" src:...0x1c5d)
        )
      lhs: [(Token id:Id.Expr_Name length:5 col:7 line:...0x165a tval:flags)]
      op: (Token id:Id.Arith_Equal length:1 col:13 line:...0x165a)
      rhs: 
        (ShArrayLiteral
          left: (Token id:Id.Left_PercentParen length:2 col:15 line:...0x165a)
          words: []
          right: (Token id:Id.Right_ShArrayLiteral length:1 col:17 line:...0x165a)
        )
    )
    (command.If
      if_kw: 
        (Token
          id: Id.KW_If
          length: 2
          col: 0
          line: (SourceLine line_num:47 content:"if test -n $CONFIG_HAVE_FOO; then\n" src:...0x1c5d)
        )
      arms: [
        (IfArm
          keyword: ...0x1582
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: (Token id:Id.Lit_Chars length:4 col:3 line:...0x1586)
                      more_env: []
                      words: [
                        (CompoundWord parts:[...0x156e])
                        (CompoundWord
                          parts: [(Token id:Id.Lit_Chars length:2 col:8 line:...0x1586)]
                        )
                        (CompoundWord
                          parts: [
                            (SimpleVarSub
                              tok: (Token id:Id.VSub_DollarName length:16 col:11 line:...0x1586)
                            )
                          ]
                        )
                      ]
                      is_last_cmd: F
                    )
                  terminator: (Token id:Id.Op_Semi length:1 col:27 line:...0x1586)
                )
              ]
            )
          then_kw: (Token id:Id.KW_Then length:4 col:29 line:...0x1586)
          action: [
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 6
                  col: 2
                  line: 
                    (SourceLine
                      line_num: 48
                      content: "  append -- --foo=$path (flags)\n"
                      src: ...0x1c5d
                    )
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x1fb2])
                (CompoundWord
                  parts: [(Token id:Id.Lit_Chars length:2 col:9 line:...0x1fba)]
                )
                (CompoundWord
                  parts: [
                    (Token id:Id.Lit_Chars length:5 col:12 line:...0x1fba)
                    (Token id:Id.Lit_Equals length:1 col:17 line:...0x1fba)
                    (SimpleVarSub
                      tok: (Token id:Id.VSub_DollarName length:5 col:18 line:...0x1fba)
                    )
                  ]
                )
              ]
              typed_args: 
                (ArgList
                  left: (Token id:Id.Op_LParen length:1 col:24 line:...0x1fba)
                  pos_args: [
                    (expr.Var
                      left: (Token id:Id.Expr_Name length:5 col:25 line:...0x1fba)
                      name: flags
                    )
                  ]
                  named_args: []
                  right: (Token id:Id.Op_RParen length:1 col:30 line:...0x1fba)
                )
              is_last_cmd: F
            )
          ]
          then_tok: ...0x1fce
        )
      ]
      else_action: []
      fi_kw: 
        (Token
          id: Id.KW_Fi
          length: 2
          col: 0
          line: (SourceLine line_num:49 content:"fi\n" src:...0x1c5d)
        )
    )
    (command.If
      if_kw: 
        (Token
          id: Id.KW_If
          length: 2
          col: 0
          line: (SourceLine line_num:51 content:"if test -n $CONFIG_HAVE_BAR; then\n" src:...0x1c5d)
        )
      arms: [
        (IfArm
          keyword: ...0x1eca
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: (Token id:Id.Lit_Chars length:4 col:3 line:...0x1ece)
                      more_env: []
                      words: [
                        (CompoundWord parts:[...0x1eb6])
                        (CompoundWord
                          parts: [(Token id:Id.Lit_Chars length:2 col:8 line:...0x1ece)]
                        )
                        (CompoundWord
                          parts: [
                            (SimpleVarSub
                              tok: (Token id:Id.VSub_DollarName length:16 col:11 line:...0x1ece)
                            )
                          ]
                        )
                      ]
                      is_last_cmd: F
                    )
                  terminator: (Token id:Id.Op_Semi length:1 col:27 line:...0x1ece)
                )
              ]
            )
          then_kw: (Token id:Id.KW_Then length:4 col:29 line:...0x1ece)
          action: [
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 6
                  col: 2
                  line: (SourceLine line_num:52 content:"  append -- --bar (flags)\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x1e4e])
                (CompoundWord
                  parts: [(Token id:Id.Lit_Chars length:2 col:9 line:...0x1e56)]
                )
                (CompoundWord
                  parts: [(Token id:Id.Lit_Chars length:5 col:12 line:...0x1e56)]
                )
              ]
              typed_args: 
                (ArgList
                  left: (Token id:Id.Op_LParen length:1 col:18 line:...0x1e56)
                  pos_args: [
                    (expr.Var
                      left: (Token id:Id.Expr_Name length:5 col:19 line:...0x1e56)
                      name: flags
                    )
                  ]
                  named_args: []
                  right: (Token id:Id.Op_RParen length:1 col:24 line:...0x1e56)
                )
              is_last_cmd: F
            )
          ]
          then_tok: ...0x1e6e
        )
      ]
      else_action: []
      fi_kw: 
        (Token
          id: Id.KW_Fi
          length: 2
          col: 0
          line: (SourceLine line_num:53 content:"fi\n" src:...0x1c5d)
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:55 content:"argv @flags\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x1d6e])
        (CompoundWord parts:[(Token id:Id.Lit_Splice length:6 col:5 line:...0x1d72)])
      ]
      is_last_cmd: F
    )
  ]
)
---
(command.CommandList
  children: [
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 5
          col: 0
          line: 
            (SourceLine
              line_num: 2
              content: "shopt -s oil-parse-at static-word-eval\n"
              src: (source.MainFile path:ysh/testdata/array-splice-demo.osh)
            )
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x13e2])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:2 col:6 line:...0x13e6)])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:12 col:9 line:...0x13e6)])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:16 col:22 line:...0x13e6)])
      ]
      is_last_cmd: F
    )
    (command.ShAssignment
      left: 
        (Token
          id: Id.Lit_VarLike
          length: 9
          col: 0
          line: (SourceLine line_num:4 content:"myglobal=global\n" src:...0x1c5d)
        )
      pairs: [
        (AssignPair
          left: ...0x137a
          lhs: (sh_lhs.Name left:...0x137a name:myglobal)
          op: assign_op.Equal
          rhs: (CompoundWord parts:[(Token id:Id.Lit_Chars length:6 col:9 line:...0x137e)])
        )
      ]
    )
    (command.VarDecl
      keyword: 
        (Token
          id: Id.KW_Var
          length: 3
          col: 0
          line: 
            (SourceLine
              line_num: 6
              content: "var myarray = :| $myglobal $'line\\n' ${z:-default} |\n"
              src: ...0x1c5d
            )
        )
      lhs: [(NameType left:(Token id:Id.Expr_Name length:7 col:4 line:...0x132e) name:myarray)]
      rhs: 
        (ShArrayLiteral
          left: (Token id:Id.Left_ColonPipe length:2 col:14 line:...0x132e)
          words: [
            (CompoundWord
              parts: [(SimpleVarSub tok:(Token id:Id.VSub_DollarName length:9 col:17 line:...0x132e))]
            )
            (CompoundWord
              parts: [
                (SingleQuoted
                  left: (Token id:Id.Left_DollarSingleQuote length:2 col:27 line:...0x132e)
                  sval: "line\n"
                  right: (Token id:Id.Right_SingleQuote length:1 col:35 line:...0x132e)
                )
              ]
            )
            (CompoundWord
              parts: [
                (BracedVarSub
                  left: (Token id:Id.Left_DollarBrace length:2 col:37 line:...0x132e)
                  token: (Token id:Id.VSub_Name length:1 col:39 line:...0x132e)
                  var_name: z
                  suffix_op: 
                    (suffix_op.Unary
                      op: (Token id:Id.VTest_ColonHyphen length:2 col:40 line:...0x132e)
                      arg_word: 
                        (CompoundWord
                          parts: [(Token id:Id.Lit_Chars length:7 col:42 line:...0x132e)]
                        )
                    )
                  right: (Token id:Id.Right_DollarBrace length:1 col:49 line:...0x132e)
                )
              ]
            )
          ]
          right: (Token id:Id.Op_Pipe length:1 col:51 line:...0x132e)
        )
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:7 content:"spec/bin/argv.py @myarray\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord
          parts: [
            ...0x1212
            (Token id:Id.Lit_Slash length:1 col:4 line:...0x1216)
            (Token id:Id.Lit_Chars length:3 col:5 line:...0x1216)
            (Token id:Id.Lit_Slash length:1 col:8 line:...0x1216)
            (Token id:Id.Lit_Chars length:7 col:9 line:...0x1216)
          ]
        )
        (CompoundWord parts:[(Token id:Id.Lit_Splice length:8 col:17 line:...0x1216)])
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:8 content:"echo len=$[len(myarray)]\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x11b2])
        (CompoundWord
          parts: [
            (Token id:Id.Lit_VarLike length:4 col:5 line:...0x11b6)
            (word_part.ExprSub
              left: (Token id:Id.Left_DollarBracket length:2 col:9 line:...0x11b6)
              child: 
                (expr.FuncCall
                  func: 
                    (expr.Var
                      left: (Token id:Id.Expr_Name length:3 col:11 line:...0x11b6)
                      name: len
                    )
                  args: 
                    (ArgList
                      left: (Token id:Id.Op_LParen length:1 col:14 line:...0x11b6)
                      pos_args: [
                        (expr.Var
                          left: (Token id:Id.Expr_Name length:7 col:15 line:...0x11b6)
                          name: myarray
                        )
                      ]
                      named_args: []
                      right: (Token id:Id.Op_RParen length:1 col:22 line:...0x11b6)
                    )
                )
              right: (Token id:Id.Op_RBracket length:1 col:23 line:...0x11b6)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:9 content:"echo\n" src:...0x1c5d)
        )
      more_env: []
      words: [(CompoundWord parts:[...0x10b2])]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 6
          col: 0
          line: 
            (SourceLine
              line_num: 11
              content: "append _ '1 2' ${myglobal:-default} (myarray)\n"
              src: ...0x1c5d
            )
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x1076])
        (CompoundWord parts:[(Token id:Id.Lit_Chars length:1 col:7 line:...0x107a)])
        (CompoundWord
          parts: [
            (SingleQuoted
              left: (Token id:Id.Left_SingleQuote length:1 col:9 line:...0x107a)
              sval: "1 2"
              right: (Token id:Id.Right_SingleQuote length:1 col:13 line:...0x107a)
            )
          ]
        )
        (CompoundWord
          parts: [
            (BracedVarSub
              left: (Token id:Id.Left_DollarBrace length:2 col:15 line:...0x107a)
              token: (Token id:Id.VSub_Name length:8 col:17 line:...0x107a)
              var_name: myglobal
              suffix_op: 
                (suffix_op.Unary
                  op: (Token id:Id.VTest_ColonHyphen length:2 col:25 line:...0x107a)
                  arg_word: 
                    (CompoundWord
                      parts: [(Token id:Id.Lit_Chars length:7 col:27 line:...0x107a)]
                    )
                )
              right: (Token id:Id.Right_DollarBrace length:1 col:34 line:...0x107a)
            )
          ]
        )
      ]
      typed_args: 
        (ArgList
          left: (Token id:Id.Op_LParen length:1 col:36 line:...0x107a)
          pos_args: [
            (expr.Var
              left: (Token id:Id.Expr_Name length:7 col:37 line:...0x107a)
              name: myarray
            )
          ]
          named_args: []
          right: (Token id:Id.Op_RParen length:1 col:44 line:...0x107a)
        )
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:12 content:"spec/bin/argv.py @myarray\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord
          parts: [
            ...0x1a26
            (Token id:Id.Lit_Slash length:1 col:4 line:...0x1a2a)
            (Token id:Id.Lit_Chars length:3 col:5 line:...0x1a2a)
            (Token id:Id.Lit_Slash length:1 col:8 line:...0x1a2a)
            (Token id:Id.Lit_Chars length:7 col:9 line:...0x1a2a)
          ]
        )
        (CompoundWord parts:[(Token id:Id.Lit_Splice length:8 col:17 line:...0x1a2a)])
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:13 content:"echo len=$[len(myarray)]\n" src:...0x1c5d)
        )
      more_env: []
      words: [
        (CompoundWord parts:[...0x19c6])
        (CompoundWord
          parts: [
            (Token id:Id.Lit_VarLike length:4 col:5 line:...0x19ca)
            (word_part.ExprSub
              left: (Token id:Id.Left_DollarBracket length:2 col:9 line:...0x19ca)
              child: 
                (expr.FuncCall
                  func: 
                    (expr.Var
                      left: (Token id:Id.Expr_Name length:3 col:11 line:...0x19ca)
                      name: len
                    )
                  args: 
                    (ArgList
                      left: (Token id:Id.Op_LParen length:1 col:14 line:...0x19ca)
                      pos_args: [
                        (expr.Var
                          left: (Token id:Id.Expr_Name length:7 col:15 line:...0x19ca)
                          name: myarray
                        )
                      ]
                      named_args: []
                      right: (Token id:Id.Op_RParen length:1 col:22 line:...0x19ca)
                    )
                )
              right: (Token id:Id.Op_RBracket length:1 col:23 line:...0x19ca)
            )
          ]
        )
      ]
      is_last_cmd: F
    )
    (command.Simple
      blame_tok: 
        (Token
          id: Id.Lit_Chars
          length: 4
          col: 0
          line: (SourceLine line_num:14 content:"echo\n" src:...0x1c5d)
        )
      more_env: []
      words: [(CompoundWord parts:[...0x18ca])]
      is_last_cmd: F
    )
    (command.ForEach
      keyword: 
        (Token
          id: Id.KW_For
          length: 3
          col: 0
          line: (SourceLine line_num:16 content:"for item in (myarray) {\n" src:...0x1c5d)
        )
      iter_names: [item]
      iterable: 
        (for_iter.YshExpr
          e: (expr.Var left:(Token id:Id.Expr_Name length:7 col:13 line:...0x188e) name:myarray)
          blame: (Token id:Id.KW_In length:2 col:9 line:...0x188e)
        )
      body: 
        (BraceGroup
          left: (Token id:Id.Lit_LBrace length:1 col:22 line:...0x188e)
          children: [
            (command.Simple
              blame_tok: 
                (Token
                  id: Id.Lit_Chars
                  length: 4
                  col: 2
                  line: (SourceLine line_num:17 content:"  echo \"  $item\"\n" src:...0x1c5d)
                )
              more_env: []
              words: [
                (CompoundWord parts:[...0x17de])
                (CompoundWord
                  parts: [
                    (DoubleQuoted
                      left: (Token id:Id.Left_DoubleQuote length:1 col:7 line:...0x17e6)
                      parts: [
                        (Token id:Id.Lit_Chars length:2 col:8 line:...0x17e6)
                        (SimpleVarSub
                          tok: (Token id:Id.VSub_DollarName length:5 col:10 line:...0x17e6)
                        )
                      ]
                      right: (Token id:Id.Right_DoubleQuote length:1 col:15 line:...0x17e6)
                    )
                  ]
                )
              ]
              is_last_cmd: F
            )
          ]
          right: 
            (Token
              id: Id.Lit_RBrace
              length: 1
              col: 0
              line: (SourceLine line_num:18 content:"}\n" src:...0x1c5d)
            )
        )
    )
  ]
)