Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317342

Summary: AST: ASTIfConstructNode and ASTWhereConstructNode structured incorrectly
Product: [Tools] PTP Reporter: Matthew Fotzler <incongruous>
Component: Photran.For Internal UseAssignee: Photran Inbox <photran-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P4 CC: com-eclipse-dot-org
Version: 6.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
proposed patch com-eclipse-dot-org: iplog+

Description Matthew Fotzler CLA 2010-06-18 18:06:16 EDT
Build Identifier: 

The ASTIfConstructNode buries else ifs and elses in a recursive manner, should be more like a list of else if constructs and an else construct.

Reproducible: Always
Comment 1 Matthew Fotzler CLA 2010-06-24 10:14:43 EDT
The Control Flow Graph code will probably need to be changed once this is fixed.
Comment 2 Matthew Fotzler CLA 2010-06-24 16:47:03 EDT
ASTWhereConstructNodes suffer from the same structure problem.
Comment 3 Matthew Fotzler CLA 2010-10-15 12:50:34 EDT
Created attachment 180988 [details]
proposed patch

This provides IfConstructRestructurer and WhereConstructRestructurer, which will pull the else/elsewhere and end if/where statements from the elsewhere, else if constructs to the if/where constructs.
Comment 4 Jeffrey Overbey CLA 2010-10-15 14:58:35 EDT
Thanks, Matt.  Can you please confirm that

1. you wrote 100% of the code without incorporating content from elsewhere or relying on the intellectual property of others,

2. you have the right to contribute the code to Eclipse, and

3. you have included the EPL license header in all source files?
Comment 5 Matthew Fotzler CLA 2010-10-15 15:09:29 EDT
Yes, I wrote 100% of the code without incorporating content from elsewhere or relying on the intellectual property of others, I have the right to contribute the code to Eclipse, and I have included the EPL license header in all source files.