mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 20:20:44 +00:00
Fixed: Removed extra spaces in code generation between 'else' and 'if' in 'else if' statements
This commit is contained in:
1 parent
e35bfaf96c
commit
b6fd6a15f0
1 file changed
+9
-2
@@ -564,7 +564,10 @@ IfStatement: function(node, st, c) {
|
||||
buffer;
|
||||
if (generate) {
|
||||
buffer = compiler.jsBuffer;
|
||||
CONCAT(buffer, indentation);
|
||||
if (!st.superNodeIsElse)
|
||||
CONCAT(buffer, indentation);
|
||||
else
|
||||
delete st.superNodeIsElse;
|
||||
CONCAT(buffer, "if (");
|
||||
}
|
||||
c(node.test, st, "Expression");
|
||||
@@ -579,7 +582,11 @@ IfStatement: function(node, st, c) {
|
||||
CONCAT(buffer, indentation);
|
||||
CONCAT(buffer, alternateNotIf ? "else\n" : "else ");
|
||||
}
|
||||
if (alternateNotIf) indentation += indentStep;
|
||||
if (alternateNotIf)
|
||||
indentation += indentStep;
|
||||
else
|
||||
st.superNodeIsElse = true;
|
||||
|
||||
c(alternate, st, "Statement");
|
||||
if (alternateNotIf) indentation = indentation.substring(indentationSpaces);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user