Skip to content

Commit

Permalink
Expand - Fix stringify a little
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Jan 21, 2024
1 parent 812ccb5 commit 97b4ad4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/expand/stringify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,20 @@ class CExpander:
if(!rv.empty())
rv += " ";
DEBUG(" += " << tok);
rv += tok.to_str();
if( tok.type() == TOK_IDENT ) {
rv += tok.ident().name.c_str();
}
else {
auto v = tok.to_str();
const char* s = v.c_str();
// Very hacky strip of hygine information (e.g. from paths)
if( s[0] == '{' ) {
while( *s != '}' )
s ++;
s ++;
}
rv += s;
}
}

// TODO: Strip out any `{...}` sequences that aren't from nested
Expand Down

0 comments on commit 97b4ad4

Please sign in to comment.