diff options
author | Adrian Thurston <thurston@colm.net> | 2019-05-24 08:26:26 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2019-05-24 08:26:26 -0400 |
commit | e52169ed10b0bf0011c2471e1fa7644971d0c7ac (patch) | |
tree | dba77918021292531fe13a677e011101a408b13d /src/loadinit.cc | |
parent | 984e6fb6cf25eee7dafe59db2be6b31b3c7c4b26 (diff) | |
download | colm-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/loadinit.cc')
-rw-r--r-- | src/loadinit.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/loadinit.cc b/src/loadinit.cc index 4bc99d18..fc75906c 100644 --- a/src/loadinit.cc +++ b/src/loadinit.cc @@ -317,7 +317,7 @@ void LoadInit::consParseStmt( 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" */ |