2022-06-17 09:05:14 +08:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
|
2022-06-24 09:56:00 +08:00
|
|
|
#include "Luau/Constraint.h"
|
|
|
|
#include "Luau/NotNull.h"
|
|
|
|
#include "Luau/Scope.h"
|
2022-06-17 09:05:14 +08:00
|
|
|
#include "Luau/ToString.h"
|
|
|
|
|
|
|
|
#include <optional>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
|
|
|
|
struct ConstraintSolverLogger
|
|
|
|
{
|
|
|
|
std::string compileOutput();
|
2022-07-29 12:24:07 +08:00
|
|
|
void captureBoundarySnapshot(const Scope* rootScope, std::vector<NotNull<const Constraint>>& unsolvedConstraints);
|
|
|
|
void prepareStepSnapshot(const Scope* rootScope, NotNull<const Constraint> current, std::vector<NotNull<const Constraint>>& unsolvedConstraints);
|
2022-06-17 09:05:14 +08:00
|
|
|
void commitPreparedStepSnapshot();
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<std::string> snapshots;
|
|
|
|
std::optional<std::string> preparedSnapshot;
|
|
|
|
ToStringOptions opts;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Luau
|