diff options
author | Adrian Thurston <thurston@complang.org> | 2012-05-08 20:31:45 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-05-08 20:31:45 -0400 |
commit | 8fb521422836822137ab08179cecc8aebe05b4dc (patch) | |
tree | 480f563b44f9af20d500952bcda095d485f9e4fa /colm/tree.c | |
parent | 462cb71593526824fde548765ddf8fdcd0a38b07 (diff) | |
download | colm-8fb521422836822137ab08179cecc8aebe05b4dc.tar.gz |
The data trees are now allocated as plain trees, not parse trees.
Diffstat (limited to 'colm/tree.c')
-rw-r--r-- | colm/tree.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/colm/tree.c b/colm/tree.c index f020d767..a6f3ccda 100644 --- a/colm/tree.c +++ b/colm/tree.c @@ -593,19 +593,11 @@ Kid *copyKidList( Program *prg, Kid *kidList ) } /* New tree has zero ref. */ -Tree *copyRealTree( Program *prg, Tree *tree, Kid *oldNextDown, - Kid **newNextDown, int parseTree ) +Tree *copyRealTree( Program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown ) { /* Need to keep a lookout for next down. If * copying it, return the copy. */ - Tree *newTree; - if ( parseTree ) { - newTree = (Tree*) parseTreeAllocate( prg ); - newTree->flags |= AF_PARSE_TREE; - } - else { - newTree = treeAllocate( prg ); - } + Tree *newTree = treeAllocate( prg ); newTree->id = tree->id; newTree->tokdata = stringCopy( prg, tree->tokdata ); @@ -753,7 +745,7 @@ Tree *copyTree( Program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown ) else if ( tree->id == LEL_ID_STREAM ) assert(false); else { - tree = copyRealTree( prg, tree, oldNextDown, newNextDown, false ); + tree = copyRealTree( prg, tree, oldNextDown, newNextDown ); } assert( tree->refs == 0 ); |