From 6ca5f5f5f886449f88d1ff7085f640c46bbc8fb2 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 4 Feb 2010 16:31:29 +0100 Subject: Added semantic checks for compound expressions. --- src/shared/cplusplus/CheckStatement.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/shared/cplusplus/CheckStatement.h') diff --git a/src/shared/cplusplus/CheckStatement.h b/src/shared/cplusplus/CheckStatement.h index 5c1b1ff02d..dc8447f37e 100644 --- a/src/shared/cplusplus/CheckStatement.h +++ b/src/shared/cplusplus/CheckStatement.h @@ -50,9 +50,9 @@ #define CPLUSPLUS_CHECKSTATEMENT_H #include "CPlusPlusForwardDeclarations.h" +#include "FullySpecifiedType.h" #include "SemanticCheck.h" - namespace CPlusPlus { class CPLUSPLUS_EXPORT CheckStatement: public SemanticCheck @@ -61,9 +61,10 @@ public: CheckStatement(Semantic *semantic); virtual ~CheckStatement(); - void check(StatementAST *statement, Scope *scope); + FullySpecifiedType check(StatementAST *statement, Scope *scope); protected: + FullySpecifiedType switchExprType(const FullySpecifiedType &type); StatementAST *switchStatement(StatementAST *statement); Scope *switchScope(Scope *scope); @@ -98,9 +99,12 @@ protected: ExpressionAST *expression, StatementAST *statement, Block *&symbol); + FullySpecifiedType checkCompoundStmt(CompoundStatementAST *stmt); + private: StatementAST *_statement; Scope *_scope; + FullySpecifiedType _exprType; }; } // end of namespace CPlusPlus -- cgit v1.2.1