Re-add a variable to hold the current target in main.cpp, and capture it by value in the compile function
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
1f819bc136
commit
513c9a44a0
|
@ -46,8 +46,9 @@ int main(int argc, char* argv[]) {
|
|||
} else invalid_argument: Yerbacon::fail({"\"", currentArg.data(), "\" is not a valid argument."});
|
||||
}
|
||||
}
|
||||
const auto compile = [&target, &newLines](string_view name) -> string {
|
||||
string transpiledString = Target::forName(target, newLines)->transpileWithTree(parseString(getFileContent(name.data())));
|
||||
const auto current_target = Target::forName(target, newLines);
|
||||
const auto compile = [&target, current_target](string_view name) -> string {
|
||||
string transpiledString = current_target->transpileWithTree(parseString(getFileContent(name.data())));
|
||||
name.remove_suffix(6);
|
||||
string outputFile;
|
||||
(outputFile = name).append(target);
|
||||
|
|
Loading…
Reference in New Issue