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

Method parse_dict

tools/inspector_protocol/jinja2/parser.py:653–666  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

651 return nodes.List(items, lineno=token.lineno)
652
653 def parse_dict(self):
654 token = self.stream.expect('lbrace')
655 items = []
656 while self.stream.current.type != 'rbrace':
657 if items:
658 self.stream.expect('comma')
659 if self.stream.current.type == 'rbrace':
660 break
661 key = self.parse_expression()
662 self.stream.expect('colon')
663 value = self.parse_expression()
664 items.append(nodes.Pair(key, value, lineno=key.lineno))
665 self.stream.expect('rbrace')
666 return nodes.Dict(items, lineno=token.lineno)
667
668 def parse_postfix(self, node):
669 while 1:

Callers 1

parse_primaryMethod · 0.95

Calls 3

parse_expressionMethod · 0.95
expectMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected