From cec5b32e9918c97b0b044ff30b86892d974c82f4 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 24 Feb 2018 20:57:11 +0800 Subject: Standalone MIRI + Codegen MMIR - Drop support --- tools/standalone_miri/module_tree.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'tools/standalone_miri/module_tree.cpp') diff --git a/tools/standalone_miri/module_tree.cpp b/tools/standalone_miri/module_tree.cpp index a457db8e..2fc99bc4 100644 --- a/tools/standalone_miri/module_tree.cpp +++ b/tools/standalone_miri/module_tree.cpp @@ -173,16 +173,27 @@ bool Parser::parse_one() rv.alignment = lex.consume().integer(); lex.check_consume(';'); - // TODO: DST Meta + // Drop glue (if present) + if( lex.consume_if("DROP") ) + { + rv.drop_glue = parse_path(); + lex.check_consume(';'); + } + else + { + // No drop glue + } + + // DST Meta type if( lex.consume_if("DSTMETA") ) { - //rv->dst_meta = parse_type(); + rv.dst_meta = parse_type(); lex.check_consume(';'); - throw "TODO"; } else { - //rv->dst_meta = ::HIR::TypeRef::diverge(); + // Using ! as the metadata type means that the type is Sized (meanwhile, `()` means unsized with no meta) + rv.dst_meta = ::HIR::TypeRef::diverge(); } while( lex.next() != '}' ) -- cgit v1.2.3