Home | History | Annotate | Download | only in jinja2

Lines Matching refs:Name

35     def __new__(cls, name, bases, d):
36 rv = type.__new__(cls, name, bases, d)
51 by their import name. The correct way to configure the extension is
56 is a terrible name, ``fragment_cache_prefix`` on the other hand is a good
57 name as includes the name of the extension (fragment cache).
80 def preprocess(self, source, name, filename=None):
102 is the name token that matched. This method has to return one or a
107 def attr(self, name, lineno=None):
115 return nodes.ExtensionAttribute(self.identifier, name, lineno=lineno)
117 def call_method(self, name, args=None, kwargs=None, dyn_args=None,
126 return nodes.Call(self.attr(name, lineno=lineno), args, kwargs,
234 name = parser.stream.expect('name')
235 if name.value in variables:
237 name.value, name.lineno,
243 variables[name.value] = var = parser.parse_expression()
245 variables[name.value] = var = nodes.Name(name.value, 'load')
249 plural_expr = nodes.Name('_trans', 'load')
250 variables[name.value] = plural_expr
252 nodes.Name('_trans', 'store'), var)
255 num_called_num = name.value == 'num'
268 plural_expr = nodes.Name(singular_names[0], 'load')
272 if parser.stream.current.test('name:pluralize'):
276 name = parser.stream.expect('name')
277 if name.value not in variables:
279 name.value, name.lineno,
281 plural_expr = variables[name.value]
282 num_called_num = name.value == 'num'
290 # register free names as simple name expressions
293 variables[var] = nodes.Name(var, 'load')
310 """Parse until the next block tag with a given name."""
319 name = parser.stream.expect('name').value
320 referenced.append(name)
321 buf.append('%%(%s)s' % name)
325 if parser.stream.current.test('name:endtrans'):
327 elif parser.stream.current.test('name:pluralize'):
353 gettext = nodes.Name('gettext', 'load')
359 ngettext = nodes.Name('ngettext', 'load')
429 list(parser.parse_statements(('name:endwith',),
443 node.body = parser.parse_statements(('name:endautoescape',),
475 * ``function`` is the name of the ``gettext`` function used (if the
485 if not isinstance(node.node, nodes.Name) or \
486 node.node.name not in gettext_functions:
513 yield node.lineno, node.node.name, strings