diff options
author | John Hodge <tpg@mutabah.net> | 2018-07-29 12:47:44 +0100 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-07-29 12:47:44 +0100 |
commit | c971a6fa8375598ecf9c99ee6b086e8cf957f568 (patch) | |
tree | f7f431cbac52e6b25d311bedd503b6584c51bd37 /src/expand/file_line.cpp | |
parent | 5d4bf9e96d795623f1b32b2f1f2e57c4f74419fe (diff) | |
download | mrust-c971a6fa8375598ecf9c99ee6b086e8cf957f568.tar.gz |
All - Initial work on supporting 1.29 as a target version
Diffstat (limited to 'src/expand/file_line.cpp')
-rw-r--r-- | src/expand/file_line.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/expand/file_line.cpp b/src/expand/file_line.cpp index 7a827ccf..2bf85ffd 100644 --- a/src/expand/file_line.cpp +++ b/src/expand/file_line.cpp @@ -46,6 +46,14 @@ class CExpanderColumn: return box$( TTStreamO(sp, TokenTree(Token((uint64_t)get_top_span(sp).start_ofs, CORETYPE_U32))) ); } }; +class CExpanderUnstableColumn: + public ExpandProcMacro +{ + ::std::unique_ptr<TokenStream> expand(const Span& sp, const AST::Crate& crate, const ::std::string& ident, const TokenTree& tt, AST::Module& mod) override + { + return box$( TTStreamO(sp, TokenTree(Token((uint64_t)get_top_span(sp).start_ofs, CORETYPE_U32))) ); + } +}; class CExpanderModulePath: public ExpandProcMacro @@ -65,5 +73,6 @@ class CExpanderModulePath: STATIC_MACRO("file", CExpanderFile); STATIC_MACRO("line", CExpanderLine); STATIC_MACRO("column", CExpanderColumn); +STATIC_MACRO("__rust_unstable_column", CExpanderUnstableColumn); STATIC_MACRO("module_path", CExpanderModulePath); |