Bugfix: In old style subst, undefed macros were taken from previous line.
Feature: Errors show both locations, in template and in subst file
This commit is contained in:
@@ -97,6 +97,7 @@ sub parseTemplate {
|
||||
} else {
|
||||
while (parseRecord) {};
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub parseSubst {
|
||||
@@ -113,6 +114,7 @@ sub parseSubst {
|
||||
if ($_ eq "{") {
|
||||
# old style substitution
|
||||
do {
|
||||
local %subst;
|
||||
while (1) {
|
||||
my $macro;
|
||||
do {
|
||||
@@ -122,7 +124,7 @@ sub parseSubst {
|
||||
expect "=", "$STRING|$SUBST value for $macro";
|
||||
$subst{$macro} = $_;
|
||||
}
|
||||
parseTemplate $filename;
|
||||
eval {parseTemplate $filename} or die "$@called from $ARGV line $.\n";
|
||||
expect "{|} '{' or '}'";
|
||||
} while $_ eq "{";
|
||||
} else {
|
||||
@@ -147,7 +149,7 @@ sub parseSubst {
|
||||
$subst{$macro} = $_;
|
||||
}
|
||||
expect "}";
|
||||
parseTemplate $filename;
|
||||
eval {parseTemplate $filename} or die "$@called from $ARGV line $.\n";
|
||||
};
|
||||
}
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user