summaryrefslogtreecommitdiff
path: root/macros/ASTManagement/%trycatch_string.sci
diff options
context:
space:
mode:
authorClément DAVID2017-06-01 16:24:16 +0000
committerClément DAVID2017-06-01 16:24:16 +0000
commit06686ba87471cfff538795eeb4897d078b504a6c (patch)
tree25c0086b3629d84e6fa95d279875088c82cd388c /macros/ASTManagement/%trycatch_string.sci
parentcd563abb643108f4637e1bceb24cb7c5c12f7625 (diff)
downloadscilab2c-06686ba87471cfff538795eeb4897d078b504a6c.tar.gz
scilab2c-06686ba87471cfff538795eeb4897d078b504a6c.tar.bz2
scilab2c-06686ba87471cfff538795eeb4897d078b504a6c.zip
Add trycatch parsing
Diffstat (limited to 'macros/ASTManagement/%trycatch_string.sci')
-rw-r--r--macros/ASTManagement/%trycatch_string.sci14
1 files changed, 14 insertions, 0 deletions
diff --git a/macros/ASTManagement/%trycatch_string.sci b/macros/ASTManagement/%trycatch_string.sci
new file mode 100644
index 00000000..54441f75
--- /dev/null
+++ b/macros/ASTManagement/%trycatch_string.sci
@@ -0,0 +1,14 @@
+function txt=%trycatch_string(p)
+//overloading function for "trycatch" type tlist string function
+//
+//fields:
+// trystat : list('EOL') (the instructions list)
+// catchstat : list('EOL') (the instructions list on error)
+
+ txt=['Statements'
+ ' '+objectlist2string(p.trystat)
+ 'CatchStatements'
+ ' '+objectlist2string(p.catchstat)
+ 'EndProgram'
+ ]
+endfunction