MCPcopy Index your code
hub / github.com/pyload/pyload / parse_unary

Method parse_unary

module/lib/jinja2/parser.py:528–542  ·  view source on GitHub ↗
(self, with_filter=True)

Source from the content-addressed store, hash-verified

526 return left
527
528 def parse_unary(self, with_filter=True):
529 token_type = self.stream.current.type
530 lineno = self.stream.current.lineno
531 if token_type == 'sub':
532 next(self.stream)
533 node = nodes.Neg(self.parse_unary(False), lineno=lineno)
534 elif token_type == 'add':
535 next(self.stream)
536 node = nodes.Pos(self.parse_unary(False), lineno=lineno)
537 else:
538 node = self.parse_primary()
539 node = self.parse_postfix(node)
540 if with_filter:
541 node = self.parse_filter_expr(node)
542 return node
543
544 def parse_primary(self):
545 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.90

Tested by

no test coverage detected