Skip to content

Conversation

AStenbaek
Copy link

@AStenbaek AStenbaek commented Aug 24, 2025

Resolves #56

Tasks:

  • Updated the lexer to support expanded notation for integer literals. The implementation is simple, relying on the the Haskell Numeric library.
  • Added tests all mirror the behavior of OCaml.
  • Currently, 0b117 gets parsed as 3, leaving 7 as a separate number. In this case, the runtime breaks as it tries to 3(7). Instead, this should be an error at compile time.

@ssoelvsten ssoelvsten added ✨ enhancement New feature or request 📁 ./compiler Changes, errors, and additions for the compiler labels Sep 14, 2025
@ssoelvsten ssoelvsten requested a review from aslanix September 16, 2025 11:52
@ssoelvsten ssoelvsten marked this pull request as draft September 16, 2025 11:56
@aslanix
Copy link
Contributor

aslanix commented Sep 19, 2025

This needs to fix the missing todos, and add negative tests. For example, 0x________A is rejected by the OCaml.

@AStenbaek
Copy link
Author

AStenbaek commented Sep 19, 2025

The feature should be implemented now.
I do not know why two multi-node tests failed in the GitHub action, but all tests passes on my machine.

@ssoelvsten ssoelvsten marked this pull request as ready for review September 20, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📁 ./compiler Changes, errors, and additions for the compiler ✨ enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants