summaryrefslogtreecommitdiff
path: root/src/synthesis.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-05-13 21:27:02 -0400
committerAdrian Thurston <thurston@colm.net>2018-05-13 21:27:02 -0400
commit07e5747e1cc4364b653a780aaa590dc2e11444d9 (patch)
tree62b05e0cde1c5e48e9ed097a709a597b028190f9 /src/synthesis.cc
parentd64259519fc3bb02049c6a9f72d8e9d5373c6ad2 (diff)
downloadcolm-07e5747e1cc4364b653a780aaa590dc2e11444d9.tar.gz
cloned the SEND_TREE instruction as SEND_TEXT
Will use these for sending trees as text (default). SEND_TREE will be for the send_tree and parse_tree syntax.
Diffstat (limited to 'src/synthesis.cc')
-rw-r--r--src/synthesis.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/synthesis.cc b/src/synthesis.cc
index 922fc598..3b47edfb 100644
--- a/src/synthesis.cc
+++ b/src/synthesis.cc
@@ -1593,12 +1593,18 @@ UniqueType *LangTerm::evaluateParse( Compiler *pd, CodeVect &code,
else
code.append( IN_SEND_STREAM_WC );
}
- else {
+ else if ( tree ) {
if ( pd->revertOn )
code.append( IN_SEND_TREE_WV );
else
code.append( IN_SEND_TREE_WC );
}
+ else {
+ if ( pd->revertOn )
+ code.append( IN_SEND_TEXT_WV );
+ else
+ code.append( IN_SEND_TEXT_WC );
+ }
/* Parse instruction, dependent on whether or not we are producing
* revert or commit code. */
@@ -1700,12 +1706,18 @@ void LangTerm::evaluateSendParser( Compiler *pd, CodeVect &code, bool strings )
else
code.append( IN_SEND_STREAM_WC );
}
- else {
+ else if ( !strings ) {
if ( pd->revertOn )
code.append( IN_SEND_TREE_WV );
else
code.append( IN_SEND_TREE_WC );
}
+ else {
+ if ( pd->revertOn )
+ code.append( IN_SEND_TEXT_WV );
+ else
+ code.append( IN_SEND_TEXT_WC );
+ }
parseFrag( pd, code, 0 );
}