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

Conditionals in function arguments with question mark #397

Closed
Gama11 opened this issue Mar 12, 2019 · 0 comments
Closed

Conditionals in function arguments with question mark #397

Gama11 opened this issue Mar 12, 2019 · 0 comments
Labels
bug Something isn't working sameline broken same line formatting whitespace missing or incorrect space around token

Comments

@Gama11
Copy link
Member

Gama11 commented Mar 12, 2019

The formatter handles conditionals in function arguments pretty well:

class Main {
	static function foo(#if false bar:Int, #end foobar:Int) {}
}

However, if the second argument here starts with a ?, the space after #end goes missing:

class Main {
	static function foo(#if false bar:Int, #end?foobar:Int) {}
}
@Gama11 Gama11 added bug Something isn't working wrapping Incorrect or undesirable wrapping labels Mar 12, 2019
@AlexHaxe AlexHaxe added whitespace missing or incorrect space around token sameline broken same line formatting and removed wrapping Incorrect or undesirable wrapping labels Mar 12, 2019
AlexHaxe added a commit to AlexHaxe/haxe-formatter that referenced this issue Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sameline broken same line formatting whitespace missing or incorrect space around token
Projects
None yet
Development

No branches or pull requests

2 participants