Contents of try catch block

18 views
Skip to first unread message

Shaikh Ismail

unread,
Feb 4, 2018, 2:14:13 PM2/4/18
to Boa Language and Infrastructure User Forum
I've been playing around BOA's syntax and examples since a couple  of days. So, I'm trying to fetch contents of try-catch block and I see that only AST of the source code is available; I find 'try' block for example, by checking the StatementKind == TRY but there is no direct way of fetching the TRY.statements field as a string. Can you please tell me how to do this? Supporting piece of code would help.

Thanks.
-Ismail

Robert Dyer

unread,
Feb 4, 2018, 2:40:14 PM2/4/18
to boa-...@googlegroups.com
--
More information about Boa: http://boa.cs.iastate.edu/
---
You received this message because you are subscribed to the Google Groups "Boa Language and Infrastructure User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boa-user+unsubscribe@googlegroups.com.
To post to this group, send email to boa-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Dyer

unread,
Feb 4, 2018, 2:41:49 PM2/4/18
to boa-...@googlegroups.com
Hi Ismail,

You can't get there statements as a string.

Instead you access the statements as AST nodes.

If you are looking for a specific kind of node you can use a second visitor on the try body.

- Robert

On Feb 4, 2018 2:14 PM, "Shaikh Ismail" <sis...@ucdavis.edu> wrote:

--

Ismail

unread,
Feb 5, 2018, 10:44:03 AM2/5/18
to boa-...@googlegroups.com
Thanks Robert!

You received this message because you are subscribed to a topic in the Google Groups "Boa Language and Infrastructure User Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/boa-user/Ffc5ttlIKGM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to boa-user+unsubscribe@googlegroups.com.

To post to this group, send email to boa-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

UC Davis
Reply all
Reply to author
Forward
0 new messages