Skip to content

Commit d691e4d

Browse files
committed
Minor changes
1 parent 9bfdae2 commit d691e4d

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

compiler/symbol.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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) {

llvm/parser.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ enum {
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;

semantic/ast.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff 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());

0 commit comments

Comments
 (0)