rustc: Implement foreign constants.

This is needed for a lot of Apple libraries, as Apple tends to put a lot of
globals in dynamic libraries.
This commit is contained in:
Patrick Walton 2012-08-25 15:09:33 -07:00
parent bb5c07922f
commit 8ef4551904
12 changed files with 139 additions and 71 deletions

View file

@ -421,6 +421,14 @@ fn print_foreign_item(s: ps, item: @ast::foreign_item) {
word(s.s, ~";");
end(s); // end the outer fn box
}
ast::foreign_item_const(t) => {
head(s, ~"const");
print_ident(s, item.ident);
word_space(s, ~":");
print_type(s, t);
word(s.s, ~";");
end(s); // end the head-ibox
}
}
}