srchilite::LanguageInfer Class Reference
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...
Detailed Description
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
Member Function Documentation
const string srchilite::LanguageInfer::infer
(
const std::string &
filename )
Tries to infer the language of the specified inputfile.
- Parameters
-
filename The file to inspect
- Returns
- The inferred language, or "" if inference failed
const string srchilite::LanguageInfer::infer
(
std::istream &
stream = std::cin )
Tries to infer the language of the specified input stream.
- Parameters
-
stream The stream to inspect
- Returns
- The inferred language, or "" if inference failed
The documentation for this class was generated from the following files:
- /home/bettini/work/source-highlight/src-highlite/lib/srchilite/languageinfer.h
- /home/bettini/work/source-highlight/src-highlite/lib/srchilite/languageinfer.cpp