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

Method as_const

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

Source from the content-addressed store, hash-verified

674 fields = ('node', 'name', 'args', 'kwargs', 'dyn_args', 'dyn_kwargs')
675
676 def as_const(self, eval_ctx=None):
677 test = self.environment.tests.get(self.name)
678
679 if test is None:
680 raise Impossible()
681
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))
685
686 try:
687 return test(*args, **kwargs)
688 except Exception:
689 raise Impossible()
690
691
692class Call(Expr):

Callers

nothing calls this directly

Calls 7

ImpossibleClass · 0.70
get_eval_contextFunction · 0.70
args_as_constFunction · 0.70
getMethod · 0.65
testFunction · 0.50
insertMethod · 0.45
as_constMethod · 0.45

Tested by

no test coverage detected