diff options
author | Adrian Thurston <thurston@complang.org> | 2015-01-17 09:47:22 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-01-17 09:47:22 -0500 |
commit | 46ec944af0047c5dddd5d413a22fcea4c44c4f10 (patch) | |
tree | 4c904a9276d1f8f08c8b40ac8b7a49af55d80314 /src/declare.cc | |
parent | 1a426568f512691be1c16ef06ea7f156f9002f6e (diff) | |
download | colm-46ec944af0047c5dddd5d413a22fcea4c44c4f10.tar.gz |
setting the map el size
Diffstat (limited to 'src/declare.cc')
-rw-r--r-- | src/declare.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/declare.cc b/src/declare.cc index dcc4b467..2c6b2632 100644 --- a/src/declare.cc +++ b/src/declare.cc @@ -293,21 +293,19 @@ void GenericType::declare( Compiler *pd, Namespace *nspace ) switch ( typeId ) { case GEN_MAP: - pd->initMapFunctions( this ); + pd->initMapFields( this ); break; case GEN_LIST: pd->initListFunctions( this ); pd->initListFields( this ); pd->initListElFields( this ); break; - case GEN_LIST_EL: -// pd->initListElFields( this ); - break; case GEN_PARSER: utArg->langEl->parserId = pd->nextParserId++; pd->initParserFunctions( this ); pd->initParserFields( this ); break; + case GEN_LIST_EL: case GEN_MAP_EL: break; } @@ -926,9 +924,10 @@ void Compiler::addError() globalObjectDef->rootScope->insertField( el->name, el ); } -void Compiler::initMapFunctions( GenericType *gen ) +void Compiler::initMapFields( GenericType *gen ) { addLengthField( gen->objDef, IN_MAP_LENGTH ); + initFunction( gen->utArg, gen->objDef, "find", IN_MAP_FIND, IN_MAP_FIND, gen->keyUT, true ); initFunction( uniqueTypeInt, gen->objDef, "insert", |