aboutsummaryrefslogtreecommitdiffstats
path: root/Visitor/Interpreter.php
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-05-21 08:50:55 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-05-21 08:53:31 +0200
commit3f019dd711477be78bcdc6718d1aab890ca9bb12 (patch)
treef4615a4c901ebe2769bea8f95a46d05d9102d06f /Visitor/Interpreter.php
parentb5fcc37c476df179f020ea6686f7ecfe4d3dc739 (diff)
downloadPraspel-3f019dd711477be78bcdc6718d1aab890ca9bb12.zip
Praspel-3f019dd711477be78bcdc6718d1aab890ca9bb12.tar.gz
Praspel-3f019dd711477be78bcdc6718d1aab890ca9bb12.tar.bz2
Add syntactic sugar for class().
\C <=> class('C').
Diffstat (limited to 'Visitor/Interpreter.php')
-rw-r--r--Visitor/Interpreter.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/Visitor/Interpreter.php b/Visitor/Interpreter.php
index ad60b68..0a5c234 100644
--- a/Visitor/Interpreter.php
+++ b/Visitor/Interpreter.php
@@ -473,6 +473,12 @@ class Interpreter implements \Hoa\Visitor\Visit {
return realdom()->regex($regex);
break;
+ case '#class':
+ $classname = $element->getChild(0)->accept($this, $handle, false);
+
+ return realdom()->class($classname);
+ break;
+
case 'token':
$tId = $element->getValueToken();
$value = $element->getValueValue();