MCPcopy Index your code
hub / github.com/nodejs/node / as_const

Method as_const

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

Source from the content-addressed store, hash-verified

419 abstract = True
420
421 def as_const(self, eval_ctx=None):
422 eval_ctx = get_eval_context(self, eval_ctx)
423 # intercepted operators cannot be folded at compile time
424 if self.environment.sandboxed and \
425 self.operator in self.environment.intercepted_binops:
426 raise Impossible()
427 f = _binop_to_func[self.operator]
428 try:
429 return f(self.left.as_const(eval_ctx), self.right.as_const(eval_ctx))
430 except Exception:
431 raise Impossible()
432
433
434class UnaryExpr(Expr):

Callers

nothing calls this directly

Calls 4

get_eval_contextFunction · 0.70
ImpossibleClass · 0.70
fFunction · 0.50
as_constMethod · 0.45

Tested by

no test coverage detected