We must always stop at $'s in the input now.
Having stopped at $, we normally just output it and carry on. Ie, we
only stop so we can do some inspection: as before, we do this variable
tracking as inspection before processing, rather entangled with
processing.
We can deal reasonably properly with ${ } and $( ).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
err 'cannot $-double &-processed RHS of directive'
if $ddbl && defined $buffering_output;
unless ($nest[0][0] eq 'eval'
err 'cannot $-double &-processed RHS of directive'
if $ddbl && defined $buffering_output;
unless ($nest[0][0] eq 'eval'
- ? s{^(.*?)($esc|[{}])}{}
- : s{^(.*?)($esc)}{}) { od $_; last; }
+ ? s{^(.*?)($esc|\$|[{}])}{}
+ : s{^(.*?)($esc|\$)}{}) { od $_; last; }
od $1;
if ($2 eq '{') {
od $2;
od $1;
if ($2 eq '{') {
od $2;
$pop_nest->('eval');
od '}';
next;
$pop_nest->('eval');
od '}';
next;
+ } elsif ($2 eq '$') {
+ od $2;
+ if (s{^\$}{}) { od $&; }
+ elsif (m{^\(($esc)?([^()\$]+)\)} ||
+ m{^\{($esc)?([^{}\$]+)\}}) {
+ $note_varref->($2,!!$1);
+ }
+ next;
}
if (s{^\\$esc}{}) { od "$$esclitr" }
elsif (s{^\\\$}{}) { oud '$' }
}
if (s{^\\$esc}{}) { od "$$esclitr" }
elsif (s{^\\\$}{}) { oud '$' }