Skip to content

Commit

Permalink
parser: add _testdata/cmdlinestyle6
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Jul 3, 2022
1 parent 46e16fd commit e9f8d00
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions parser/_testdata/cmdlinestyle6/cmd.gop
@@ -0,0 +1 @@
println (1+2i,2)
35 changes: 35 additions & 0 deletions 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

0 comments on commit e9f8d00

Please sign in to comment.