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

Method parse_dict

deps/v8/third_party/jinja2/parser.py:756–769  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

754 return nodes.List(items, lineno=token.lineno)
755
756 def parse_dict(self) -> nodes.Dict:
757 token = self.stream.expect("lbrace")
758 items: t.List[nodes.Pair] = []
759 while self.stream.current.type != "rbrace":
760 if items:
761 self.stream.expect("comma")
762 if self.stream.current.type == "rbrace":
763 break
764 key = self.parse_expression()
765 self.stream.expect("colon")
766 value = self.parse_expression()
767 items.append(nodes.Pair(key, value, lineno=key.lineno))
768 self.stream.expect("rbrace")
769 return nodes.Dict(items, lineno=token.lineno)
770
771 def parse_postfix(self, node: nodes.Expr) -> nodes.Expr:
772 while True:

Callers 1

parse_primaryMethod · 0.95

Calls 3

parse_expressionMethod · 0.95
expectMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected