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