Repository: flex-falcon Updated Branches: refs/heads/develop 3b036c5a7 -> 56c262ab3
FLEX-34990 Don't use wrapping parentheses unless the source had them. This closes #2 Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/56c262ab Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/56c262ab Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/56c262ab Branch: refs/heads/develop Commit: 56c262ab3753d4927ef6343d2a09eb6a264009f3 Parents: dfbd443 Author: Alex Harui <[email protected]> Authored: Mon Jan 4 14:23:46 2016 -0800 Committer: Alex Harui <[email protected]> Committed: Mon Jan 4 14:24:25 2016 -0800 ---------------------------------------------------------------------- .../compiler/internal/codegen/js/jx/FunctionCallEmitter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/56c262ab/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java ---------------------------------------------------------------------- diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java index 6c1c42d..c38d820 100644 --- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java +++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java @@ -112,11 +112,11 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu // function call gets parsed and evaluated before new // otherwise it just looks like any other "new function" // in JS. - if (nameNode.getNodeID() == ASTNodeID.FunctionCallID) + if (nameNode.hasParenthesis()) write(ASEmitterTokens.PAREN_OPEN); // I think we still need this for "new someVarOfTypeClass" getEmitter().getWalker().walk(nameNode); - if (nameNode.getNodeID() == ASTNodeID.FunctionCallID) + if (nameNode.hasParenthesis()) write(ASEmitterTokens.PAREN_CLOSE); } write(ASEmitterTokens.PAREN_OPEN);
