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

Broken indentation with conditionalized if #510

Open
Gama11 opened this issue Jun 14, 2019 · 0 comments
Open

Broken indentation with conditionalized if #510

Gama11 opened this issue Jun 14, 2019 · 0 comments
Labels
bug Something isn't working indentation Indentation is incorrect

Comments

@Gama11
Copy link
Member

Gama11 commented Jun 14, 2019

Input file

class Main {
	static function main() {
		#if (haxe_ver < "4.0.0")
		if (Std.is(data, Access))
		#else
		if (Std.is(data, Xml))
		#end
		{
			source = data;
		}
		else if (Std.is(data, ValidByteArray))
		{
			var bytes:ValidByteArray = cast data;
			source = new Access(Xml.parse(bytes.toString()));
			source = source.node.tileset;
		}
		else
		{
			throw "Unknown TMX tileset format";
		}
	}
}

Broken output

class Main {
	static function main() {
		#if (haxe_ver < "4.0.0")
		if (Std.is(data, Access))
		#else
		if (Std.is(data, Xml))
		#end
		{
			source = data;
		}
	else if (Std.is(data, ValidByteArray)) {
		var bytes:ValidByteArray = cast data;
		source = new Access(Xml.parse(bytes.toString()));
		source = source.node.tileset;
	} else {
		throw "Unknown TMX tileset format";
	}
	}
}
@Gama11 Gama11 added bug Something isn't working indentation Indentation is incorrect labels Jun 14, 2019
@Gama11 Gama11 reopened this Jun 14, 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 indentation Indentation is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant