File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed
Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ class SymbolTable {
331331 return scopes.back ();
332332 }
333333
334+ // For debugging purposes
334335 void printScopes () const {
335336 std::cout << " === Symbol Table Scopes ===" << std::endl;
336337 for (size_t i = 0 ; i < scopes.size (); ++i) {
Original file line number Diff line number Diff line change 6060
6161%union {
6262 int ival; // the int num you had
63- char *sval; // The str you had // TODO: Is string type better that char*?
63+ char *sval;
6464 char c;
6565 char *op;
6666 Expr *expr;
Original file line number Diff line number Diff line change @@ -1008,12 +1008,6 @@ class ReturnStmt : public Stmt
10081008
10091009 // expr->check_type(st.getCurrentScope().getFuncType());
10101010 expr->check_type (st.getClosestReturnType ());
1011-
1012- // Basic implementation
1013- // TODO(enhancement): check if the return statement is in a control block
1014- // Scope *funcScope = st.getFunctionScopeWithNoReturn();
1015- // if (funcScope)
1016- // funcScope->setFuncReturnCase(STRONG_RETURN);
10171011 }
10181012
10191013 ReturnInfo check_return_case () const override
@@ -1786,7 +1780,6 @@ class FuncDef : public AST
17861780 header->sem_analyze_params ();
17871781
17881782 // Check if a declaration of the function already exists and compare the return type and parameters
1789- // TODO: Should we look in previous scopes if not found in current one?
17901783 if (previousDecl)
17911784 {
17921785 STEntry *he = st.lookup (header->getName ());
You can’t perform that action at this time.
0 commit comments