aboutsummaryrefslogtreecommitdiffstats
path: root/Visitor/Interpreter.php
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-04-23 15:54:50 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-04-23 15:54:50 +0200
commit73afcad19993e283d0945a3d5be25b8250ef4898 (patch)
tree6ee36925fd7eb12b3e2858ce70003c66bce6dc15 /Visitor/Interpreter.php
parent057439b846af197af8f15e19c4b7adac8bf589ef (diff)
downloadPraspel-73afcad19993e283d0945a3d5be25b8250ef4898.zip
Praspel-73afcad19993e283d0945a3d5be25b8250ef4898.tar.gz
Praspel-73afcad19993e283d0945a3d5be25b8250ef4898.tar.bz2
New @throwable clause API.
Diffstat (limited to 'Visitor/Interpreter.php')
-rw-r--r--Visitor/Interpreter.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/Visitor/Interpreter.php b/Visitor/Interpreter.php
index ccbca14..37be4da 100644
--- a/Visitor/Interpreter.php
+++ b/Visitor/Interpreter.php
@@ -173,10 +173,21 @@ class Interpreter implements \Hoa\Visitor\Visit {
break;
case '#exception_list':
- foreach($element->getChildren() as $child)
- $this->_clause->exception(
- $child->accept($this, $handle, false)
+ for($i = 0, $max = $element->getChildrenNumber(); $i < $max; $i += 2) {
+
+ $identifier = $element->getChild($i + 1)->accept(
+ $this,
+ $handle,
+ false
+ );
+ $classname = $element->getChild($i)->accept(
+ $this,
+ $handle,
+ false
);
+
+ $this->_clause[$identifier] = $classname;
+ }
break;
case '#declaration':