MCPcopy Create free account
hub / github.com/nodejs/node / as_const

Method as_const

deps/v8/third_party/jinja2/nodes.py:704–713  ·  view source on GitHub ↗
(self, eval_ctx: t.Optional[EvalContext] = None)

Source from the content-addressed store, hash-verified

702 expr2: t.Optional[Expr]
703
704 def as_const(self, eval_ctx: t.Optional[EvalContext] = None) -> t.Any:
705 eval_ctx = get_eval_context(self, eval_ctx)
706 if self.test.as_const(eval_ctx):
707 return self.expr1.as_const(eval_ctx)
708
709 # if we evaluate to an undefined object, we better do that at runtime
710 if self.expr2 is None:
711 raise Impossible()
712
713 return self.expr2.as_const(eval_ctx)
714
715
716def args_as_const(

Callers

nothing calls this directly

Calls 3

get_eval_contextFunction · 0.70
ImpossibleClass · 0.70
as_constMethod · 0.45

Tested by

no test coverage detected