diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-10-29 12:44:01 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-10-29 12:44:01 +0800 |
commit | 94ad750f1727a977b5e5e2b094527e6c449df41d (patch) | |
tree | 53dfa784a3beb7dc2d60b13aa6678dfe6b9c82e8 /src/expand/asm.cpp | |
parent | 69311c5199292cd4b00b5c82fe8096d93b7e6465 (diff) | |
download | mrust-94ad750f1727a977b5e5e2b094527e6c449df41d.tar.gz |
Expand - Add parent spans to TTStream[O]
Diffstat (limited to 'src/expand/asm.cpp')
-rw-r--r-- | src/expand/asm.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expand/asm.cpp b/src/expand/asm.cpp index 336321f7..51412f99 100644 --- a/src/expand/asm.cpp +++ b/src/expand/asm.cpp @@ -38,7 +38,7 @@ class CAsmExpander: ::std::unique_ptr<TokenStream> expand(const Span& sp, const ::AST::Crate& crate, const ::std::string& ident, const TokenTree& tt, AST::Module& mod) override { Token tok; - auto lex = TTStream(tt); + auto lex = TTStream(sp, tt); if( ident != "" ) ERROR(sp, E0000, "format_args! doesn't take an ident"); @@ -160,9 +160,9 @@ class CAsmExpander: ERROR(sp, E0000, "Unexpected token in asm! - " << lex.getToken()); } + // Convert this into an AST node and insert as an intepolated expression ::AST::ExprNodeP rv = ::AST::ExprNodeP( new ::AST::ExprNode_Asm { mv$(template_text), mv$(outputs), mv$(inputs), mv$(clobbers), mv$(flags) } ); - // TODO: Convert this into an AST node - return box$( TTStreamO(TokenTree(Token( InterpolatedFragment(InterpolatedFragment::EXPR, rv.release()) )))); + return box$( TTStreamO(sp, TokenTree(Token( InterpolatedFragment(InterpolatedFragment::EXPR, rv.release()) )))); } }; |