chiark / gitweb /
Macro assistance part 2 - syntax for $(eval $(call...))
[secnet.git] / tests / filter / extract-doctest
index 35870cea50ed6987a1cb388eb372be3cb38711df..d779e00a5da4c152f9e55146a7c16b05f483c87c 100755 (executable)
@@ -56,6 +56,9 @@ while (<>) {
            $e->{OutTop} = $1 eq 'nothing' ? '' : $1;
        } elsif (# parse: expect other wordish things to be comments
                 m{^(?!or\b)\w{2,} }) {
+       } elsif (# adhoc: slightly special case for $(eval $(call
+                m{^\$\{.*}) {
+           $e->{Out} .= ' '.$&;
        } elsif (m/^$/) {
        } else {
            confess "unk rhs $_ ?";
@@ -138,6 +141,10 @@ sub writeout ($) {
                  'dollar doubling',
                  sub {
                      my ($e) = @_;
+                     # adhoc: skip &:macro in already-doubling part
+                     return 0 if $e->{In} =~ m{^\&\:macro};
+                     # adhoc: skip &${ ie eval in already-doubling part
+                     return 0 if $e->{In} =~ m{^\&\$\{};
                      return 0 if $e->{CQ};
                      return $e->{DD} || !grep {
                          # If there are two entries with the same In,