summaryrefslogtreecommitdiff
path: root/colm/parsetree.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-02-19 21:51:49 -0500
committerAdrian Thurston <thurston@complang.org>2013-02-19 21:51:49 -0500
commit43e38f5809c4015b694526a54fabf6db570aeef3 (patch)
tree8f44f6f9910b39139a5c09f22dc3e2ef48c1a5ff /colm/parsetree.h
parentd3d05283174cc947ba2dcd1556a13d4a3a4ee8ee (diff)
downloadcolm-43e38f5809c4015b694526a54fabf6db570aeef3.tar.gz
some more functions added for various language constructs
Diffstat (limited to 'colm/parsetree.h')
-rw-r--r--colm/parsetree.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/colm/parsetree.h b/colm/parsetree.h
index 69586e98..eeea34c3 100644
--- a/colm/parsetree.h
+++ b/colm/parsetree.h
@@ -2797,21 +2797,29 @@ struct CodeBlock
struct Function
{
- Function( TypeRef *typeRef, const String &name,
- ParameterList *paramList, CodeBlock *codeBlock,
- int funcId, bool isUserIter )
+ Function()
:
- typeRef(typeRef),
- name(name),
- paramList(paramList),
- codeBlock(codeBlock),
- funcId(funcId),
- isUserIter(isUserIter),
paramListSize(0),
paramUTs(0),
inContext(0)
{}
+ static Function *cons( TypeRef *typeRef, const String &name,
+ ParameterList *paramList, CodeBlock *codeBlock,
+ int funcId, bool isUserIter )
+ {
+ Function *f = new Function;
+
+ f->typeRef = typeRef;
+ f->name = name;
+ f->paramList = paramList;
+ f->codeBlock = codeBlock;
+ f->funcId = funcId;
+ f->isUserIter = isUserIter;
+
+ return f;
+ }
+
TransBlock *transBlock;
TypeRef *typeRef;
String name;