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:
parent
bb5c07922f
commit
8ef4551904
12 changed files with 139 additions and 71 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue