hey guys, |
Re: Enumerate attributes + their possible types
Something like the following?
Module m = current;
print name(m)"\n";
print "Type Name\tBase Type\tValues\n";
AttrType at;
for at in current Module do {
int i;
print (at.name)"\t"(at.type)"";
if (at.type"" == "Enumeration") {
for ( i = 0; i < at.size; i++){
print "\t"at.strings[i];
}
}
print "\n"
}
|
Re: Enumerate attributes + their possible types mcnairk - Wed Aug 24 08:12:42 EDT 2011
Something like the following?
Module m = current;
print name(m)"\n";
print "Type Name\tBase Type\tValues\n";
AttrType at;
for at in current Module do {
int i;
print (at.name)"\t"(at.type)"";
if (at.type"" == "Enumeration") {
for ( i = 0; i < at.size; i++){
print "\t"at.strings[i];
}
}
print "\n"
}
Cheers, Yannick |
Re: Enumerate attributes + their possible types mcnairk - Wed Aug 24 08:12:42 EDT 2011
Something like the following?
Module m = current;
print name(m)"\n";
print "Type Name\tBase Type\tValues\n";
AttrType at;
for at in current Module do {
int i;
print (at.name)"\t"(at.type)"";
if (at.type"" == "Enumeration") {
for ( i = 0; i < at.size; i++){
print "\t"at.strings[i];
}
}
print "\n"
}
Perhaps a 2nd report of Attribute Definitions.
Module m = current;
print name(m)"\n";
print "Name\tType\tBaseType\n";
AttrDef ad;
AttrType at
for ad in m do {
at = ad.type
print (at.name)"\t" (ad.typeName) "\t" (at.type) "\n"
}
|