Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: third_party/jinja2/parser.py

Issue 23506004: Update Jinja2 (Python template library) to 2.7.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/jinja2/nodes.py ('k') | third_party/jinja2/runtime.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/jinja2/parser.py
diff --git a/third_party/jinja2/parser.py b/third_party/jinja2/parser.py
index d44229ad0f09a562bbf67de4a5daf5d5730456ab..f60cd018c51fff457dfaea5283b78267a4a0eefd 100644
--- a/third_party/jinja2/parser.py
+++ b/third_party/jinja2/parser.py
@@ -10,8 +10,8 @@
"""
from jinja2 import nodes
from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError
-from jinja2.utils import next
from jinja2.lexer import describe_token, describe_token_expr
+from jinja2._compat import next, imap
#: statements that callinto
@@ -53,7 +53,7 @@ class Parser(object):
def _fail_ut_eof(self, name, end_token_stack, lineno):
expected = []
for exprs in end_token_stack:
- expected.extend(map(describe_token_expr, exprs))
+ expected.extend(imap(describe_token_expr, exprs))
if end_token_stack:
currently_looking = ' or '.join(
"'%s'" % describe_token_expr(expr)
@@ -223,7 +223,7 @@ class Parser(object):
# raise a nicer error message in that case.
if self.stream.current.type == 'sub':
self.fail('Block names in Jinja have to be valid Python '
- 'identifiers and may not contain hypens, use an '
+ 'identifiers and may not contain hyphens, use an '
'underscore instead.')
node.body = self.parse_statements(('name:endblock',), drop_needle=True)
@@ -698,7 +698,6 @@ class Parser(object):
arg = nodes.Const(attr_token.value, lineno=attr_token.lineno)
return nodes.Getitem(node, arg, 'load', lineno=token.lineno)
if token.type == 'lbracket':
- priority_on_attribute = False
args = []
while self.stream.current.type != 'rbracket':
if args:
« no previous file with comments | « third_party/jinja2/nodes.py ('k') | third_party/jinja2/runtime.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698