aboutsummaryrefslogtreecommitdiffstats
path: root/Visitor/Interpreter.php
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-10 14:58:35 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-10 14:58:35 +0200
commit467d39b9047547ff94a37fdcb8805623ef09d542 (patch)
tree9fbb23471e3718c35546d4b6ff0a1e959a18459d /Visitor/Interpreter.php
parentd2f8208f2951691b550d912b5f725d2371af9e9a (diff)
downloadPraspel-467d39b9047547ff94a37fdcb8805623ef09d542.zip
Praspel-467d39b9047547ff94a37fdcb8805623ef09d542.tar.gz
Praspel-467d39b9047547ff94a37fdcb8805623ef09d542.tar.bz2
Add the @default clause!
The default clause represents a default/else behavior.
Diffstat (limited to 'Visitor/Interpreter.php')
-rw-r--r--Visitor/Interpreter.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/Visitor/Interpreter.php b/Visitor/Interpreter.php
index 4337740..d396e04 100644
--- a/Visitor/Interpreter.php
+++ b/Visitor/Interpreter.php
@@ -162,6 +162,19 @@ class Interpreter implements \Hoa\Visitor\Visit {
$this->_current = $previous;
break;
+ case '#default':
+ $children = $element->getChildren();
+ $previous = $this->_current;
+ $this->_clause = $this->_current
+ = $this->_current
+ ->getClause('default');
+
+ foreach($children as $child)
+ $child->accept($this, $handle, $eldnah);
+
+ $this->_current = $previous;
+ break;
+
case '#throwable':
$this->_clause = $this->_current->getClause('throwable');
$identifier = null;