aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-11-22 15:26:07 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-11-22 15:26:07 +0100
commite057548616f186e5d717d6fed8ddb2f21237500b (patch)
tree465b40f730593eb421b5569eef923eccbdd83d2b
parenta19102f67706ba2b9c51eb337eb097d3ac070e19 (diff)
downloadPraspel-e057548616f186e5d717d6fed8ddb2f21237500b.zip
Praspel-e057548616f186e5d717d6fed8ddb2f21237500b.tar.gz
Praspel-e057548616f186e5d717d6fed8ddb2f21237500b.tar.bz2
Support crate constant.
-rw-r--r--Visitor/Compiler.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/Visitor/Compiler.php b/Visitor/Compiler.php
index 38600f3..4c52a70 100644
--- a/Visitor/Compiler.php
+++ b/Visitor/Compiler.php
@@ -297,6 +297,13 @@ class Compiler implements \Hoa\Visitor\Visit {
'(' . implode(', ', $oout) . ')';
}
}
+ elseif($element instanceof \Hoa\Realdom\Crate\Constant) {
+
+ $holder = $element->getHolder();
+ $praspel = $element->getPraspelRepresentation();
+ $out .= '$' . $element->getDeclaration()->getId() .
+ '[\'' . $praspel() . '\']';
+ }
elseif($element instanceof \Hoa\Realdom\Crate\Variable) {
$holder = $element->getVariable();