aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-03-31 19:31:20 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-03-31 19:31:20 +0200
commit080f7b8777d237aeadae68b8e716c7b8ccd7bc0a (patch)
tree23e37ea3219ef4d936b45316f57b6d561784affa
parenta72bfbb80a5b971a036f21c95e7bbfca001e1427 (diff)
downloadPraspel-080f7b8777d237aeadae68b8e716c7b8ccd7bc0a.zip
Praspel-080f7b8777d237aeadae68b8e716c7b8ccd7bc0a.tar.gz
Praspel-080f7b8777d237aeadae68b8e716c7b8ccd7bc0a.tar.bz2
Avoid some creation of a #dynamic_resolution node.
-rw-r--r--Grammar.pp2
-rw-r--r--Visitor/Interpreter.php3
2 files changed, 1 insertions, 4 deletions
diff --git a/Grammar.pp b/Grammar.pp
index 75dcef6..2eb8f50 100644
--- a/Grammar.pp
+++ b/Grammar.pp
@@ -279,7 +279,7 @@ arrayaccess:
identifier:
( <identifier> | <this> )
- ( ::arrow:: <identifier> ( ::arrow:: <identifier> )* )? #dynamic_resolution
+ ( ::arrow:: <identifier> ( ::arrow:: <identifier> )* #dynamic_resolution )?
| (
::self:: #self_identifier
| ::static:: #static_identifier
diff --git a/Visitor/Interpreter.php b/Visitor/Interpreter.php
index 0781763..ad60b68 100644
--- a/Visitor/Interpreter.php
+++ b/Visitor/Interpreter.php
@@ -408,9 +408,6 @@ class Interpreter implements \Hoa\Visitor\Visit {
break;
case '#dynamic_resolution':
- if(1 === $element->getChildrenNumber())
- return $element->getChild(0)->accept($this, $handle, $eldnah);
-
$value = null;
foreach($element->getChildren() as $child) {