--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------

--- foobar

{<Id.Lit_Chars foobar>}
None None 0


--- a[x

{<Id.Lit_ArrayLhsOpen "a["> <Id.Lit_Chars x>}
None None 0


--- a[]=$foo$bar

{<Id.Lit_ArrayLhsOpen "a["> <Id.Lit_ArrayLhsClose "]="> ($ foo) ($ bar)}
(Token
  id: Id.Lit_ArrayLhsOpen
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"a[]=$foo$bar" src:(source.MainFile path:word_parse_test.py))
) (Token
  id: Id.Lit_ArrayLhsClose
  length: 2
  col: 2
  line: (SourceLine line_num:1 content:"a[]=$foo$bar" src:(source.MainFile path:word_parse_test.py))
) 2


--- a[]+=$foo$bar

{<Id.Lit_ArrayLhsOpen "a["> <Id.Lit_ArrayLhsClose "]+="> ($ foo) ($ bar)}
(Token
  id: Id.Lit_ArrayLhsOpen
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"a[]+=$foo$bar" src:(source.MainFile path:word_parse_test.py))
) (Token
  id: Id.Lit_ArrayLhsClose
  length: 3
  col: 2
  line: (SourceLine line_num:1 content:"a[]+=$foo$bar" src:(source.MainFile path:word_parse_test.py))
) 2


--- s=1

{<Id.Lit_VarLike "s="> <Id.Lit_Chars 1>}
(Token
  id: Id.Lit_VarLike
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"s=1" src:(source.MainFile path:word_parse_test.py))
) None 1


--- s+=1

{<Id.Lit_VarLike "s+="> <Id.Lit_Chars 1>}
(Token
  id: Id.Lit_VarLike
  length: 3
  col: 0
  line: (SourceLine line_num:1 content:"s+=1" src:(source.MainFile path:word_parse_test.py))
) None 1


--- a[x]=1

{<Id.Lit_ArrayLhsOpen "a["> <Id.Lit_Chars x> <Id.Lit_ArrayLhsClose "]="> <Id.Lit_Chars 1>}
(Token
  id: Id.Lit_ArrayLhsOpen
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"a[x]=1" src:(source.MainFile path:word_parse_test.py))
) (Token
  id: Id.Lit_ArrayLhsClose
  length: 2
  col: 3
  line: (SourceLine line_num:1 content:"a[x]=1" src:(source.MainFile path:word_parse_test.py))
) 3


--- a[x]+=1

{<Id.Lit_ArrayLhsOpen "a["> <Id.Lit_Chars x> <Id.Lit_ArrayLhsClose "]+="> <Id.Lit_Chars 1>}
(Token
  id: Id.Lit_ArrayLhsOpen
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"a[x]+=1" src:(source.MainFile path:word_parse_test.py))
) (Token
  id: Id.Lit_ArrayLhsClose
  length: 3
  col: 3
  line: (SourceLine line_num:1 content:"a[x]+=1" src:(source.MainFile path:word_parse_test.py))
) 3


--- a[x++]+=1

{<Id.Lit_ArrayLhsOpen "a["> <Id.Lit_Chars x> <Id.Lit_Other "+"> <Id.Lit_Other "+"> 
  <Id.Lit_ArrayLhsClose "]+="> <Id.Lit_Chars 1>
}
(Token
  id: Id.Lit_ArrayLhsOpen
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"a[x++]+=1" src:(source.MainFile path:word_parse_test.py))
) (Token
  id: Id.Lit_ArrayLhsClose
  length: 3
  col: 5
  line: (SourceLine line_num:1 content:"a[x++]+=1" src:(source.MainFile path:word_parse_test.py))
) 5


--- a=(1 2 3)

{<Id.Lit_VarLike "a="> 
  (ShArrayLiteral
    left: <Id.Op_LParen "(">
    words: [{<Id.Lit_Chars 1>} {<Id.Lit_Chars 2>} {<Id.Lit_Chars 3>}]
    right: <Id.Right_ShArrayLiteral ")">
  )
}
(Token
  id: Id.Lit_VarLike
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"a=(1 2 3)" src:(source.MainFile path:word_parse_test.py))
) None 1


