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

Method parseObjectPattern

src/parser.ts:1973–1987  ·  view source on GitHub ↗
(params, kind?: string)

Source from the content-addressed store, hash-verified

1971 }
1972
1973 parseObjectPattern(params, kind?: string): Node.ObjectPattern {
1974 const node = this.createNode();
1975 const properties: Node.Property[] = [];
1976
1977 this.expect('{');
1978 while (!this.match('}')) {
1979 properties.push(this.parsePropertyPattern(params, kind));
1980 if (!this.match('}')) {
1981 this.expect(',');
1982 }
1983 }
1984 this.expect('}');
1985
1986 return this.finalize(node, new Node.ObjectPattern(properties));
1987 }
1988
1989 parsePattern(params, kind?: string): Node.BindingIdentifier | Node.BindingPattern {
1990 let pattern;

Callers 1

parsePatternMethod · 0.95

Calls 6

createNodeMethod · 0.95
expectMethod · 0.95
matchMethod · 0.95
parsePropertyPatternMethod · 0.95
finalizeMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected