"die" on a parsing error, don't just print "Unmatched line"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5368 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-07-03 19:10:46 +00:00
parent c6647ae996
commit a1cb6521fc
1 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ sub parseEnum
$enumMap{$curEnum{"name"}} = \%curEnum;
return;
}
else { print "Unmatched line: $_\n"; }
else { die "Unmatched line: $_\n"; }
}
}
@ -112,7 +112,7 @@ sub parseStruct
push @{$curStruct{"fields"}}, \%field;
}
else { print "Unmatched line: $_\n"; }
else { die "Unmatched line: $_\n"; }
}
}
@ -131,7 +131,7 @@ while (<>)
}
elsif (/^\s*struct\s+(\w+)\s*$/) { parseStruct($1, \@curComment); }
elsif (/^\s*enum\s+(\w+)\s*$/) { parseEnum($1, \@curComment); }
else { print "Unmatched line: $_\n"; }
else { die "Unmatched line: $_\n"; }
}
CG::startFile($name);