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>
|
2022-09-23 19:32:10 +01:00
|
|
|
#include <vector>
|
2021-10-29 21:25:12 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
2022-06-17 01:54:42 +01:00
|
|
|
std::vector<std::pair<ModuleName, Location>> requireList;
|
2021-10-29 21:25:12 +01:00
|
|
|
};
|
|
|
|
|
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
|