Skip to content

Conversation

@jiribenes
Copy link
Contributor

@jiribenes jiribenes commented Dec 5, 2025

Resolves #462

Caution

Please don't merge this yet, I'm not happy about the implementation. Thanks!

The parser soft fails (fails with recovery) if it encounters a binary operator that is not surrounded by some whitespace:

// OK
val _ = 1 + 2
val _ = 1  + 2
val _ = 1 +  2
val _ = 1 +
  2

// FAIL
val _ = 1 +2
val _ = 1+ 2
val _ = 1+2

The implementation is a bit hacky, see the note in the comment.

@jiribenes jiribenes added experiment Experimental branch, do not merge! area:parser/lexer labels Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:parser/lexer experiment Experimental branch, do not merge!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

x!=y interpreted as x! = y due to ! being allowed in identifiers

2 participants