summaryrefslogtreecommitdiff
path: root/src/loadinit.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2016-10-01 09:34:21 -0700
committerAdrian Thurston <thurston@colm.net>2016-10-01 09:34:21 -0700
commit84f764672525cd475114b76b104fc1bc0e6ce5b2 (patch)
treeff409ee3f52e08447b90af014f3ff5b8284c389c /src/loadinit.cc
parentfb9e7b3b77657a7e2db63d7cd2d9cd4706715d21 (diff)
downloadcolm-84f764672525cd475114b76b104fc1bc0e6ce5b2.tar.gz
auto-trim in print, send and construct, disable with @
Now automatically trimming when building trees and printing. This is consistent with the $ operator. Rationale is to standardize on the most commonly desired behaviour and provide options for the less-needed. Also much less likely to result in surprising output. There are many cases where test inputs won't have any surrounding ignores, making it easy to forget a trim is required. Then the occasional tree with surrounding ignores will give an undesired result. Better to standardize on trim, making the default behaviour more consistent. The trim can be turned off with the @ operator in front of an expression.
Diffstat (limited to 'src/loadinit.cc')
-rw-r--r--src/loadinit.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/loadinit.cc b/src/loadinit.cc
index b6f1bc74..695f8751 100644
--- a/src/loadinit.cc
+++ b/src/loadinit.cc
@@ -323,7 +323,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 );
+ ConsItem *consItem = ConsItem::cons( internal, ConsItem::ExprType, open, false );
ConsItemList *list = ConsItemList::cons( consItem );
/* Will capture the parser to "P" */