chiark / gitweb /
Dollar doubling feature
This makes it easier to write certain rules commands, and macros
involving eval. Further enhancements will follow, but for now:
* Document the new facility, including the &-escapes to turn it on and
off, its effect, and the three within-doubling don't-double escapes.
* Implementation. Specifically:
- Rename od to oud (`undoubled').
- Provide od which does double things if $ddbl (a global) is set.
- Implement the escapes, and add some error checks.
- Change `od' to `oud' in `&\$', so that that always produces an
undoubled $.
* Enhance extract-doctest:
- Set $e->{DD} to say if it's in `while dollar doubling'.
- Filter out such entries from the `normal' test - they are not
legal outside dollar-doubling.
- Add a dollar-doubling test which includes versions of all
the normal tests as well as the dollar-doubling ones, and
which dollar-doubles the outputs when appropriate.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>