diff options
author | Adrian Thurston <thurston@colm.net> | 2016-10-01 09:34:21 -0700 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2016-10-01 09:34:21 -0700 |
commit | 84f764672525cd475114b76b104fc1bc0e6ce5b2 (patch) | |
tree | ff409ee3f52e08447b90af014f3ff5b8284c389c /src/consinit.cc | |
parent | fb9e7b3b77657a7e2db63d7cd2d9cd4706715d21 (diff) | |
download | colm-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/consinit.cc')
-rw-r--r-- | src/consinit.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/consinit.cc b/src/consinit.cc index 61b84f8b..397b8ecd 100644 --- a/src/consinit.cc +++ b/src/consinit.cc @@ -792,7 +792,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 ); + ConsItem *consItem = ConsItem::cons( internal, ConsItem::ExprType, open, false ); ConsItemList *list = ConsItemList::cons( consItem ); /* Will capture the parser to "P" */ |