summaryrefslogtreecommitdiff
path: root/src/parser.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-04-01 10:24:42 -0400
committerAdrian Thurston <thurston@complang.org>2015-04-01 10:24:42 -0400
commit24e144ea5fd1275bf6c864455b2dd4d96e589363 (patch)
tree5c35d484904e32626a862bd5784b882a4f27d4b8 /src/parser.cc
parent03e0f380a472db828c3bd5ae481a6b1c10fed3d0 (diff)
downloadcolm-24e144ea5fd1275bf6c864455b2dd4d96e589363.tar.gz
first cut of C extensions
Diffstat (limited to 'src/parser.cc')
-rw-r--r--src/parser.cc12
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 )
{