diff options
author | Adrian Thurston <thurston@complang.org> | 2015-04-01 10:24:42 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-04-01 10:24:42 -0400 |
commit | 24e144ea5fd1275bf6c864455b2dd4d96e589363 (patch) | |
tree | 5c35d484904e32626a862bd5784b882a4f27d4b8 /src/parser.cc | |
parent | 03e0f380a472db828c3bd5ae481a6b1c10fed3d0 (diff) | |
download | colm-24e144ea5fd1275bf6c864455b2dd4d96e589363.tar.gz |
first cut of C extensions
Diffstat (limited to 'src/parser.cc')
-rw-r--r-- | src/parser.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/parser.cc b/src/parser.cc index 5ce080c2..7e901f6b 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -452,6 +452,18 @@ void BaseParser::functionDef( StmtList *stmtList, ObjectDef *localFrame, newFunction->inContext = curStruct(); } +void BaseParser::inHostDef( const String &hostCall, ObjectDef *localFrame, + ParameterList *paramList, TypeRef *typeRef, const String &name, bool exprt ) +{ + Function *newFunction = Function::cons( typeRef, name, + paramList, 0, pd->nextHostId++, false, exprt ); + newFunction->hostCall = hostCall; + newFunction->localFrame = localFrame; + newFunction->inHost = true; + pd->inHostList.append( newFunction ); + newFunction->inContext = curStruct(); +} + void BaseParser::iterDef( StmtList *stmtList, ObjectDef *localFrame, ParameterList *paramList, const String &name ) { |