diff options
author | Adrian Thurston <thurston@colm.net> | 2020-04-12 13:08:39 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2020-04-12 14:11:31 +0000 |
commit | a39d7909d7b542889481e2b3b7c08df16cc42b61 (patch) | |
tree | aeb2d570aed0ba1f5a07a55c4b9ffab6aa57737a /src/parser.cc | |
parent | 8b1810c9fd897d8d2840a0713ced1dfcfb71d109 (diff) | |
download | colm-a39d7909d7b542889481e2b3b7c08df16cc42b61.tar.gz |
renamed DefList and LelDefList to the more accurate ProdList, LelProdList
Diffstat (limited to 'src/parser.cc')
-rw-r--r-- | src/parser.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/parser.cc b/src/parser.cc index 9a711088..ce598e38 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -38,15 +38,15 @@ void BaseParser::listElDef( String name ) ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); - LelDefList *defList = new LelDefList; + LelProdList *prodList = new LelProdList; Production *prod = BaseParser::production( InputLoc(), new ProdElList, String(), false, 0, 0 ); - prodAppend( defList, prod ); + prodAppend( prodList, prod ); NtDef *ntDef = NtDef::cons( name, curNspace(), curStruct(), false ); - BaseParser::cflDef( ntDef, objectDef, defList ); + BaseParser::cflDef( ntDef, objectDef, prodList ); /* * List element with the same name as containing context. @@ -71,14 +71,14 @@ void BaseParser::mapElDef( String name, TypeRef *keyType ) ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ ); - LelDefList *defList = new LelDefList; + LelProdList *prodList = new LelProdList; Production *prod = BaseParser::production( InputLoc(), new ProdElList, String(), false, 0, 0 ); - prodAppend( defList, prod ); + prodAppend( prodList, prod ); NtDef *ntDef = NtDef::cons( name, curNspace(), curStruct(), false ); - BaseParser::cflDef( ntDef, objectDef, defList ); + BaseParser::cflDef( ntDef, objectDef, prodList ); /* * Same name as containing context. @@ -563,17 +563,17 @@ LangStmt *BaseParser::exportStmt( ObjectField *objField, } -void BaseParser::cflDef( NtDef *ntDef, ObjectDef *objectDef, LelDefList *defList ) +void BaseParser::cflDef( NtDef *ntDef, ObjectDef *objectDef, LelProdList *prodList ) { Namespace *nspace = curNspace(); ntDef->objectDef = objectDef; - ntDef->defList = defList; + ntDef->prodList = prodList; nspace->ntDefList.append( ntDef ); /* Declare the captures in the object. */ - for ( LelDefList::Iter prod = *defList; prod.lte(); prod++ ) { + for ( LelProdList::Iter prod = *prodList; prod.lte(); prod++ ) { if ( prod->prodElList != 0 ) { for ( ProdElList::Iter pel = *prod->prodElList; pel.lte(); pel++ ) { /* If there is a capture, create the field. */ @@ -937,11 +937,11 @@ void BaseParser::objVarDef( ObjectDef *objectDef, ObjectField *objField ) objectDef->rootScope->insertField( objField->name, objField ); } -LelDefList *BaseParser::prodAppend( LelDefList *defList, Production *definition ) +LelProdList *BaseParser::prodAppend( LelProdList *prodList, Production *definition ) { - definition->prodNum = defList->length(); - defList->append( definition ); - return defList; + definition->prodNum = prodList->length(); + prodList->append( definition ); + return prodList; } LangExpr *BaseParser::construct( const InputLoc &loc, ObjectField *objField, |