You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/04/09 01:05:11 UTC
[05/18] git commit: [flex-falcon] [refs/heads/develop] - handle
parens around unary operators as well
handle parens around unary operators as well
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/f454bff0
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/f454bff0
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/f454bff0
Branch: refs/heads/develop
Commit: f454bff0a4c91af4905487c6d044d6f105849599
Parents: 01997dc
Author: Alex Harui <ah...@apache.org>
Authored: Tue Mar 24 22:45:38 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Mar 24 22:45:38 2015 -0700
----------------------------------------------------------------------
.../apache/flex/compiler/internal/codegen/as/ASEmitter.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f454bff0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java
index 9214d39..b7db495 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java
@@ -1377,6 +1377,9 @@ public class ASEmitter implements IASEmitter, IEmitter
@Override
public void emitUnaryOperator(IUnaryOperatorNode node)
{
+ if (ASNodeUtils.hasParenOpen(node))
+ write(ASEmitterTokens.PAREN_OPEN);
+
if (node.getNodeID() == ASTNodeID.Op_PreIncrID
|| node.getNodeID() == ASTNodeID.Op_PreDecrID
|| node.getNodeID() == ASTNodeID.Op_BitwiseNotID
@@ -1417,6 +1420,9 @@ public class ASEmitter implements IASEmitter, IEmitter
getWalker().walk(node.getOperandNode());
write(ASEmitterTokens.PAREN_CLOSE);
}
+
+ if (ASNodeUtils.hasParenClose(node))
+ write(ASEmitterTokens.PAREN_CLOSE);
}
@Override