From f36648c39c7a2b1885d412e2896be23606a8b8cc Mon Sep 17 00:00:00 2001 From: mohrt Date: Thu, 9 Sep 2004 18:25:55 +0000 Subject: [PATCH] update code comment with more examples --- libs/Smarty_Compiler.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index cc3d0c14..ea9c746f 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -139,7 +139,7 @@ class Smarty_Compiler extends Smarty { // "text" $this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_num_const_regexp . '|' . $this->_qstr_regexp . ')'; - // matches valid object call (no objects allowed in parameters): + // matches valid object call (one level of object nesting allowed in parameters): // $foo->bar // $foo->bar() // $foo->bar("text") @@ -147,6 +147,9 @@ class Smarty_Compiler extends Smarty { // $foo->bar($foo, "foo") // $foo->bar->foo() // $foo->bar->foo->bar() + // $foo->bar($foo->bar) + // $foo->bar($foo->bar()) + // $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar)) $this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')'; $this->_obj_params_regexp = '\((?:\w+|(?:' . $this->_var_regexp . '(?:' . $this->_obj_ext_regexp . '(?:\((?:' . $this->_var_regexp