haxe-formatter icon indicating copy to clipboard operation
haxe-formatter copied to clipboard

Questionable OpAdd wrapping

Open Gama11 opened this issue 6 years ago • 1 comments

Input file

class Main {
	static function main() {
		var generatedCodeSlsdjffs = TypeHelper.printFunctionDeclaration(args, ret, context.config.codeGeneration.functions.anonymous) + " ";
	}
}

Broken output

class Main {
	static function main() {
		var generatedCodeSlsdjffs = TypeHelper.printFunctionDeclaration(args, ret, context.config.codeGeneration.functions.anonymous)
			+ " ";
	}
}

This is even still > 160 characters long after the wrapping, so it's definitely wrapping at the wrong point.

Gama11 avatar Feb 20 '19 22:02 Gama11

yeah, we will have to play with defaults for a bit, to get a good balance... although I think in this case maybe wrapping.callParameter should kick in

AlexHaxe avatar Feb 20 '19 23:02 AlexHaxe