From 3799714d53dac4e5d9543f20cb155c9e3cd8a0a1 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Sun, 5 Nov 2017 20:04:32 +0100 Subject: lexer/parser optimization --- lexer/smarty_internal_templatelexer.plex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexer/smarty_internal_templatelexer.plex') diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index a92653d0..fb185db1 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -306,7 +306,7 @@ class Smarty_Internal_Templatelexer aptr = ~\s*[=][>]\s*~ singlequotestring = ~'[^'\\]*(?:\\.[^'\\]*)*'~ backtick = ~[`]~ - vert = ~[|]~ + vert = ~[|][@]?~ qmark = ~\s*[?]\s*~ constant = ~[_]+[A-Z0-9][0-9A-Z_]*|[A-Z][0-9A-Z_]*(?![0-9A-Z_]*[a-z])~ attr = ~\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\s*[=]\s*~ @@ -344,7 +344,7 @@ class Smarty_Internal_Templatelexer if (isset($match[0][1])) { $to = $match[0][1] + strlen($match[0][0]); } else { - $this->compiler->trigger_template_error ("missing or misspelled comment closing tag '*{$this->smarty->getRightDelimiter()}'"); + $this->compiler->trigger_template_error ("missing or misspelled comment closing tag '{$this->smarty->getRightDelimiter()}'"); } $this->value = substr($this->data,$this->counter,$to-$this->counter); return false; -- cgit v1.3