summaryrefslogtreecommitdiff
path: root/src/parser.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-12-31 16:54:59 -0500
committerAdrian Thurston <thurston@complang.org>2013-12-31 16:54:59 -0500
commitff77b00aa629ab9df563faee970d62100358baa8 (patch)
tree426ff837915a3e4a15a044f39bfb9ed79d7e86ea /src/parser.cc
parent60e81bf16b38de449a207cb0383c3319a0e7a866 (diff)
downloadcolm-ff77b00aa629ab9df563faee970d62100358baa8.tar.gz
store the current scope in LangStmt::ForLoop, use if creating triter var ref
Diffstat (limited to 'src/parser.cc')
-rw-r--r--src/parser.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.cc b/src/parser.cc
index 8741773d..f4c24f65 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -663,7 +663,7 @@ ConsItemList *BaseParser::consListConcat( ConsItemList *list1,
}
LangStmt *BaseParser::forScope( const InputLoc &loc, const String &data,
- TypeRef *typeRef, LangIterCall *iterCall, StmtList *stmtList )
+ ObjNameScope *scope, TypeRef *typeRef, LangIterCall *iterCall, StmtList *stmtList )
{
/* Check for redeclaration. */
if ( pd->curLocalFrame->checkRedecl( data ) != 0 )
@@ -676,7 +676,7 @@ LangStmt *BaseParser::forScope( const InputLoc &loc, const String &data,
pd->curLocalFrame->insertField( data, iterField );
LangStmt *stmt = LangStmt::cons( loc, LangStmt::ForIterType,
- iterField, typeRef, iterCall, stmtList );
+ iterField, typeRef, iterCall, stmtList, scope );
return stmt;
}