ArkScript
A small, fast, functional and scripting language for video games
Exceptions.cpp File Reference
#include <Ark/Exceptions.hpp>
#include <sstream>
#include <algorithm>
#include <fmt/core.h>
#include <fmt/color.h>
#include <fmt/ostream.h>
#include <Ark/Constants.hpp>
#include <Ark/Utils.hpp>
#include <Ark/Files.hpp>
#include <Ark/Literals.hpp>
#include <Ark/Compiler/AST/Node.hpp>
Include dependency graph for Exceptions.cpp:

Go to the source code of this file.

Classes

struct  Ark::Diagnostics::LineColorContextCounts
 

Namespaces

namespace  Ark
 
namespace  Ark::Diagnostics
 

Functions

bool Ark::Diagnostics::isPairableChar (const char c)
 
void Ark::Diagnostics::colorizeLine (const std::string &line, LineColorContextCounts &line_color_context_counts, std::ostream &ss)
 
ARK_API void Ark::Diagnostics::makeContext (std::ostream &os, const std::string &code, std::size_t target_line, std::size_t col_start, std::size_t sym_size, bool colorize)
 Helper to create a colorized context to report errors to the user.
 
template<typename T >
void Ark::Diagnostics::helper (std::ostream &os, const std::string &message, const bool colorize, const std::string &filename, const std::string &code, const T &expr, const std::size_t line, std::size_t column, const std::size_t sym_size)
 
ARK_API 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.