DBD parser accepts record type declarations

Record types are the only DBD entries for which the parser
will not accept redefinitions. This change lets it accept
a record type declaration any number of times. However once
a record type declaration has been parsed the full record
type definition cannot be loaded, an error will be raised
if the full definition is seen. The parser will still not
accept a full record type definition more than once either,
any later copies of the record type must be declarations.
This commit is contained in:
Andrew Johnson
2014-07-27 23:55:47 -05:00
parent 8eed4cdd88
commit a2d511b6e9
+3 -1
View File
@@ -83,7 +83,9 @@ sub toCdefs {
}
sub equals {
my ($a, $b) = @_;
my ($new, $known) = @_;
return 0 if ! $known->fields;
return 1 if ! $new->fields;
dieContext("Duplicate definition of record type '$a->{NAME}'");
}