2021-10-29 21:25:12 +01:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Luau/DenseHash.h"
|
|
|
|
#include "Luau/FileResolver.h"
|
|
|
|
#include "Luau/Location.h"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
|
|
|
|
class AstStat;
|
|
|
|
class AstExpr;
|
|
|
|
class AstStatBlock;
|
|
|
|
struct AstLocal;
|
|
|
|
|
|
|
|
struct RequireTraceResult
|
|
|
|
{
|
2021-11-05 02:07:18 +00:00
|
|
|
DenseHashMap<const AstExpr*, ModuleInfo> exprs{nullptr};
|
2021-10-29 21:25:12 +01:00
|
|
|
|
|
|
|
std::vector<std::pair<ModuleName, Location>> requires;
|
|
|
|
};
|
|
|
|
|
2021-11-05 02:07:18 +00:00
|
|
|
RequireTraceResult traceRequires(FileResolver* fileResolver, AstStatBlock* root, const ModuleName& currentModuleName);
|
2021-10-29 21:25:12 +01:00
|
|
|
|
|
|
|
} // namespace Luau
|