--- a+=(1 2 3)

{<Id.Lit_VarLike "a+="> 
  (ShArrayLiteral
    left: <Id.Op_LParen "(">
    words: [{<Id.Lit_Chars 1>} {<Id.Lit_Chars 2>} {<Id.Lit_Chars 3>}]
    right: <Id.Right_ShArrayLiteral ")">
  )
}
(Token
  id: Id.Lit_VarLike
  length: 3
  col: 0
  line: (SourceLine line_num:1 content:"a+=(1 2 3)" src:(source.MainFile path:word_parse_test.py))
) None 1


--- s=

{<Id.Lit_VarLike "s=">}
(Token
  id: Id.Lit_VarLike
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"s=" src:(source.MainFile path:word_parse_test.py))
) None 1


--- a[x]=

{<Id.Lit_ArrayLhsOpen "a["> <Id.Lit_Chars x> <Id.Lit_ArrayLhsClose "]=">}
(Token
  id: Id.Lit_ArrayLhsOpen
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"a[x]=" src:(source.MainFile path:word_parse_test.py))
) (Token
  id: Id.Lit_ArrayLhsClose
  length: 2
  col: 3
  line: (SourceLine line_num:1 content:"a[x]=" src:(source.MainFile path:word_parse_test.py))
) 3


--- s=~foo

{<Id.Lit_VarLike "s="> <Id.Lit_Tilde "~"> <Id.Lit_Chars foo>}
(Token
  id: Id.Lit_VarLike
  length: 2
  col: 0
  line: (SourceLine line_num:1 contentError: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
--------------------------------------------------------------------------------
Error: 'tuple' object has no attribute 'left'
Error: _MakeAssignPair() takes exactly 3 arguments (2 given)
...:"s=~foo" src:(source.MainFile path:word_parse_test.py))
) None 1


--- a[x]=~

{<Id.Lit_ArrayLhsOpen "a["> <Id.Lit_Chars x> <Id.Lit_ArrayLhsClose "]="> <Id.Lit_Tilde "~">}
(Token
  id: Id.Lit_ArrayLhsOpen
  length: 2
  col: 0
  line: (SourceLine line_num:1 content:"a[x]=~" src:(source.MainFile path:word_parse_test.py))
) (Token
  id: Id.Lit_ArrayLhsClose
  length: 2
  col: 3
  line: (SourceLine line_num:1 content:"a[x]=~" src:(source.MainFile path:word_parse_test.py))
) 3

(command.Simple
  blame_tok: <Id.Lit_Chars ls>
  more_env: []
  words: [{<Id.Lit_Chars ls>} {(SQ "my dir")} {($ x)} {<Id.Lit_Chars foo> <Id.Lit_Slash /> ($ bar)}]
  do_fork: T
)(command.Simple
  blame_tok: <Id.Lit_LBracket "[">
  more_env: []
  words: [
    {<Id.Lit_LBracket "[">}
    {<Id.Lit_Chars a>}
    {<Id.Lit_Chars -lt>}
    {<Id.Lit_Chars b>}
    {<Id.Lit_RBracket "]">}
  ]
  do_fork: T
)
--- ~

{<Id.Lit_Tilde "~">}
(CompoundWord
  parts: [
    (word_part.TildeSub
      left: 
        (Token
          id: Id.Lit_Tilde
          length: 1
          col: 0
          line: (SourceLine line_num:1 content:"~" src:(source.MainFile path:word_parse_test.py))
        )
    )
  ]
)

--- ~/

{<Id.Lit_Tilde "~"> <Id.Lit_Slash />}
(CompoundWord
  parts: [
    (word_part.TildeSub
      left: 
        (Token
          id: Id.Lit_Tilde
          length: 1
          col: 0
          line: (SourceLine line_num:1 content:"~/" src:(source.MainFile path:word_parse_test.py))
        )
    )
    (Token id:Id.Lit_Slash length:1 col:1 line:...0x7f534b4bec00)
  ]
)

