Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) =>
{
phpParser.parser.locations = true;
phpParser.parser.docBlocks = true;
var ast = phpParser.parseCode(text);
this.BuildObjectTree(ast, filePath).then((tree) =>
{
// TODO -- Convert this to promise
var symbolCache = this.BuildSymbolCache(tree, filePath);
var returnObj = {
tree: tree,
symbolCache: symbolCache
};
// DEBUG
console.log("Built tree for file: " + filePath);
resolve(returnObj);
return new Promise((resolve, reject) =>
{
phpParser.parser.locations = true;
phpParser.parser.docBlocks = true;
var ast = phpParser.parseCode(text);
this.BuildObjectTree(ast, filePath).then((tree) =>
{
// TODO -- Convert this to promise
var symbolCache = this.BuildSymbolCache(tree, filePath);
var returnObj = {
tree: tree,
symbolCache: symbolCache
};
// DEBUG
console.log("Built tree for file: " + filePath);