Repository: goplus/gop (go)

Issue:
call ellipsis by command style failed
### The following program `sample.gop` triggers an unexpected result

```coffee
// add a sample
func test(s ...string) {
}
a := ["1","2","3"]
test(a...)
test a... // smart format `test(a...)` =>` test a...`
```


### Expected result

```console
pass
```


### Got

```console
main.gop:5:11: expected ';', found 'EOF'
```


### Gop Version

main version

### Additional Notes

smart format `test(a...)` =>` test a...`

Pull request description:
fix #1644: parse `println x...`

Patch:
diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml
index 2e61bcb0..91acd95c 100644
--- a/.github/workflows/release-build.yml
+++ b/.github/workflows/release-build.yml
@@ -50,13 +50,3 @@ jobs:
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         WINGET_PKGS_PRIVATE_KEY: ${{ secrets.WINGET_PKGS_PRIVATE_KEY }}
-
-    - name: Upload deb/rpm to Fury.io
-      run: |
-        for file in dist/*.{deb,rpm}
-        do
-          echo "Uploading $file to Fury.io"
-          curl -sS -F package=@$file https://$FURY_TOKEN@push.fury.io/goplus/
-        done
-      env:
-        FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 36519f89..908dddb4 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -68,25 +68,12 @@ changelog:
       - "^test:"
 
 winget:
-  - name: goplus
+  - name: gop
     homepage: "https://goplus.org/"
     publisher: goplus
     publisher_url: https://github.com/goplus/gop
     publisher_support_url: "https://github.com/goplus/gop/issues/new"
     package_identifier: goplus.gop
-    path: "manifests/g/goplus/gop/{{.Version}}"
-    tags:
-      - golang
-      - go
-      - gop
-      - goplus
-      - programming
-      - language
-      - compiler
-      - interpreter
-      - data science
-      - engineering
-      - education
     short_description: The Go+ Programming Language
     description: |
       The Go+ programming language is designed for engineering, STEM education, and data science.
@@ -116,7 +103,7 @@ winget:
           branch: master
 
 nfpms:
-  - package_name: gop
+  - package_name: goplus-gop
     vendor: goplus
     homepage: https://goplus.org/
     maintainer: Li Jie <cpunion@gmail.com>
@@ -192,7 +179,7 @@ nfpms:
 
 snapcrafts:
   - id: gop
-    name: gop
+    name: goplus
     title: The Go+ Programming Language
     summary: The Go+ Programming Language
     description: |
diff --git a/README.md b/README.md
index f0f460e8..397bc498 100644
--- a/README.md
+++ b/README.md
@@ -47,41 +47,6 @@ For more details, see [Quick Start](doc/docs.md).
 
 ## How to install
 
-### on Windows
-
-```sh
-winget install goplus
-```
-
-Or
-
-```sh
-winget install goplus.gop
-```
-
-### on Debian/Ubuntu
-
-```sh
-sudo bash -c ' echo "deb [trusted=yes] https://pkgs.goplus.org/apt/ /" > /etc/apt/sources.list.d/goplus.list'
-sudo apt update
-sudo apt install gop
-```
-
-### on RedHat/CentOS/Fedora
-
-```sh
-sudo bash -c 'echo -e "[goplus]\nname=Go+ Repo\nbaseurl=https://pkgs.goplus.org/yum/\nenabled=1\ngpgcheck=0" > /etc/yum.repos.d/goplus.repo'
-sudo yum install gop
-```
-
-### on macOS/Linux(Homebrew)
-
-Install via [brew](https://brew.sh/)
-
-```sh
-$ brew install goplus
-```
-
 ### from source code
 
 For now, we suggest you install Go+ from source code.
@@ -98,6 +63,14 @@ cd gop
 all.bat
 ```
 
+### on macOS/Linux
+
+Install via [brew](https://brew.sh/)
+```sh
+$ brew install goplus
+```
+
+
 ## Go+ Applications
 
 ### 2D Games powered by Go+
diff --git a/parser/parser.go b/parser/parser.go
index 83d27eb5..97423f23 100644
--- a/parser/parser.go
+++ b/parser/parser.go
@@ -466,8 +466,8 @@ func (p *parser) expectClosing(tok token.Token, context string) token.Pos {
 }
 
 func (p *parser) expectSemi() {
-	// semicolon is optional before a closing ')' or '}'
-	if p.tok != token.RPAREN && p.tok != token.RBRACE {
+	// semicolon is optional before a closing ')' or '}' or EOF
+	if p.tok != token.RPAREN && p.tok != token.RBRACE && p.tok != token.EOF {
 		switch p.tok {
 		case token.COMMA:
 			// permit a ',' instead of a ';' but complain


Test patch:
diff --git a/parser/_testdata/printvariadic/parser.expect b/parser/_testdata/printvariadic/parser.expect
new file mode 100644
index 00000000..61658c49
--- /dev/null
+++ b/parser/_testdata/printvariadic/parser.expect
@@ -0,0 +1,24 @@
+package main
+
+file printv.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.Ident:
+                  Name: x
diff --git a/parser/_testdata/printvariadic/printv.gop b/parser/_testdata/printvariadic/printv.gop
new file mode 100644
index 00000000..72d734b3
--- /dev/null
+++ b/parser/_testdata/printvariadic/printv.gop
@@ -0,0 +1,1 @@
+println x...