Line |
Branch |
Exec |
Source |
1 |
|
|
#include <gyoji-context.hpp> |
2 |
|
|
|
3 |
|
|
using namespace Gyoji::context; |
4 |
|
|
|
5 |
|
296 |
CompilerContext::CompilerContext(std::string _filename) |
6 |
|
|
{ |
7 |
|
296 |
token_stream = std::make_unique<TokenStream>(); |
8 |
|
296 |
errors = std::make_unique<Errors>(*token_stream); |
9 |
|
296 |
filenames.push_back(_filename); |
10 |
|
296 |
} |
11 |
|
296 |
CompilerContext::~CompilerContext() |
12 |
|
296 |
{} |
13 |
|
|
|
14 |
|
|
bool |
15 |
|
112 |
CompilerContext::has_errors() const |
16 |
|
112 |
{ return errors->size(); } |
17 |
|
|
|
18 |
|
|
Errors & |
19 |
|
210 |
CompilerContext::get_errors() const |
20 |
|
210 |
{ return *errors; } |
21 |
|
|
|
22 |
|
|
TokenStream & |
23 |
|
66758 |
CompilerContext::get_token_stream() const |
24 |
|
66758 |
{ return *token_stream; } |
25 |
|
|
|
26 |
|
|
const std::string & |
27 |
|
58536 |
CompilerContext::get_filename() const |
28 |
|
58536 |
{ return filenames.back(); } |
29 |
|
|
|
30 |
|
|
void |
31 |
|
✗ |
CompilerContext::add_filename(const std::string & _filename) |
32 |
|
|
{ |
33 |
|
✗ |
filenames.push_back(_filename); |
34 |
|
✗ |
} |
35 |
|
|
|