Lines Matching refs:lineno
52 def fail(self, msg, lineno=None, exc=TemplateSyntaxError): argument
57 if lineno is None:
58 lineno = self.stream.current.lineno
59 raise exc(msg, lineno, self.name, self.filename)
61 def _fail_ut_eof(self, name, end_token_stack, lineno): argument
90 self.fail(' '.join(message), lineno)
92 def fail_unknown_tag(self, name, lineno=None): argument
97 return self._fail_ut_eof(name, self._end_token_stack, lineno)
99 def fail_eof(self, end_tokens=None, lineno=None): argument
104 return self._fail_ut_eof(None, stack, lineno)
114 def free_identifier(self, lineno=None): argument
118 nodes.Node.__init__(rv, 'fi%d' % self._last_identifier, lineno=lineno)
125 self.fail('tag name expected', token.lineno)
144 self.fail_unknown_tag(token.value, token.lineno)
178 lineno = next(self.stream).lineno
182 return nodes.Assign(target, expr, lineno=lineno)
186 return nodes.AssignBlock(target, filter_node, body, lineno=lineno)
190 lineno = self.stream.expect('name:for').lineno
205 recursive, lineno=lineno)
209 node = result = nodes.If(lineno=self.stream.expect('name:if').lineno)
218 node = nodes.If(lineno=self.stream.current.lineno)
228 node = nodes.With(lineno=next(self.stream).lineno)
232 lineno = self.stream.current.lineno
247 node = nodes.ScopedEvalContextModifier(lineno=next(self.stream).lineno)
256 node = nodes.Block(lineno=next(self.stream).lineno)
273 node = nodes.Extends(lineno=next(self.stream).lineno)
287 node = nodes.Include(lineno=next(self.stream).lineno)
298 node = nodes.Import(lineno=next(self.stream).lineno)
305 node = nodes.FromImport(lineno=next(self.stream).lineno)
327 'be imported', target.lineno,
359 node = nodes.CallBlock(lineno=next(self.stream).lineno)
368 self.fail('expected call', node.lineno)
373 node = nodes.FilterBlock(lineno=next(self.stream).lineno)
380 node = nodes.Macro(lineno=next(self.stream).lineno)
388 node = nodes.Output(lineno=next(self.stream).lineno)
410 target = nodes.NSRef(token.value, attr.value, lineno=token.lineno)
413 target = nodes.Name(token.value, 'store', lineno=token.lineno)
423 __name__.lower(), target.lineno)
436 lineno = self.stream.current.lineno
444 expr1 = nodes.CondExpr(expr2, expr1, expr3, lineno=lineno)
445 lineno = self.stream.current.lineno
449 lineno = self.stream.current.lineno
453 left = nodes.Or(left, right, lineno=lineno)
454 lineno = self.stream.current.lineno
458 lineno = self.stream.current.lineno
462 left = nodes.And(left, right, lineno=lineno)
463 lineno = self.stream.current.lineno
468 lineno = next(self.stream).lineno
469 return nodes.Not(self.parse_not(), lineno=lineno)
473 lineno = self.stream.current.lineno
489 lineno = self.stream.current.lineno
492 return nodes.Compare(expr, ops, lineno=lineno)
495 lineno = self.stream.current.lineno
501 left = cls(left, right, lineno=lineno)
502 lineno = self.stream.current.lineno
506 lineno = self.stream.current.lineno
513 return nodes.Concat(args, lineno=lineno)
516 lineno = self.stream.current.lineno
522 left = cls(left, right, lineno=lineno)
523 lineno = self.stream.current.lineno
527 lineno = self.stream.current.lineno
532 left = nodes.Pow(left, right, lineno=lineno)
533 lineno = self.stream.current.lineno
538 lineno = self.stream.current.lineno
541 node = nodes.Neg(self.parse_unary(False), lineno=lineno)
544 node = nodes.Pos(self.parse_unary(False), lineno=lineno)
557 lineno=token.lineno)
559 node = nodes.Const(None, lineno=token.lineno)
561 node = nodes.Name(token.value, 'load', lineno=token.lineno)
566 lineno = token.lineno
570 node = nodes.Const(''.join(buf), lineno=lineno)
573 node = nodes.Const(token.value, lineno=token.lineno)
583 self.fail("unexpected '%s'" % describe_token(token), token.lineno)
606 lineno = self.stream.current.lineno
625 lineno = self.stream.current.lineno
639 return nodes.Tuple(args, 'load', lineno=lineno)
651 return nodes.List(items, lineno=token.lineno)
664 items.append(nodes.Pair(key, value, lineno=key.lineno))
666 return nodes.Dict(items, lineno=token.lineno)
703 lineno=token.lineno)
705 self.fail('expected name or number', attr_token.lineno)
706 arg = nodes.Const(attr_token.value, lineno=attr_token.lineno)
707 return nodes.Getitem(node, arg, 'load', lineno=token.lineno)
718 arg = nodes.Tuple(args, 'load', lineno=token.lineno)
719 return nodes.Getitem(node, arg, 'load', lineno=token.lineno)
720 self.fail('expected subscript expression', self.lineno)
723 lineno = self.stream.current.lineno
751 return nodes.Slice(lineno=lineno, *args)
763 token.lineno)
787 lineno=value.lineno))
798 lineno=token.lineno)
816 dyn_kwargs, lineno=token.lineno)
846 dyn_kwargs, lineno=token.lineno)
848 node = nodes.Not(node, lineno=token.lineno)
861 lineno = data_buffer[0].lineno
862 body.append(nodes.Output(data_buffer[:], lineno=lineno))
871 lineno=token.lineno))
901 result = nodes.Template(self.subparse(), lineno=1)