Lines Matching refs:eval_ctx
397 def as_const(self, eval_ctx=None): argument
421 def as_const(self, eval_ctx=None): argument
422 eval_ctx = get_eval_context(self, eval_ctx)
429 return f(self.left.as_const(eval_ctx), self.right.as_const(eval_ctx))
440 def as_const(self, eval_ctx=None): argument
441 eval_ctx = get_eval_context(self, eval_ctx)
448 return f(self.node.as_const(eval_ctx))
493 def as_const(self, eval_ctx=None): argument
519 def as_const(self, eval_ctx=None): argument
520 eval_ctx = get_eval_context(self, eval_ctx)
521 if eval_ctx.volatile:
523 if eval_ctx.autoescape:
535 def as_const(self, eval_ctx=None): argument
536 eval_ctx = get_eval_context(self, eval_ctx)
537 return tuple(x.as_const(eval_ctx) for x in self.items)
550 def as_const(self, eval_ctx=None): argument
551 eval_ctx = get_eval_context(self, eval_ctx)
552 return [x.as_const(eval_ctx) for x in self.items]
561 def as_const(self, eval_ctx=None): argument
562 eval_ctx = get_eval_context(self, eval_ctx)
563 return dict(x.as_const(eval_ctx) for x in self.items)
570 def as_const(self, eval_ctx=None): argument
571 eval_ctx = get_eval_context(self, eval_ctx)
572 return self.key.as_const(eval_ctx), self.value.as_const(eval_ctx)
579 def as_const(self, eval_ctx=None): argument
580 eval_ctx = get_eval_context(self, eval_ctx)
581 return self.key, self.value.as_const(eval_ctx)
590 def as_const(self, eval_ctx=None): argument
591 eval_ctx = get_eval_context(self, eval_ctx)
592 if self.test.as_const(eval_ctx):
593 return self.expr1.as_const(eval_ctx)
599 return self.expr2.as_const(eval_ctx)
602 def args_as_const(node, eval_ctx): argument
603 args = [x.as_const(eval_ctx) for x in node.args]
604 kwargs = dict(x.as_const(eval_ctx) for x in node.kwargs)
608 args.extend(node.dyn_args.as_const(eval_ctx))
614 kwargs.update(node.dyn_kwargs.as_const(eval_ctx))
631 def as_const(self, eval_ctx=None): argument
632 eval_ctx = get_eval_context(self, eval_ctx)
634 if eval_ctx.volatile or self.node is None:
650 eval_ctx.environment.is_async
655 args, kwargs = args_as_const(self, eval_ctx)
656 args.insert(0, self.node.as_const(eval_ctx))
659 args.insert(0, eval_ctx)
676 def as_const(self, eval_ctx=None): argument
682 eval_ctx = get_eval_context(self, eval_ctx)
683 args, kwargs = args_as_const(self, eval_ctx)
684 args.insert(0, self.node.as_const(eval_ctx))
706 def as_const(self, eval_ctx=None): argument
707 eval_ctx = get_eval_context(self, eval_ctx)
711 return self.environment.getitem(self.node.as_const(eval_ctx),
712 self.arg.as_const(eval_ctx))
726 def as_const(self, eval_ctx=None): argument
730 eval_ctx = get_eval_context(self, eval_ctx)
731 return self.environment.getattr(self.node.as_const(eval_ctx),
746 def as_const(self, eval_ctx=None): argument
747 eval_ctx = get_eval_context(self, eval_ctx)
751 return obj.as_const(eval_ctx)
761 def as_const(self, eval_ctx=None): argument
762 eval_ctx = get_eval_context(self, eval_ctx)
763 return ''.join(text_type(x.as_const(eval_ctx)) for x in self.nodes)
772 def as_const(self, eval_ctx=None): argument
773 eval_ctx = get_eval_context(self, eval_ctx)
774 result = value = self.expr.as_const(eval_ctx)
777 new_value = op.expr.as_const(eval_ctx)
836 def as_const(self, eval_ctx=None): argument
837 eval_ctx = get_eval_context(self, eval_ctx)
838 return self.left.as_const(eval_ctx) and self.right.as_const(eval_ctx)
845 def as_const(self, eval_ctx=None): argument
846 eval_ctx = get_eval_context(self, eval_ctx)
847 return self.left.as_const(eval_ctx) or self.right.as_const(eval_ctx)
912 def as_const(self, eval_ctx=None): argument
913 eval_ctx = get_eval_context(self, eval_ctx)
914 return Markup(self.expr.as_const(eval_ctx))
925 def as_const(self, eval_ctx=None): argument
926 eval_ctx = get_eval_context(self, eval_ctx)
927 if eval_ctx.volatile:
929 expr = self.expr.as_const(eval_ctx)
930 if eval_ctx.autoescape: