summaryrefslogtreecommitdiff
path: root/src/expand/concat.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-25 17:35:00 +1100
committerJohn Hodge <tpg@mutabah.net>2016-12-25 17:35:00 +1100
commit69537686be13f6ff84ce79e84374351e943ab21b (patch)
treede4bef9b5ace623b59751447b9131046483d2388 /src/expand/concat.cpp
parent27b0292ca6828eed7e782a57ad4d641f0ebf7357 (diff)
parent753a2f44cc4c00b952cddae2ceed066ebb18a470 (diff)
downloadmrust-69537686be13f6ff84ce79e84374351e943ab21b.tar.gz
Merge branch 'master' of https://github.com/thepowersgang/mrustc
Diffstat (limited to 'src/expand/concat.cpp')
-rw-r--r--src/expand/concat.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expand/concat.cpp b/src/expand/concat.cpp
index 7475325a..a08e9168 100644
--- a/src/expand/concat.cpp
+++ b/src/expand/concat.cpp
@@ -19,18 +19,18 @@ class CConcatExpander:
::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);
if( ident != "" )
ERROR(sp, E0000, "format_args! doesn't take an ident");
-
+
::std::string rv;
do {
if( LOOK_AHEAD(lex) == TOK_EOF ) {
GET_TOK(tok, lex);
break ;
}
-
+
auto v = Parse_Expr0(lex);
DEBUG("concat - v=" << *v);
Expand_BareExpr(crate, mod, v);
@@ -63,7 +63,7 @@ class CConcatExpander:
} while( GET_TOK(tok, lex) == TOK_COMMA );
if( tok.type() != TOK_EOF )
throw ParseError::Unexpected(lex, tok, {TOK_COMMA, TOK_EOF});
-
+
return box$( TTStreamO(TokenTree(Token(TOK_STRING, mv$(rv)))) );
}
};