clean up whitespace coalesce a bit

This commit is contained in:
Kelvin Sherlock 2016-02-10 23:53:41 -05:00
parent 2485f08172
commit 4131616420
1 changed files with 6 additions and 9 deletions

View File

@ -72,6 +72,7 @@ const unsigned char escape = 0xb6;
}
;
# todo -- {{variables}}
# same quoting logic as ' string
vstring =
'{' $push_back
@ -99,17 +100,13 @@ const unsigned char escape = 0xb6;
}
;
# this is a mess ...
# gobble up all the white space...
coalesce_ws =
ws
(
ws
|
escape nl ${ line++; }
)*
ws+
<:
any ${ scratch.push_back(' '); fhold; }
;
''
%{ if (!scratch.empty() && scratch.back() != ' ') scratch.push_back(' '); }
;
line :=
(