summaryrefslogtreecommitdiff
path: root/src/consinit.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2019-05-24 08:26:26 -0400
committerAdrian Thurston <thurston@colm.net>2019-05-24 08:26:26 -0400
commite52169ed10b0bf0011c2471e1fa7644971d0c7ac (patch)
treedba77918021292531fe13a677e011101a408b13d /src/consinit.cc
parent984e6fb6cf25eee7dafe59db2be6b31b3c7c4b26 (diff)
downloadcolm-e52169ed10b0bf0011c2471e1fa7644971d0c7ac.tar.gz
pushing the trim decision to run-time
The trim and no-trim operators are both now in the expression. In places where we want the print mechanism to decide if it trims or not, we lift the trim operator out of the expression and into the send expression, then pass it to the print and send instructions. This way the stream or input (parser) can control the trim (auto_trim feature) with the expression overriding the default.
Diffstat (limited to 'src/consinit.cc')
-rw-r--r--src/consinit.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/consinit.cc b/src/consinit.cc
index 1c0814ea..995e24f1 100644
--- a/src/consinit.cc
+++ b/src/consinit.cc
@@ -785,7 +785,7 @@ void ConsInit::parseInput( StmtList *stmtList )
LangExpr *open = LangExpr::cons( LangTerm::cons( InputLoc(), openRef, openArgs ) );
/* Construct a list containing the open stream. */
- ConsItem *consItem = ConsItem::cons( internal, ConsItem::ExprType, open, false );
+ ConsItem *consItem = ConsItem::cons( internal, ConsItem::ExprType, open, ConsItem::TrimDefault );
ConsItemList *list = ConsItemList::cons( consItem );
/* Will capture the parser to "P" */