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

Method parse_unary

tools/inspector_protocol/jinja2/parser.py:536–550  ·  view source on GitHub ↗
(self, with_filter=True)

Source from the content-addressed store, hash-verified

534 return left
535
536 def parse_unary(self, with_filter=True):
537 token_type = self.stream.current.type
538 lineno = self.stream.current.lineno
539 if token_type == 'sub':
540 next(self.stream)
541 node = nodes.Neg(self.parse_unary(False), lineno=lineno)
542 elif token_type == 'add':
543 next(self.stream)
544 node = nodes.Pos(self.parse_unary(False), lineno=lineno)
545 else:
546 node = self.parse_primary()
547 node = self.parse_postfix(node)
548 if with_filter:
549 node = self.parse_filter_expr(node)
550 return node
551
552 def parse_primary(self):
553 token = self.stream.current

Callers 1

parse_powMethod · 0.95

Calls 4

parse_primaryMethod · 0.95
parse_postfixMethod · 0.95
parse_filter_exprMethod · 0.95
nextFunction · 0.50

Tested by

no test coverage detected