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

Method parse_dict

module/lib/jinja2/parser.py:645–658  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

643 return nodes.List(items, lineno=token.lineno)
644
645 def parse_dict(self):
646 token = self.stream.expect('lbrace')
647 items = []
648 while self.stream.current.type != 'rbrace':
649 if items:
650 self.stream.expect('comma')
651 if self.stream.current.type == 'rbrace':
652 break
653 key = self.parse_expression()
654 self.stream.expect('colon')
655 value = self.parse_expression()
656 items.append(nodes.Pair(key, value, lineno=key.lineno))
657 self.stream.expect('rbrace')
658 return nodes.Dict(items, lineno=token.lineno)
659
660 def parse_postfix(self, node):
661 while 1:

Callers 1

parse_primaryMethod · 0.95

Calls 3

parse_expressionMethod · 0.95
expectMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected