Skip to content
Myr

[svn] fixed name / operator priority

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 63f9964 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:jinja/lexer.py+2 added-2 removed
11 unmodified lines
121314# static regular expressions15whitespace_re = re.compile(r'\s+(?m)')16name_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*[!?]?')16name_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*')17string_re = re.compile(r"('([^'\\]*(?:\\.[^'\\]*)*)'"18 r'|"([^"\\]*(?:\\.[^"\\]*)*)")(?ms)')19number_re = re.compile(r'\d+(\.\d+)*')20
37 unmodified lines
58 # parsing rules for tags59 tag_rules = [60 (whitespace_re, None, None),61 (number_re, 'number', None),62 (operator_re, 'operator', None),62 (name_re, 'name', None),63 (operator_re, 'operator', None),64 (string_re, 'string', None)65 ]6667 # assamble the root lexing rule. because "|" is ungreedy
142 unmodified lines