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

remove : from infix operator regex #1483

Open
cyrus- opened this issue Jan 28, 2025 · 3 comments
Open

remove : from infix operator regex #1483

cyrus- opened this issue Jan 28, 2025 · 3 comments

Comments

@cyrus-
Copy link
Member

cyrus- commented Jan 28, 2025

If you start with

let x|, y = 

and type :

you get

Image

which subsequently means that if I press <space>Int then the space doesn't get inserted.

Easiest fix might be to not treat : as part of the same operator syntax as ,. Or some other space insertion related fix could deal with this.

@7h3kk1d
Copy link
Contributor

7h3kk1d commented Jan 29, 2025

I can't tell if this is related or not but I'm having an issue with removing spaces around = for labeled tuples because adjacent operators get merged. I'm assuming this is because the joined operator is being interpreted as an operator?

Image
Image

@cyrus-
Copy link
Member Author

cyrus- commented Jan 29, 2025

Yeah that does look to be what is happening. May need a more sophisticated regex for grouping operators together to make the label = work?

@7h3kk1d
Copy link
Contributor

7h3kk1d commented Jan 29, 2025

I don't think this is a = exclusive problem. Same thing happens if you try to do 1==-1 on dev. Temporarily I'm just doing spaces after the = for labels and non before. We need a better way to break apart adjoining operators.

Image

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