2021-10-30 04:25:12 +08: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 10:34:35 +08:00
|
|
|
DenseHashMap<const AstExpr*, ModuleInfo> exprs{nullptr};
|
2021-10-30 04:25:12 +08:00
|
|
|
|
2022-06-17 09:05:14 +08:00
|
|
|
std::vector<std::pair<ModuleName, Location>> requireList;
|
2021-10-30 04:25:12 +08:00
|
|
|
};
|
|
|
|
|
2021-11-05 10:34:35 +08:00
|
|
|
RequireTraceResult traceRequires(FileResolver* fileResolver, AstStatBlock* root, const ModuleName& currentModuleName);
|
2021-10-30 04:25:12 +08:00
|
|
|
|
|
|
|
} // namespace Luau
|