aboutsummaryrefslogtreecommitdiff
path: root/include/cru/parse/ParsingContext.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-12-29 21:57:33 +0800
committercrupest <crupest@outlook.com>2021-12-29 21:57:33 +0800
commitaa923364615b77e152d532b021fe1536fcf96a50 (patch)
tree9f4a949315d0a5e53f51caee0c937d49e764f661 /include/cru/parse/ParsingContext.hpp
parent63b39863b9d567068480f9c1d59177c92a8c6169 (diff)
downloadcru-aa923364615b77e152d532b021fe1536fcf96a50.tar.gz
cru-aa923364615b77e152d532b021fe1536fcf96a50.tar.bz2
cru-aa923364615b77e152d532b021fe1536fcf96a50.zip
...
Diffstat (limited to 'include/cru/parse/ParsingContext.hpp')
-rw-r--r--include/cru/parse/ParsingContext.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/cru/parse/ParsingContext.hpp b/include/cru/parse/ParsingContext.hpp
index 369acf41..ebb7115a 100644
--- a/include/cru/parse/ParsingContext.hpp
+++ b/include/cru/parse/ParsingContext.hpp
@@ -1,12 +1,13 @@
#pragma once
#include "ParsingAlgorithmContext.hpp"
+#include "cru/parse/ParsingTreeNode.hpp"
namespace cru::parse {
// A parsing context contains all info that a program needs to know when parsing
// a input sequence of terminals.
class ParsingContext {
public:
- ParsingContext(ParsingAlgorithmContext* parsing_algorithm_context,
+ ParsingContext(const ParsingAlgorithmContext* parsing_algorithm_context,
std::vector<Terminal*> input);
CRU_DELETE_COPY(ParsingContext)
@@ -15,7 +16,7 @@ class ParsingContext {
~ParsingContext();
private:
- ParsingAlgorithmContext* parsing_algorithm_context_;
+ const ParsingAlgorithmContext* parsing_algorithm_context_;
std::vector<Terminal*> input_;
};
} // namespace cru::parse