summaryrefslogtreecommitdiff
path: root/src/expand/include.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/include.cpp
parent27b0292ca6828eed7e782a57ad4d641f0ebf7357 (diff)
parent753a2f44cc4c00b952cddae2ceed066ebb18a470 (diff)
downloadmrust-69537686be13f6ff84ce79e84374351e943ab21b.tar.gz
Merge branch 'master' of https://github.com/thepowersgang/mrustc
Diffstat (limited to 'src/expand/include.cpp')
-rw-r--r--src/expand/include.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/expand/include.cpp b/src/expand/include.cpp
index 83a2aa03..6b1a5508 100644
--- a/src/expand/include.cpp
+++ b/src/expand/include.cpp
@@ -22,7 +22,7 @@ namespace {
return base_path + path;
}
else {
-
+
auto slash = base_path.find_last_of('/');
if( slash == ::std::string::npos )
{
@@ -48,17 +48,17 @@ class CIncludeExpander:
{
if( ident != "" )
ERROR(sp, E0000, "include! doesn't take an ident");
-
+
Token tok;
auto lex = TTStream(tt);
-
+
// TODO: Parse+expand
GET_CHECK_TOK(tok, lex, TOK_STRING);
auto path = mv$(tok.str());
GET_CHECK_TOK(tok, lex, TOK_EOF);
-
+
::std::string file_path = get_path_relative_to(mod.m_file_info.path, mv$(path));
-
+
return box$( Lexer(file_path) );
}
};