1 // Copyright (C) 2010-2020 Joel Rosdahl and other contributors
3 // See doc/AUTHORS.adoc for a complete list of contributors.
5 // This program is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free
7 // Software Foundation; either version 3 of the License, or (at your option)
10 // This program is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 // You should have received a copy of the GNU General Public License along with
16 // this program; if not, write to the Free Software Foundation, Inc., 51
17 // Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 // Guess the language of `fname` based on its extension. Returns the empty
26 // string if the extension is unknown.
27 std::string language_for_file(const std::string& fname);
29 // Return the preprocessed language for `language`, or the empty string if
31 std::string p_language_for_language(const std::string& language);
33 // Return the default file extension (including dot) for `language`, or the
34 // empty string if unknown.
35 std::string extension_for_language(const std::string& language);
37 // Return whether `language` is a supported language.
38 bool language_is_supported(const std::string& language);
40 // Return whether `language` is supported preprocessed language.
41 bool language_is_preprocessed(const std::string& language);