--- ~/zz

{<Id.Lit_Tilde "~"> <Id.Lit_Slash /> <Id.Lit_Chars zz>}
(CompoundWord
  parts: [
    (word_part.TildeSub
      left: 
        (Token
          id: Id.Lit_Tilde
          length: 1
          col: 0
          line: (SourceLine line_num:1 content:"~/zz" src:(source.MainFile path:word_parse_test.py))
        )
    )
    (Token id:Id.Lit_Slash length:1 col:1 line:...0x7f534b4beb50)
    (Token id:Id.Lit_Chars length:2 col:2 line:...0x7f534b4beb50)
  ]
)

--- ~andy

{<Id.Lit_Tilde "~"> <Id.Lit_Chars andy>}
(CompoundWord
  parts: [
    (word_part.TildeSub
      left: 
        (Token
          id: Id.Lit_Tilde
          length: 1
          col: 0
          line: (SourceLine line_num:1 content:"~andy" src:(source.MainFile path:word_parse_test.py))
        )
      name: (Token id:Id.Lit_Chars length:4 col:1 line:...0x7f534b4bec58)
      user_name: andy
    )
  ]
)

--- ~andy/

{<Id.Lit_Tilde "~"> <Id.Lit_Chars andy> <Id.Lit_Slash />}
(CompoundWord
  parts: [
    (word_part.TildeSub
      left: 
        (Token
          id: Id.Lit_Tilde
          length: 1
          col: 0
          line: (SourceLine line_num:1 content:"~andy/" src:(source.MainFile path:word_parse_test.py))
        )
      name: (Token id:Id.Lit_Chars length:4 col:1 line:...0x7f534b4beaf8)
      user_name: andy
    )
    (Token id:Id.Lit_Slash length:1 col:5 line:...0x7f534b4beaf8)
  ]
)

--- ~andy/zz

{<Id.Lit_Tilde "~"> <Id.Lit_Chars andy> <Id.Lit_Slash /> <Id.Lit_Chars zz>}
(CompoundWord
  parts: [
    (word_part.TildeSub
      left: 
        (Token
          id: Id.Lit_Tilde
          length: 1
          col: 0
          line: 
            (SourceLine
              line_num: 1
              content: "~andy/zz"
              src: (source.MainFile path:word_parse_test.py)
            )
        )
      name: (Token id:Id.Lit_Chars length:4 col:1 line:...0x7f534b4bec00)
      user_name: andy
    )
    (Token id:Id.Lit_Slash length:1 col:5 line:...0x7f534b4bec00)
    (Token id:Id.Lit_Chars length:2 col:6 line:...0x7f534b4bec00)
  ]
)

--- ~bob#

{<Id.Lit_Tilde "~"> <Id.Lit_Chars bob> <Id.Lit_Pound "#">}
None

--- ~bob#/

{<Id.Lit_Tilde "~"> <Id.Lit_Chars bob> <Id.Lit_Pound "#"> <Id.Lit_Slash />}
None

--- ~bob#/zz

{<Id.Lit_Tilde "~"> <Id.Lit_Chars bob> <Id.Lit_Pound "#"> <Id.Lit_Slash /> <Id.Lit_Chars zz>}
None

--- 

<Id.Eof_Real "">
None

--- foo

{<Id.Lit_Chars foo>}
None

--- ~:~/:~/zz:~andy:~andy/:~andy/zz:~bob#:~bob#/:~bob#/zz::foo

