Specify c language explicitly when compiling test parsers
This commit is contained in:
parent
e6c82ead2c
commit
006e9fe4a6
1 changed files with 5 additions and 1 deletions
|
|
@ -97,7 +97,11 @@ const TSLanguage *load_language(const string &source_filename,
|
|||
|
||||
if (!external_scanner_filename.empty()) {
|
||||
string extension = external_scanner_filename.substr(external_scanner_filename.rfind("."));
|
||||
if (extension != ".c") compile_args.push_back("-xc++");
|
||||
if (extension == ".c") {
|
||||
compile_args.push_back("-xc");
|
||||
} else {
|
||||
compile_args.push_back("-xc++");
|
||||
}
|
||||
compile_args.push_back(external_scanner_filename.c_str());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue