MCPcopy Create free account
hub / github.com/compilets/compilets / parseVariableDeclarationList

Method parseVariableDeclarationList

src/parser.ts:409–416  ·  view source on GitHub ↗
(node: ts.VariableDeclarationList)

Source from the content-addressed store, hash-verified

407 }
408
409 parseVariableDeclarationList(node: ts.VariableDeclarationList): syntax.VariableDeclarationList {
410 const decls = node.declarations.map(this.parseVariableDeclaration.bind(this));
411 // In C++ all variables in one declaration use the same type.
412 const {type} = decls[0];
413 if (!decls.every(d => type.equal(d.type)))
414 throw new UnimplementedError(node, 'Variable declaration list must use same type');
415 return new syntax.VariableDeclarationList(decls);
416 }
417
418 parseVariableDeclaration(node: ts.VariableDeclaration): syntax.VariableDeclaration {
419 switch (node.name.kind) {

Callers 1

parseStatementMethod · 0.95

Calls 1

equalMethod · 0.45

Tested by

no test coverage detected