|
|
|
|
@ -14,6 +14,7 @@
|
|
|
|
|
#include <boost/spirit/home/qi/char.hpp> |
|
|
|
|
#include <boost/spirit/home/qi/operator.hpp> |
|
|
|
|
#include <boost/spirit/home/qi/string.hpp> |
|
|
|
|
#include <fstream> |
|
|
|
|
#include <iostream> |
|
|
|
|
#include <limits> |
|
|
|
|
#include <map> |
|
|
|
|
@ -88,6 +89,14 @@ Glib::RefPtr<Gsv::Language> Source::guess_language(const boost::filesystem::path
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
std::ifstream input(file_path.string(), std::ios::binary); |
|
|
|
|
std::string tag(5, '\0'); |
|
|
|
|
if(input && input.read(&tag[0], static_cast<std::streamsize>(tag.size()))) { |
|
|
|
|
if(tag == "<?xml") |
|
|
|
|
language = language_manager->get_language("xml"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if(language->get_id() == "cuda") { |
|
|
|
|
if(file_path.extension() == ".cuh") |
|
|
|
|
|