Add applying of typedefs, remove generation of type aliases

This commit is contained in:
Anton Danilkin
2018-08-04 14:01:35 +03:00
parent 2b8e092f78
commit da9203142f
6 changed files with 147 additions and 83 deletions

View File

@ -64,9 +64,6 @@ impl TryToTokens for ast::Program {
for e in self.enums.iter() {
e.to_tokens(tokens);
}
for a in self.type_aliases.iter() {
a.to_tokens(tokens);
}
for c in self.consts.iter() {
c.to_tokens(tokens);
}
@ -983,18 +980,6 @@ impl ToTokens for ast::ImportStatic {
}
}
impl ToTokens for ast::TypeAlias {
fn to_tokens(&self, into: &mut TokenStream) {
let vis = &self.vis;
let dest = &self.dest;
let src = &self.src;
(quote! {
#[allow(non_camel_case_types)]
#vis type #dest = #src;
}).to_tokens(into);
}
}
impl ToTokens for ast::Const {
fn to_tokens(&self, tokens: &mut TokenStream) {
use ast::ConstValue::*;