From 60ad3249e0f48379ecf916631b42286b89174c4d Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 23 Sep 2017 14:51:48 +0800 Subject: Expand - Little fixes for libpanic_unwind win32 --- src/ast/ast.hpp | 1 + src/expand/lang_item.cpp | 6 ++++++ src/macro_rules/eval.cpp | 3 +++ 3 files changed, 10 insertions(+) (limited to 'src') diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp index 3e0545ed..2ef17718 100644 --- a/src/ast/ast.hpp +++ b/src/ast/ast.hpp @@ -46,6 +46,7 @@ enum eItemType ITEM_TRAIT, ITEM_STRUCT, ITEM_FN, + ITEM_STATIC, }; struct StructItem diff --git a/src/expand/lang_item.cpp b/src/expand/lang_item.cpp index 5c92cd76..53606bea 100644 --- a/src/expand/lang_item.cpp +++ b/src/expand/lang_item.cpp @@ -85,6 +85,9 @@ void handle_lang_item(const Span& sp, AST::Crate& crate, const AST::Path& path, else if( name == "range_to" ) { } else if( name == "unsafe_cell" ) { } + // Statics + else if( name == "msvc_try_filter" ) { } + // Functions else if( name == "panic" ) { } else if( name == "panic_bounds_check" ) { } @@ -139,6 +142,9 @@ public: //handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_EXTERN_FN); } ), + (Static, + handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_STATIC); + ), (Struct, handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_STRUCT); ), diff --git a/src/macro_rules/eval.cpp b/src/macro_rules/eval.cpp index 61a190ab..8f7072e5 100644 --- a/src/macro_rules/eval.cpp +++ b/src/macro_rules/eval.cpp @@ -1026,6 +1026,9 @@ namespace TRACE_FUNCTION; switch(lex.next()) { + case TOK_UNDERSCORE: + lex.consume(); + return true; case TOK_INTERPOLATED_TYPE: lex.consume(); return true; -- cgit v1.2.3