aboutsummaryrefslogtreecommitdiffstats
path: root/Visitor/Interpreter.php
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-09-27 11:40:07 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-09-27 11:40:07 +0200
commit59c6e481e07158aca3000e2f94b4f80e9f82b4ed (patch)
treed2bda3eec1a0329e223321faea1cb6770f3257af /Visitor/Interpreter.php
parent586a8d07ccee20fe3c31c9d990b58bb713ce6753 (diff)
downloadPraspel-59c6e481e07158aca3000e2f94b4f80e9f82b4ed.zip
Praspel-59c6e481e07158aca3000e2f94b4f80e9f82b4ed.tar.gz
Praspel-59c6e481e07158aca3000e2f94b4f80e9f82b4ed.tar.bz2
Support variables in disjunctions!
Diffstat (limited to 'Visitor/Interpreter.php')
-rw-r--r--Visitor/Interpreter.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/Visitor/Interpreter.php b/Visitor/Interpreter.php
index 3f0745f..be020ff 100644
--- a/Visitor/Interpreter.php
+++ b/Visitor/Interpreter.php
@@ -54,6 +54,11 @@ from('Hoa')
-> import('Visitor.Visit')
/**
+ * \Hoa\Realdom\Crate\Variable
+ */
+-> import('Realdom.Crate.Variable')
+
+/**
* \Hoa\Realdom\Crate\Constant
*/
-> import('Realdom.Crate.Constant')
@@ -288,6 +293,8 @@ class Interpreter implements \Hoa\Visitor\Visit {
if($value instanceof \Hoa\Realdom\Disjunction)
$disjunction[] = $value;
+ elseif($value instanceof \Hoa\Praspel\Model\Variable)
+ $disjunction->variable(new \Hoa\Realdom\Crate\Variable($value));
else
$disjunction->const($value);
}