From 0a1ebe4f516a5c1e8ebc12798a94529bdda9b6df Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 8 Oct 2014 20:53:50 +0200 Subject: Parse everything up to function bodies and report parser errors with location. --- Parser.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Parser.h') diff --git a/Parser.h b/Parser.h index 4a48dace..96f1d688 100644 --- a/Parser.h +++ b/Parser.h @@ -32,7 +32,7 @@ class Scanner; class Parser { public: - ptr parse(Scanner& _scanner); + ptr parse(std::shared_ptr const& _scanner); private: class ASTNodeFactory; @@ -48,6 +48,10 @@ private: ptr parseFunctionDefinition(bool _isPublic); ptr parseStructDefinition(); ptr parseVariableDeclaration(); + ptr parseTypeName(); + ptr parseMapping(); + ptr parseParameterList(); + ptr parseBlock(); /// @} /// Helper functions @@ -58,7 +62,7 @@ private: void throwExpectationError(const std::string& _description); /// @} - Scanner* m_scanner; + std::shared_ptr m_scanner; }; } } -- cgit