chiark / gitweb /
Dollar doubling feature
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Dec 2019 23:29:40 +0000 (23:29 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 30 Dec 2019 11:35:15 +0000 (11:35 +0000)
commitf68bcc4648c8cbe549e37159df8bb488178c510c
tree71f35d9d6a09c97c5c76e33c243cb8367b8a4d7b
parent9df28b5780adaa67bd11063669c8c783661a8770
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>
README
generate
tests/filter/extract-doctest