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/env.cpp | |
parent | 69311c5199292cd4b00b5c82fe8096d93b7e6465 (diff) | |
download | mrust-94ad750f1727a977b5e5e2b094527e6c449df41d.tar.gz |
Expand - Add parent spans to TTStream[O]
Diffstat (limited to 'src/expand/env.cpp')
-rw-r--r-- | src/expand/env.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expand/env.cpp b/src/expand/env.cpp index cad2fa7c..f4577ef1 100644 --- a/src/expand/env.cpp +++ b/src/expand/env.cpp @@ -14,7 +14,7 @@ namespace { // Read a string out of the input stream ::std::string get_string(const Span& sp, const AST::Crate& crate, AST::Module& mod, const TokenTree& tt) { - auto lex = TTStream(tt); + auto lex = TTStream(sp, tt); auto n = Parse_ExprVal(lex); ASSERT_BUG(sp, n, "No expression returned"); @@ -44,7 +44,7 @@ class CExpanderEnv: if( !var_val_cstr ) { ERROR(sp, E0000, "Environment variable '" << varname << "' not defined"); } - return box$( TTStreamO(TokenTree(Token(TOK_STRING, var_val_cstr))) ); + return box$( TTStreamO(sp, TokenTree(Token(TOK_STRING, var_val_cstr))) ); } }; @@ -68,7 +68,7 @@ class CExpanderOptionEnv: rv.push_back( Token(TOK_LIFETIME, "static") ); rv.push_back( Token(TOK_IDENT, "str") ); rv.push_back( Token(TOK_GT) ); - return box$( TTStreamO(TokenTree( {}, mv$(rv) )) ); + return box$( TTStreamO(sp, TokenTree( {}, mv$(rv) )) ); } else { ::std::vector< TokenTree> rv; @@ -77,7 +77,7 @@ class CExpanderOptionEnv: rv.push_back( Token(TOK_PAREN_OPEN) ); rv.push_back( Token(TOK_STRING, var_val_cstr) ); rv.push_back( Token(TOK_PAREN_CLOSE) ); - return box$( TTStreamO(TokenTree( {}, mv$(rv) )) ); + return box$( TTStreamO(sp, TokenTree( {}, mv$(rv) )) ); } } }; |