fix accidental commit

This commit is contained in:
mohrt
2003-02-03 15:39:47 +00:00
parent 8e8c2afc86
commit b8b04c056e
8 changed files with 194 additions and 502 deletions

View File

@@ -55,6 +55,7 @@ class Smarty_Compiler extends Smarty {
var $_si_qstr_regexp = null;
var $_qstr_regexp = null;
var $_func_regexp = null;
var $_dvar__gets_regexp = null;
var $_dvar_regexp = null;
var $_cvar_regexp = null;
var $_svar_regexp = null;
@@ -86,14 +87,15 @@ class Smarty_Compiler extends Smarty {
$this->_qstr_regexp = '(?:' . $this->_db_qstr_regexp . '|' . $this->_si_qstr_regexp . ')';
// matches $ vars (not objects):
// $foo
// $foo.bar
// $foo.bar.foobar
// $foo[0]
// $foo[$bar]
// $foo[5][blah]
// $foo[5].bar[$foobar][4]
$this->_dvar_regexp = '\$\w+(?:\[\$?[\w\.]+\])*(?:\.\$?\w+(?:\[\$?[\w\.]+\])*)*';
// foo
// foo.bar
// foo.bar.foobar
// foo[0]
// foo[$bar]
// foo[5][blah]
// foo[5].bar[$foobar][4]
$this->_dvar_guts_regexp = '\w+(?:\[\$?[\w\.]+\])*(?:\.\$?\w+(?:\[\$?[\w\.]+\])*)*';
$this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
// matches config vars:
// #foo#
@@ -130,13 +132,15 @@ class Smarty_Compiler extends Smarty {
// matches valid object call (no objects allowed in parameters):
// $foo->bar
// $foo->bar[0]
// $foo->bar[$x].foobar
// $foo->bar()
// $foo->bar("text")
// $foo->bar($foo, $bar, "text")
// $foo->bar($foo|bar, "foo"|bar)
// $foo->bar->foo()
// $foo->bar->foo->bar()
$this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:\->\w+)+)';
$this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:\->' . $this->_dvar_guts_regexp . ')+)';
$this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:\((?:\w+|'
. $this->_var_regexp . '(?>' . $this->_mod_regexp . '*)(?:\s*,\s*(?:(?:\w+|'
. $this->_var_regexp . '(?>' . $this->_mod_regexp . '*))))*)?\))?)';