diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-26 00:26:57 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-26 00:26:57 +0800 |
| commit | e83990754f49ec6eba7b9e1a5ff80a6add5de3a1 (patch) | |
| tree | 6308b4d0afa5bde2de82e7aa034058302cb1d193 /Driver.hh | |
| parent | 958a811b18aee04e4795cf003fd8e3db00312c91 (diff) | |
bugfix & test
Diffstat (limited to 'Driver.hh')
| -rw-r--r-- | Driver.hh | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |
