From e9f8d00104b51001a6a05dcf6e95d7c99485aa87 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sun, 3 Jul 2022 22:22:27 +0800 Subject: [PATCH] parser: add _testdata/cmdlinestyle6 --- parser/_testdata/cmdlinestyle6/cmd.gop | 1 + parser/_testdata/cmdlinestyle6/parser.expect | 35 ++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 parser/_testdata/cmdlinestyle6/cmd.gop create mode 100644 parser/_testdata/cmdlinestyle6/parser.expect diff --git a/parser/_testdata/cmdlinestyle6/cmd.gop b/parser/_testdata/cmdlinestyle6/cmd.gop new file mode 100644 index 000000000..126b37c52 --- /dev/null +++ b/parser/_testdata/cmdlinestyle6/cmd.gop @@ -0,0 +1 @@ +println (1+2i,2) diff --git a/parser/_testdata/cmdlinestyle6/parser.expect b/parser/_testdata/cmdlinestyle6/parser.expect new file mode 100644 index 000000000..dcdefb1d8 --- /dev/null +++ b/parser/_testdata/cmdlinestyle6/parser.expect @@ -0,0 +1,35 @@ +package main + +file cmd.gop +noEntrypoint +ast.FuncDecl: + Name: + ast.Ident: + Name: main + Type: + ast.FuncType: + Params: + ast.FieldList: + Body: + ast.BlockStmt: + List: + ast.ExprStmt: + X: + ast.CallExpr: + Fun: + ast.Ident: + Name: println + Args: + ast.BinaryExpr: + X: + ast.BasicLit: + Kind: INT + Value: 1 + Op: + + Y: + ast.BasicLit: + Kind: IMAG + Value: 2i + ast.BasicLit: + Kind: INT + Value: 2