diff options
author | SimplyTheOther <simplytheother@gmail.com> | 2021-01-08 15:09:08 +0800 |
---|---|---|
committer | SimplyTheOther <simplytheother@gmail.com> | 2021-01-08 15:09:08 +0800 |
commit | 238a31b33f79cddfaa40c5fd748495a5f2b34630 (patch) | |
tree | bc217d37b5e3ee41b0a69265341945389d1f4dfb /gcc/rust/resolve/rust-ast-resolve.cc | |
parent | b5f86dca7e6b53ca3701ef01ae36070a760dff78 (diff) | |
parent | af04ea2222b6407fb3e83759ae332d600495380c (diff) | |
download | gcc-238a31b33f79cddfaa40c5fd748495a5f2b34630.zip gcc-238a31b33f79cddfaa40c5fd748495a5f2b34630.tar.gz gcc-238a31b33f79cddfaa40c5fd748495a5f2b34630.tar.bz2 |
Merge branch 'master' of https://github.com/redbrain/gccrs
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve.cc')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve.cc b/gcc/rust/resolve/rust-ast-resolve.cc index 8370a5b..fe8d7e0 100644 --- a/gcc/rust/resolve/rust-ast-resolve.cc +++ b/gcc/rust/resolve/rust-ast-resolve.cc @@ -126,20 +126,38 @@ Resolver::generate_builtins () = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U16); auto u32 = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U32); + auto u64 + = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U64); + auto u128 + = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U128); auto i8 = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I8); auto i16 = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I16); auto i32 = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I32); + auto i64 + = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I64); + auto i128 + = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I128); auto rbool = new TyTy::BoolType (mappings->get_next_hir_id ()); + auto f32 + = new TyTy::FloatType (mappings->get_next_hir_id (), TyTy::FloatType::F32); + auto f64 + = new TyTy::FloatType (mappings->get_next_hir_id (), TyTy::FloatType::F64); MKBUILTIN_TYPE ("u8", builtins, u8); MKBUILTIN_TYPE ("u16", builtins, u16); MKBUILTIN_TYPE ("u32", builtins, u32); + MKBUILTIN_TYPE ("u64", builtins, u64); + MKBUILTIN_TYPE ("u128", builtins, u128); MKBUILTIN_TYPE ("i8", builtins, i8); MKBUILTIN_TYPE ("i16", builtins, i16); MKBUILTIN_TYPE ("i32", builtins, i32); + MKBUILTIN_TYPE ("i64", builtins, i64); + MKBUILTIN_TYPE ("i128", builtins, i128); MKBUILTIN_TYPE ("bool", builtins, rbool); + MKBUILTIN_TYPE ("f32", builtins, f32); + MKBUILTIN_TYPE ("f64", builtins, f64); } void @@ -271,5 +289,13 @@ ResolveExpr::visit (AST::BlockExpr &expr) resolver->get_type_scope ().pop (); } +// rust-ast-resolve-struct-expr-field.h + +void +ResolveStructExprField::visit (AST::StructExprFieldIdentifierValue &field) +{ + ResolveExpr::go (field.get_value ().get (), field.get_node_id ()); +} + } // namespace Resolver } // namespace Rust |