Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment at last line causing parsing error #551

Closed
ariady-putra opened this issue May 28, 2023 · 0 comments
Closed

Comment at last line causing parsing error #551

ariady-putra opened this issue May 28, 2023 · 0 comments
Labels
bug Something isn't working parsing Parser work

Comments

@ariady-putra
Copy link

What Git revision are you using?

aiken 1.0.4-alpha

What operating system are you using, and which version?

  • Linux / Ubuntu 20.04.4 LTS (64-bit)
  • Aiken Playground

Describe what the problem is?

Putting comment at the last line of a file gives the unexpected token parsing error. The same behavior is also observed on Aiken Playground (go to play.aiken-lang.org, add // to the last line, click Format or Check)

[File ends at line 21] Not good:

Screenshot from 2023-05-28 16-37-44

aiken::parser

  × While parsing files...
  ╰─▶ I found an unexpected token '"/"'.
[File ends at line 22] Good:

Screenshot from 2023-05-28 16-41-21

Aiken Playground:

Screenshot from 2023-05-28 21-40-46

What should be the expected behavior?

Either automatically add a new empty line upon formatting, or it shouldn't be an error.

@KtorZ KtorZ added parsing Parser work bug Something isn't working labels May 30, 2023
@rvcas rvcas closed this as completed in 26a607e May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parsing Parser work
Projects
Status: 🚀 Released
Development

No branches or pull requests

2 participants