IfStmt Doesn't have GetThenBlockStmt() ?

25 views
Skip to first unread message

Muneeb

unread,
Jul 31, 2010, 3:51:38 PM7/31/10
to JavaParser
Hi,

I posted this in the wiki as well.

I am struggling to understand that the IfStmt doesn't have a function
to return all the then statements? It has a single GetThenStmt() which
returns a single statement. That means we can't separate nested ifs.

But when I run through the compilation unit using the visitor pattern,
it finds the nested ifs too. How can I go through all the nested ifs
without the Visitor?

Thanks

Muneeb

unread,
Jul 31, 2010, 7:15:11 PM7/31/10
to JavaParser
ignore this. i just realized it's a pretty stupid question. BlockStmt
extends Statement.

mathew mooty

unread,
Aug 1, 2010, 8:51:18 AM8/1/10
to javap...@googlegroups.com
Muneeb,

No worries, it's better to ask and then find out the answer than not ask and be lost for weeks. I'm glad this is resolved. Good luck with your coding!
 
Thanks,

Mathew Mooty
Computer Science
Carnegie Mellon University


--
You received this message because you are subscribed to the Google Groups "JavaParser" group.
To post to this group, send email to javap...@googlegroups.com.
To unsubscribe from this group, send email to javaparser+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaparser?hl=en.


Reply all
Reply to author
Forward
0 new messages