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