{<Id.Lit_Tilde "~"> <Id.Lit_Colon ":"> <Id.Lit_Tilde "~"> <Id.Lit_Slash /> <Id.Lit_Colon ":"> 
  <Id.Lit_tilde sub parts = 6
.
----------------------------------------------------------------------
Ran 4 tests in 0.023s

OK
Tilde "~"> <Id.Lit_Slash /> <Id.Lit_Chars zz> <Id.Lit_Colon ":"> <Id.Lit_Tilde "~"> <Id.Lit_Chars andy> 
  <Id.Lit_Colon ":"> <Id.Lit_Tilde "~"> <Id.Lit_Chars andy> <Id.Lit_Slash /> <Id.Lit_Colon ":"> <Id.Lit_Tilde "~"> 
  <Id.Lit_Chars andy> <Id.Lit_Slash /> <Id.Lit_Chars zz> <Id.Lit_Colon ":"> <Id.Lit_Tilde "~"> <Id.Lit_Chars bob> 
  <Id.Lit_Pound "#"> <Id.Lit_Colon ":"> <Id.Lit_Tilde "~"> <Id.Lit_Chars bob> <Id.Lit_Pound "#"> <Id.Lit_Slash /> 
  <Id.Lit_Colon ":"> <Id.Lit_Tilde "~"> <Id.Lit_Chars bob> <Id.Lit_Pound "#"> <Id.Lit_Slash /> <Id.Lit_Chars zz> 
  <Id.Lit_Colon ":"> <Id.Lit_Colon ":"> <Id.Lit_Chars foo>
}
DETECTED
(CompoundWord
  parts: [
    (word_part.TildeSub
      left: 
        (Token
          id: Id.Lit_Tilde
          length: 1
          col: 0
          line: 
            (SourceLine
              line_num: 1
              content: "~:~/:~/zz:~andy:~andy/:~andy/zz:~bob#:~bob#/:~bob#/zz::foo"
              src: (source.MainFile path:word_parse_test.py)
            )
        )
    )
    (Token id:Id.Lit_Colon length:1 col:1 line:...0x7f534b4beba8)
    (word_part.TildeSub left:(Token id:Id.Lit_Tilde length:1 col:2 line:...0x7f534b4beba8))
    (Token id:Id.Lit_Slash length:1 col:3 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Colon length:1 col:4 line:...0x7f534b4beba8)
    (word_part.TildeSub left:(Token id:Id.Lit_Tilde length:1 col:5 line:...0x7f534b4beba8))
    (Token id:Id.Lit_Slash length:1 col:6 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Chars length:2 col:7 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Colon length:1 col:9 line:...0x7f534b4beba8)
    (word_part.TildeSub
      left: (Token id:Id.Lit_Tilde length:1 col:10 line:...0x7f534b4beba8)
      name: (Token id:Id.Lit_Chars length:4 col:11 line:...0x7f534b4beba8)
      user_name: andy
    )
    (Token id:Id.Lit_Colon length:1 col:15 line:...0x7f534b4beba8)
    (word_part.TildeSub
      left: (Token id:Id.Lit_Tilde length:1 col:16 line:...0x7f534b4beba8)
      name: (Token id:Id.Lit_Chars length:4 col:17 line:...0x7f534b4beba8)
      user_name: andy
    )
    (Token id:Id.Lit_Slash length:1 col:21 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Colon length:1 col:22 line:...0x7f534b4beba8)
    (word_part.TildeSub
      left: (Token id:Id.Lit_Tilde length:1 col:23 line:...0x7f534b4beba8)
      name: (Token id:Id.Lit_Chars length:4 col:24 line:...0x7f534b4beba8)
      user_name: andy
    )
    (Token id:Id.Lit_Slash length:1 col:28 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Chars length:2 col:29 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Colon length:1 col:31 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Tilde length:1 col:32 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Chars length:3 col:33 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Pound length:1 col:36 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Colon length:1 col:37 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Tilde length:1 col:38 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Chars length:3 col:39 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Pound length:1 col:42 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Slash length:1 col:43 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Colon length:1 col:44 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Tilde length:1 col:45 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Chars length:3 col:46 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Pound length:1 col:49 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Slash length:1 col:50 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Chars length:2 col:51 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Colon length:1 col:53 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Colon length:1 col:54 line:...0x7f534b4beba8)
    (Token id:Id.Lit_Chars length:3 col:55 line:...0x7f534b4beba8)
  ]
)