summaryrefslogtreecommitdiff
path: root/Driver.hh
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-26 00:26:57 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-26 00:26:57 +0800
commite83990754f49ec6eba7b9e1a5ff80a6add5de3a1 (patch)
tree6308b4d0afa5bde2de82e7aa034058302cb1d193 /Driver.hh
parent958a811b18aee04e4795cf003fd8e3db00312c91 (diff)
bugfix & test
Diffstat (limited to 'Driver.hh')
-rw-r--r--Driver.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/Driver.hh b/Driver.hh
index d3e773d..2fdc86d 100644
--- a/Driver.hh
+++ b/Driver.hh
@@ -3,6 +3,7 @@
#include <cstdio>
+#include "BaseNode.hh"
#include "Context.hh"
#include "Location.hh"
@@ -13,11 +14,14 @@ class Driver {
~Driver();
int StartLexer(std::string& filename);
void StopLexer();
- void Parse(std::string& filename);
+ std::shared_ptr<ProgramNode> Parse(std::string& filename);
+ void SetRoot(std::shared_ptr<ProgramNode> root);
+ Context* GetContext();
Location location_;
private:
Context context_;
+ std::shared_ptr<ProgramNode> root_;
};
} // namespace pcc