Added support to op-assign operators like '+='.
This feature is implemented by expansion, not by dedicated operators, e.g. a*=2+x is exapanded as a=a*(2+x)
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ func TestAddUnknownTokens(t *testing.T) {
|
||||
wantErr := errors.New(`unexpected token "%"`)
|
||||
|
||||
tree := NewAst()
|
||||
if gotErr := tree.addToken(tk0); gotErr != nil && gotErr.Error() != wantErr.Error() {
|
||||
if _, gotErr := tree.addToken(tk0); gotErr != nil && gotErr.Error() != wantErr.Error() {
|
||||
t.Errorf("err: got <%v>, want <%v>", gotErr, wantErr)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user