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

Syntax error in hexadecimal representation with letters #20

Open
haroflow opened this issue Apr 14, 2024 · 1 comment
Open

Syntax error in hexadecimal representation with letters #20

haroflow opened this issue Apr 14, 2024 · 1 comment

Comments

@haroflow
Copy link

Hi, thanks for this extension, it really helps learning the language!

I don't know if it's Gleam LSP or glas, but this code is throwing syntax errors when there are letters in the hex values:

import gleam/io

fn dbg(i: Int) {
  io.debug(i)
}

pub fn main() {
  io.println("Hello from glas_test!")
  dbg(0x0)
  dbg(0x00112233)
  dbg(0x0a)
  dbg(0xa0)
  dbg(0xaa)
  dbg(0xAA)
  dbg(0xAABBCCDD)
}

image

The program compiles and runs just fine, it's not a big problem for me.
The official gleam extension doesn't show this error, but it's too early to use it.

My setup:

  • Windows 10
  • VSCode 1.88.1
  • Gleam 1.0.0
  • glas v0.2.3
@maurobalbi
Copy link
Owner

Thanks for the report! This is a bug in the parser. There's still some discrepancies between this and the official compiler which I'm hoping to iron out eventually!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants