|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
#define JSON_JOB_H |
|
|
|
|
|
|
|
|
|
#include <cstddef> // size_t |
|
|
|
|
#include <string> |
|
|
|
|
#include <string_view> |
|
|
|
|
#include <vector> |
|
|
|
|
|
|
|
|
|
#include "util/json/lexer.h" |
|
|
|
@ -19,7 +19,7 @@ class Value;
|
|
|
|
|
|
|
|
|
|
class Job { |
|
|
|
|
public: |
|
|
|
|
Job(const std::string& input); |
|
|
|
|
Job(std::string_view input); |
|
|
|
|
virtual ~Job(); |
|
|
|
|
|
|
|
|
|
enum class Color { |
|
|
|
@ -36,13 +36,13 @@ public:
|
|
|
|
|
void printErrorLine(Token token, const char* message); |
|
|
|
|
|
|
|
|
|
bool success() const { return m_success; } |
|
|
|
|
const std::string& input() const { return m_input; } |
|
|
|
|
std::string_view input() const { return m_input; } |
|
|
|
|
std::vector<Token>* tokens() { return &m_tokens; } |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
bool m_success { true }; |
|
|
|
|
|
|
|
|
|
std::string m_input; |
|
|
|
|
std::string_view m_input; |
|
|
|
|
size_t m_lineNumbersWidth { 0 }; |
|
|
|
|
|
|
|
|
|
std::vector<Token> m_tokens; |
|
|
|
|