Source-highlight Library
|
Tries to infer the language by inspecting the input file. More...
#include <languageinfer.h>
Public Member Functions | |
const std::string | infer (const std::string &filename) |
Tries to infer the language of the specified inputfile. More... | |
const std::string | infer (std::istream &stream=std::cin) |
Tries to infer the language of the specified input stream. More... | |
Tries to infer the language by inspecting the input file.
For instance, it looks for something like
#!/bin/bash
at the beginning of the file, or other expression to infer the language
const string srchilite::LanguageInfer::infer | ( | const std::string & | filename | ) |
Tries to infer the language of the specified inputfile.
filename | The file to inspect |
const string srchilite::LanguageInfer::infer | ( | std::istream & | stream = std::cin | ) |
Tries to infer the language of the specified input stream.
stream | The stream to inspect |