MCPcopy Create free account
hub / github.com/cst/cst / parseAndGetStatementInFunction

Function parseAndGetStatementInFunction

test/utils.js:83–87  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

81}
82
83export function parseAndGetStatementInFunction(code: string): Object {
84 let parser = new Parser();
85 let program = parser.parse(`function _name(){${code}}`);
86 return program.body[0].body.body[0];
87}
88
89export function parseAndGetBlockStatementInFunction(code: string): Object {
90 let parser = new Parser();

Callers 1

ReturnStatement.jsFile · 0.90

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…