OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
 
Loading...
Searching...
No Matches
parse_info.cpp
Go to the documentation of this file.
1#include "parse_info.h"
2#include <sstream>
3
5{
6 std::string parse_info::toString(const std::string& message /*= ""*/) const
7 {
8 std::stringstream ss;
9
10 if (!message.empty())
11 {
12 ss << message << std::endl;
13 }
14
15 if (!dataFile.empty() || !dataLine.empty() || !dataToken.empty())
16 {
17 ss << "current file: [" << dataFile.relative_path().string() << ":" << dataLineNumber << "]" << std::endl
18 << "current line: [" << dataLine << "]" << std::endl
19 << "current token: [" << dataToken << "]";
20 }
21
22 return ss.str();
23 }
24}
std::filesystem::path dataFile
Definition parse_info.h:11
std::string toString(const std::string &message="") const
Definition parse_info.cpp:6