Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317342 - AST: ASTIfConstructNode and ASTWhereConstructNode structured incorrectly
Summary: AST: ASTIfConstructNode and ASTWhereConstructNode structured incorrectly
Status: NEW
Alias: None
Product: PTP
Classification: Tools
Component: Photran.For Internal Use (show other bugs)
Version: 6.0   Edit
Hardware: All All
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Photran Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 18:06 EDT by Matthew Fotzler CLA
Modified: 2012-03-14 16:19 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch (9.21 KB, patch)
2010-10-15 12:50 EDT, Matthew Fotzler CLA
com-eclipse-dot-org: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.