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

Method as_const

tools/inspector_protocol/jinja2/nodes.py:706–714  ·  view source on GitHub ↗
(self, eval_ctx=None)

Source from the content-addressed store, hash-verified

704 fields = ('node', 'arg', 'ctx')
705
706 def as_const(self, eval_ctx=None):
707 eval_ctx = get_eval_context(self, eval_ctx)
708 if self.ctx != 'load':
709 raise Impossible()
710 try:
711 return self.environment.getitem(self.node.as_const(eval_ctx),
712 self.arg.as_const(eval_ctx))
713 except Exception:
714 raise Impossible()
715
716 def can_assign(self):
717 return False

Callers

nothing calls this directly

Calls 4

get_eval_contextFunction · 0.70
ImpossibleClass · 0.70
getitemMethod · 0.45
as_constMethod · 0.45

Tested by

no test coverage detected