Community
Participate
Working Groups
Created attachment 96388 [details] patch to handle nested functions The AST/Parser can't handle nested functions. The inner function will be represented as an empty statement. For the refactoring support it is essential to get a correct AST of the source code. Example javascript code: function outerFunction() { function innerFunction(){ } } ... Will be represented as: function outerFunction() { ; } AST creates an empty statement instead of a nested function.
Created attachment 96391 [details] patch to handle nested functions new patch to handle nested functions, the old patch was wrong.
This patch will not work as is because MethodDeclaration has been renamed to FunctionDeclaration.
Hi Phil, thanks for the information, I have applied the mentioned refactoring scripts to our source. I have seen that the class org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration has still the MethodDeclaration name instead of FunctionDeclaration... just for your information. The new patch is attached.
Created attachment 98875 [details] new patch to handle nested functions
This patch looks good.
The issue looks to be considerable to be fixed in RC. Patch looks quite simple. But, like in bug 231122, a few book-keeping details before approving: - PMC in Whiteboard - Helen to CC - set Target Milestone - consider the "contribution" keyword if Etienne is not a committer
Thanks for the changes, Etienne. However, my notes were addressed to Phil since they are his responsibilities as component lead :-) Still, waiting Phil to set the Target Milestone.
Approved
Applied patches. Thank you for your continuing contributions.