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

Method parse_unary

deps/v8/third_party/jinja2/parser.py:626–642  ·  view source on GitHub ↗
(self, with_filter: bool = True)

Source from the content-addressed store, hash-verified

624 return left
625
626 def parse_unary(self, with_filter: bool = True) -> nodes.Expr:
627 token_type = self.stream.current.type
628 lineno = self.stream.current.lineno
629 node: nodes.Expr
630
631 if token_type == "sub":
632 next(self.stream)
633 node = nodes.Neg(self.parse_unary(False), lineno=lineno)
634 elif token_type == "add":
635 next(self.stream)
636 node = nodes.Pos(self.parse_unary(False), lineno=lineno)
637 else:
638 node = self.parse_primary()
639 node = self.parse_postfix(node)
640 if with_filter:
641 node = self.parse_filter_expr(node)
642 return node
643
644 def parse_primary(self) -> nodes.Expr:
645 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