MCPcopy
hub / github.com/jquery/esprima / parseObjectInitializer

Method parseObjectInitializer

src/parser.ts:921–936  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

919 }
920
921 parseObjectInitializer(): Node.ObjectExpression {
922 const node = this.createNode();
923
924 this.expect('{');
925 const properties: Node.Property[] = [];
926 const hasProto = { value: false };
927 while (!this.match('}')) {
928 properties.push(this.parseObjectProperty(hasProto));
929 if (!this.match('}')) {
930 this.expectCommaSeparator();
931 }
932 }
933 this.expect('}');
934
935 return this.finalize(node, new Node.ObjectExpression(properties));
936 }
937
938 // https://tc39.github.io/ecma262/#sec-template-literals
939

Callers 1

Calls 7

createNodeMethod · 0.95
expectMethod · 0.95
matchMethod · 0.95
parseObjectPropertyMethod · 0.95
expectCommaSeparatorMethod · 0.95
finalizeMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected