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

Method next_if

tools/inspector_protocol/jinja2/lexer.py:338–343  ·  view source on GitHub ↗

Perform the token test and return the token if it matched. Otherwise the return value is `None`.

(self, expr)

Source from the content-addressed store, hash-verified

336 next(self)
337
338 def next_if(self, expr):
339 """Perform the token test and return the token if it matched.
340 Otherwise the return value is `None`.
341 """
342 if self.current.test(expr):
343 return next(self)
344
345 def skip_if(self, expr):
346 """Like :meth:`next_if` but only returns `True` or `False`."""

Callers 1

skip_ifMethod · 0.95

Calls 2

nextFunction · 0.50
testMethod · 0.45

Tested by

no test coverage detected