allow $foo->bar[0] syntax

This commit is contained in:
mohrt
2003-02-18 18:08:05 +00:00
parent dfdac1166e
commit 2d6d972bf5
2 changed files with 2 additions and 2 deletions

View File

@@ -139,7 +139,7 @@ class Smarty_Compiler extends Smarty {
// $foo->bar($foo, "foo") // $foo->bar($foo, "foo")
// $foo->bar->foo() // $foo->bar->foo()
// $foo->bar->foo->bar() // $foo->bar->foo->bar()
$this->_obj_ext_regexp = '\->(?:\w+|' . $this->_dvar_regexp . ')'; $this->_obj_ext_regexp = '\->(?:\w+|\$?' . $this->_dvar_guts_regexp . ')';
$this->_obj_params_regexp = '\((?:\w+|' $this->_obj_params_regexp = '\((?:\w+|'
. $this->_var_regexp . '(?:\s*,\s*(?:(?:\w+|' . $this->_var_regexp . '(?:\s*,\s*(?:(?:\w+|'
. $this->_var_regexp . ')))*)?\)'; . $this->_var_regexp . ')))*)?\)';

View File

@@ -139,7 +139,7 @@ class Smarty_Compiler extends Smarty {
// $foo->bar($foo, "foo") // $foo->bar($foo, "foo")
// $foo->bar->foo() // $foo->bar->foo()
// $foo->bar->foo->bar() // $foo->bar->foo->bar()
$this->_obj_ext_regexp = '\->(?:\w+|' . $this->_dvar_regexp . ')'; $this->_obj_ext_regexp = '\->(?:\w+|\$?' . $this->_dvar_guts_regexp . ')';
$this->_obj_params_regexp = '\((?:\w+|' $this->_obj_params_regexp = '\((?:\w+|'
. $this->_var_regexp . '(?:\s*,\s*(?:(?:\w+|' . $this->_var_regexp . '(?:\s*,\s*(?:(?:\w+|'
. $this->_var_regexp . ')))*)?\)'; . $this->_var_regexp . ')))*)?\)';