diff options
author | Adrian Thurston <thurston@complang.org> | 2014-12-19 20:23:04 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2014-12-19 20:23:04 -0500 |
commit | db9cfbc7d06ed34f1fe73465d81d3ac0975adaff (patch) | |
tree | 406d44a974f7242787b3c632146511785391f325 /src/compiler.cc | |
parent | 12495ae402a5c9d80d467d9baae72f91ebac13cb (diff) | |
download | colm-db9cfbc7d06ed34f1fe73465d81d3ac0975adaff.tar.gz |
hacked together some struct (non-tree) semantics
Can new, get and set non-tree objects (very limited features).
Diffstat (limited to 'src/compiler.cc')
-rw-r--r-- | src/compiler.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler.cc b/src/compiler.cc index bf5deaa4..2378f3dd 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -743,11 +743,13 @@ LangEl *Compiler::makeRepeatProd( const InputLoc &loc, Namespace *nspace, /* Build the first production of the repeat. */ TypeRef *typeRef1 = TypeRef::cons( loc, ut ); - ProdEl *factor1 = new ProdEl( ProdEl::ReferenceType, InputLoc(), 0, false, typeRef1, 0 ); + ProdEl *factor1 = new ProdEl( ProdEl::ReferenceType, + InputLoc(), 0, false, typeRef1, 0 ); UniqueType *prodNameUT = findUniqueType( TYPE_TREE, prodName ); TypeRef *typeRef2 = TypeRef::cons( loc, prodNameUT ); - ProdEl *factor2 = new ProdEl( ProdEl::ReferenceType, InputLoc(), 0, false, typeRef2, 0 ); + ProdEl *factor2 = new ProdEl( ProdEl::ReferenceType, + InputLoc(), 0, false, typeRef2, 0 ); prodElList1->append( factor1 ); prodElList1->append( factor2 ); @@ -1126,6 +1128,7 @@ void Compiler::compile() prepGrammar(); placeAllLanguageObjects(); + placeAllStructObjects(); placeAllFrameObjects(); placeAllFunctions(); |