Commit 59c4584c authored by Matthias Braun's avatar Matthias Braun
Browse files

allow user defined functions for outputting node init code

parent ef30372a
......@@ -43,6 +43,7 @@ our $default_attr_type;
our $default_cmp_attr;
our $default_copy_attr;
our %init_attr;
our $custom_init_attr_func;
our %compare_attr;
our %copy_attr;
our %reg_classes;
......@@ -506,6 +507,9 @@ foreach my $op (keys(%nodes)) {
die "Fatal error: Couldn't find attribute initialisation code for type '${attr_type}'";
$temp .= "${attr_init_code}\n";
if(defined($custom_init_attr_func)) {
$temp .= &$custom_init_attr_func(\%n);
$temp .= "\n";
# set flags for outs
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment