Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran-dev] It's possible to get a body of an DoConstrucNode?

Hi Bruno (and Stas),

I've observed that don't exists a correlation between the DoConstrucNode and the EndDoStmtNode. They don't form a block (as the IfConstructNode).
...
It's possible to get a body of an DoConstrucNode?

I finally implemented this this evening.

There is a new package in the core.vpg plug-in called org.eclipse.photran.internal.core.analysis.loops. See the JavaDoc for those classes. If you call LoopReplacer.replaceAllLoopsIn(ast), it will identify all of the new-style DO-loops and change them to ASTProperLoopConstructNodes, which have the structure you would expect.

There are also some new Visitor classes in that package which have a callback method for this new node.

Jeff


Back to the top