summaryrefslogtreecommitdiff
path: root/src/parser.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-01-11 12:54:56 -0500
committerAdrian Thurston <thurston@complang.org>2015-01-11 12:54:56 -0500
commit06946c9d62b62ce612d4cdf4eb9c65570cb81445 (patch)
tree46cc1415a01b317a3c5a46d80349c459f221754b /src/parser.cc
parenta5ad06e3fbbda39cbd894906e93a775c511f1f05 (diff)
downloadcolm-06946c9d62b62ce612d4cdf4eb9c65570cb81445.tar.gz
set the argv_el id when creating the structs
Diffstat (limited to 'src/parser.cc')
-rw-r--r--src/parser.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/parser.cc b/src/parser.cc
index 9457dfe4..bd3f021e 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -61,6 +61,8 @@ void BaseParser::argvDecl()
ObjectField::StructFieldType, typeRef, name );
structVarDef( objField->loc, objField );
+ pd->argvEl = objField->context;
+
/* Now the list element. */
listElDef( "el" );
@@ -922,9 +924,9 @@ void BaseParser::structVarDef( const InputLoc &loc, ObjectField *objField )
if ( curStruct() == 0 )
error(loc) << "internal error: no context stack items found" << endp;
- StructDef *context = curStruct();
- objField->context = context;
- object = context->objectDef;
+ StructDef *structDef = curStruct();
+ objField->context = structDef;
+ object = structDef->objectDef;
if ( object->rootScope->checkRedecl( objField->name ) != 0 )
error(objField->loc) << "object field renamed" << endp;