From 50c127caac7113d8286e82ee59fc25b9e1ee5b8d Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 17 Jul 2016 15:21:02 +0800 Subject: Parse - (HACK) Parse (and discard) specialisation markers --- src/parse/root.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/parse/root.cpp') diff --git a/src/parse/root.cpp b/src/parse/root.cpp index 7dfb6f2c..9ae8a628 100644 --- a/src/parse/root.cpp +++ b/src/parse/root.cpp @@ -591,6 +591,14 @@ AST::Trait Parse_TraitDef(TokenStream& lex, AST::Module& mod, const AST::MetaIte } SET_ATTRS(lex, item_attrs); + bool is_specialisable = false; + if( tok.type() == TOK_IDENT && tok.str() == "default" ) { + is_specialisable = true; + GET_TOK(tok, lex); + } + // TODO: Mark specialisation + (void)is_specialisable; + ::std::string abi = "rust"; switch(tok.type()) { @@ -983,6 +991,14 @@ void Parse_Impl_Item(TokenStream& lex, AST::Impl& impl) GET_TOK(tok, lex); } + bool is_specialisable = false; + if( tok.type() == TOK_IDENT && tok.str() == "default" ) { + is_specialisable = true; + GET_TOK(tok, lex); + } + // TODO: Mark specialisation + (void)is_specialisable; + if(tok.type() == TOK_RWORD_UNSAFE) { item_attrs.push_back( AST::MetaItem("#UNSAFE") ); GET_TOK(tok, lex); -- cgit v1.2.3