winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.89k stars 194 forks source link

`Unknown parser error` when adding redundant `;` #2989

Open eladb opened 1 year ago

eladb commented 1 year ago

I tried this:

;

Playground

This happened:

error: Unknown parser error
  --> test.w:1:1
  |
1 | ;
  | ^ Unknown parser error

I expected this:

I don't think this should be a compilation error. An empty statement should be fine I think, no?

Is there a workaround?

No response

Component

Language Design, Compiler

Wing Version

No response

Wing Console Version

No response

Node.js Version

No response

Platform(s)

No response

Anything else?

No response

Community Notes

github-actions[bot] commented 1 year ago

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

Chriscbr commented 1 year ago

I think a consequence of this would be that code like this is valid:

log("cool beans");;;;;;

But it's ok to leave fixing this to the job of a formatter/linter

github-actions[bot] commented 10 months ago

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] commented 5 months ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] commented 2 months ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!