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

Spaces around the dynamic (?) operator #39

Closed
ovatsus opened this issue Jul 1, 2013 · 5 comments
Closed

Spaces around the dynamic (?) operator #39

ovatsus opened this issue Jul 1, 2013 · 5 comments

Comments

@ovatsus
Copy link

ovatsus commented Jul 1, 2013

I got this:

{ Code = code
  Name = station?StationName.Replace(" Rail Station", null)

converted to this:

{ Code = code
  Name = station ? StationName.Replace(" Rail Station", null)

which is not very common.
Unlike th other infix operators, the ? operator doesn't usually have spaces around

@dungpa
Copy link
Contributor

dungpa commented Jul 1, 2013

Agree. What are other infix operators which shouldn't have spaces around?

This is relatively easy to handle, but it's hard to remember all the cases :-).

@ovatsus
Copy link
Author

ovatsus commented Jul 1, 2013

I can't think of any other

@dungpa
Copy link
Contributor

dungpa commented Jul 3, 2013

Steps to fix if anyone would like to handle this issue:

@ovatsus
Copy link
Author

ovatsus commented Jul 3, 2013

Is there a ".." operator?

@dungpa
Copy link
Contributor

dungpa commented Jul 3, 2013

It is range operator e.g.

1..2 <--> (..) 1 2
1..2..5 <--> (.. ..) 1 2 5

That's how it is stored in F# ASTs. I'm not sure second form is valid to use in the code though.

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

No branches or pull requests

2 participants