chiark / gitweb /
Syntax: Incompatible change: Use &{ not &${ for macros
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Jan 2020 13:26:26 +0000 (13:26 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Jan 2020 13:59:05 +0000 (13:59 +0000)
This will be more orthogonal with $( which will come in a moment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
README
generate
tests/filter/Dir.sd.mk
tests/filter/extract-doctests

diff --git a/README b/README
index 4493a0da2f146b5bf9121f09aa780ee9b3ee5cfa..b42356dc5e15ef63ee3bbb89b668551ddf2e964a 100644 (file)
--- a/README
+++ b/README
@@ -219,7 +219,7 @@ STUFF $ THINGS      ..      STUFF $$ THINGS
 &:endm         ..      endef
        NAME is processed for &
 
-&${..$..}      =>      ${eval ${call ..$$..}}
+&{..$..}       =>      ${eval ${call ..$$..}}
        (matches { } pairs to find the end)
        content is $-doubled (unless it contains &$- to turn that off)
 
index bcbbf79dde7d86b5ad1b3ff5ba3b30b1ca2359d8..c2dc42da1ae75eb7ca8f17c1c0e0c635de22541c 100755 (executable)
--- a/generate
+++ b/generate
@@ -371,11 +371,11 @@ sub process_input_mk ($$$$) {
                $note_varref->($2,!!$1) if m{^($esc)?([^()\$]+\))};
            }
            elsif (s{^\$(\d+)}{}) { ddbl_only($&); oud "\${$1}"; }
-           elsif (s{^\$\{}{}) {
+           elsif (s{^\{}{}) {
                err 'macro invocation cannot be re-$-doubled' if $ddbl;
                od '${eval ${call ';
                $evalcall_brackets = 1;
-               $push_nest->('eval',1, '&${...}');
+               $push_nest->('eval',1, '&{...}');
                $note_varref->($2,!!$1) if m{^\s*($esc)?([^,{}\$]+)};
            } elsif (s{^([~^]?)(?=[ \t])}{}) {
                my $prefix = $pfxmap{$1} // die "internal error ($1?)";
index a9da21fcb2599153b26d03d67d4020d0dc352843..f5e2868805869b90edcb7187728040d85e33d72a 100644 (file)
@@ -14,7 +14,7 @@ WARN += 3
 # &$NOWARN1 $(NOWARN1)
 # &$NOWARN2 $(NOWARN2)
 
-&${ some-macro, 42, $x, { &$- $(foreach something) } }
+&{ some-macro, 42, $x, { &$- $(foreach something) } }
 
 $&FBAR
 
index 130c23705b2828968fceeacd233ec010460221b5..e4141e68f060816d8a6d29a927042f7bf10eba2c 100755 (executable)
@@ -147,7 +147,7 @@ sub writeout ($) {
                      # 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->{In} =~ m{^\&\{};
                      return 0 if $e->{CQ};
                      return $e->{DD} || !grep {
                          # If there are two entries with the same In,