![]() |
ArkScript
A small, lisp-inspired, functional scripting language
|
#include <Ark/Error/Diagnostics.hpp>
#include <cassert>
#include <sstream>
#include <algorithm>
#include <fmt/color.h>
#include <fmt/ostream.h>
#include <Ark/Constants.hpp>
#include <Ark/Utils/Utils.hpp>
#include <Ark/Utils/Literals.hpp>
#include <Ark/Compiler/AST/Node.hpp>
#include <Ark/Error/PrettyPrinting.hpp>
Go to the source code of this file.
Namespaces | |
namespace | Ark |
namespace | Ark::Diagnostics |
Functions | |
void | Ark::Diagnostics::showFileLocation (std::ostream &os, const ErrorLocation &loc) |
void | Ark::Diagnostics::hintWithContext (std::ostream &os, const std::optional< CodeErrorContext > &maybe_context, const bool colorize) |
ARK_API void | Ark::Diagnostics::makeContext (const ErrorLocation &loc, std::ostream &os, const std::optional< CodeErrorContext > &maybe_context, bool colorize) |
Helper to create a colorized context to report errors to the user. | |
void | Ark::Diagnostics::helper (std::ostream &os, const std::string &message, const bool colorize, const std::string &filename, const internal::FileSpan &at, const std::optional< CodeErrorContext > &maybe_context=std::nullopt) |
std::string | Ark::Diagnostics::makeContextWithNode (const std::string &message, const internal::Node &node) |
Helper used by the compiler to generate a colorized context from a node. | |
ARK_API void | Ark::Diagnostics::generate (const CodeError &e, std::ostream &os=std::cout, bool colorize=true) |
Generate a diagnostic from an error and print it to the standard output. | |