diff options
author | John Hodge <tpg@mutabah.net> | 2016-07-17 15:21:02 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-07-17 15:21:02 +0800 |
commit | 50c127caac7113d8286e82ee59fc25b9e1ee5b8d (patch) | |
tree | c507a8f67cc04087f32794753d6ea699f88e2dd4 /src/parse/root.cpp | |
parent | 2d6ce59b45d3d6062ce427da9b04ce2ba7d98240 (diff) | |
download | mrust-50c127caac7113d8286e82ee59fc25b9e1ee5b8d.tar.gz |
Parse - (HACK) Parse (and discard) specialisation markers
Diffstat (limited to 'src/parse/root.cpp')
-rw-r--r-- | src/parse/root.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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);
|