aboutsummaryrefslogtreecommitdiff
path: root/pkg/lang/parser
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/lang/parser')
-rw-r--r--pkg/lang/parser/parser_test.go30
1 files changed, 14 insertions, 16 deletions
diff --git a/pkg/lang/parser/parser_test.go b/pkg/lang/parser/parser_test.go
index 24f3044..4bdaa1c 100644
--- a/pkg/lang/parser/parser_test.go
+++ b/pkg/lang/parser/parser_test.go
@@ -757,15 +757,14 @@ func TestTypeDeclStmt(t *testing.T) {
Value: ast.ExprBinary{
Left: ast.Expr{
At: source.NewLoc(2, 2),
- Kind: ast.ExprKindBinary,
- Value: ast.ExprBinary{
- Left: ast.Expr{At: source.NewLoc(2, 2), Kind: ast.ExprKindThis, Value: ast.ExprThis{}},
- Op: ast.BinOpDot,
- Right: ast.Expr{
- At: source.NewLoc(2, 7),
- Kind: ast.ExprKindIdent,
- Value: ast.ExprIdent{Value: ast.IdentNode{At: source.NewLoc(2, 7), Value: "bar"}},
+ Kind: ast.ExprKindMember,
+ Value: ast.ExprMember{
+ Obj: ast.Expr{
+ At: source.NewLoc(2, 2),
+ Kind: ast.ExprKindThis,
+ Value: ast.ExprThis{},
},
+ Key: ast.IdentNode{At: source.NewLoc(2, 7), Value: "bar"},
},
},
Op: ast.BinOpAssign,
@@ -799,15 +798,14 @@ func TestTypeDeclStmt(t *testing.T) {
Value: ast.StmtReturn{
Value: ast.Expr{
At: source.NewLoc(6, 9),
- Kind: ast.ExprKindBinary,
- Value: ast.ExprBinary{
- Left: ast.Expr{At: source.NewLoc(6, 9), Kind: ast.ExprKindThis, Value: ast.ExprThis{}},
- Op: ast.BinOpDot,
- Right: ast.Expr{
- At: source.NewLoc(6, 14),
- Kind: ast.ExprKindIdent,
- Value: ast.ExprIdent{Value: ast.IdentNode{At: source.NewLoc(6, 14), Value: "bar"}},
+ Kind: ast.ExprKindMember,
+ Value: ast.ExprMember{
+ Obj: ast.Expr{
+ At: source.NewLoc(6, 9),
+ Kind: ast.ExprKindThis,
+ Value: ast.ExprThis{},
},
+ Key: ast.IdentNode{At: source.NewLoc(6, 14), Value: "bar"},
},
},
},