-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpr_parser_context.hpp
More file actions
42 lines (29 loc) · 995 Bytes
/
pr_parser_context.hpp
File metadata and controls
42 lines (29 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <string>
//------------------------------------------------------------------------------
namespace parser
{
//------------------------------------------------------------------------------
class ParserContext
{
public:
ParserContext();
const std::string & getCurrentLine() const noexcept;
void setCurrentLine( const std::string & _str );
std::size_t getLineNumber() const noexcept;
void increaseLineNumber() noexcept;
bool isEnableMultilineComment() const noexcept;
void setMultilineComment( bool _enable ) noexcept;
bool isEnableMultilineString() const noexcept;
void setMultilineString( bool _enable ) noexcept;
bool isEnableRawString() const noexcept;
void seEnableRawString( bool _enable ) noexcept;
private:
std::string m_currentLine;
std::size_t m_lineNumber;
bool m_isEnableMultilineComment;
bool m_isEnableMultilineString;
bool m_isEnableRawString;
};
//------------------------------------------------------------------------------
}