From: Armin Ronacher Date: Sun, 4 Mar 2007 19:51:39 +0000 (+0100) Subject: [svn] fixed name / operator priority X-Git-Tag: 2.0rc1~469 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=51b3b3ab38760858aad885f42b0806f9b2f76937;p=jinja2.git [svn] fixed name / operator priority --HG-- branch : trunk --- diff --git a/jinja/lexer.py b/jinja/lexer.py index bb7dc95..970a1c6 100644 --- a/jinja/lexer.py +++ b/jinja/lexer.py @@ -13,7 +13,7 @@ from jinja.exceptions import TemplateSyntaxError # static regular expressions whitespace_re = re.compile(r'\s+(?m)') -name_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*[!?]?') +name_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*') string_re = re.compile(r"('([^'\\]*(?:\\.[^'\\]*)*)'" r'|"([^"\\]*(?:\\.[^"\\]*)*)")(?ms)') number_re = re.compile(r'\d+(\.\d+)*') @@ -59,8 +59,8 @@ class Lexer(object): tag_rules = [ (whitespace_re, None, None), (number_re, 'number', None), - (operator_re, 'operator', None), (name_re, 'name', None), + (operator_re, 'operator', None), (string_re, 'string', None) ]