-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlanguage.h
More file actions
35 lines (26 loc) · 692 Bytes
/
language.h
File metadata and controls
35 lines (26 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef LANGUAGE_H
#define LANGUAGE_H
#include <Qsci/qscilexer.h>
struct Language {
virtual QsciLexer* lexer() const = 0;
virtual ~Language() {}
static Language* query(QString path);
template <typename Type>
bool test() const {
return dynamic_cast<const Type*>(this);
}
};
struct PlainLanguage : public Language {
virtual QsciLexer* lexer() const;
};
struct MakefileLanguage : public Language {
virtual QsciLexer* lexer() const;
};
struct CompilableLanguage : public Language {};
struct CLanguage : public CompilableLanguage {
virtual QsciLexer* lexer() const;
};
struct CxxLanguage : public CompilableLanguage {
virtual QsciLexer* lexer() const;
};
#endif // LANGUAGE_H