clean up whitespace coalesce a bit
This commit is contained in:
parent
2485f08172
commit
4131616420
15
phase1.rl
15
phase1.rl
|
@ -72,6 +72,7 @@ const unsigned char escape = 0xb6;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
# todo -- {{variables}}
|
||||||
# same quoting logic as ' string
|
# same quoting logic as ' string
|
||||||
vstring =
|
vstring =
|
||||||
'{' $push_back
|
'{' $push_back
|
||||||
|
@ -99,17 +100,13 @@ const unsigned char escape = 0xb6;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
# this is a mess ...
|
# gobble up all the white space...
|
||||||
coalesce_ws =
|
coalesce_ws =
|
||||||
ws
|
ws+
|
||||||
(
|
|
||||||
ws
|
|
||||||
|
|
|
||||||
escape nl ${ line++; }
|
|
||||||
)*
|
|
||||||
<:
|
<:
|
||||||
any ${ scratch.push_back(' '); fhold; }
|
''
|
||||||
;
|
%{ if (!scratch.empty() && scratch.back() != ' ') scratch.push_back(' '); }
|
||||||
|
;
|
||||||
|
|
||||||
line :=
|
line :=
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in New Issue