actually embrace new syntaxes
This commit is contained in:
parent
13e8120fc4
commit
68155d652a
@ -12,3 +12,4 @@ applying simple syntax highlighting rules.
|
||||
### Supported languages:
|
||||
+ Ada
|
||||
+ C/C++
|
||||
+ Fasm
|
||||
|
@ -140,8 +140,12 @@ void on_message_timeout(int unused) {
|
||||
|
||||
static
|
||||
language_t translate_language(const char * const language) {
|
||||
if (!strcmp(language, "C") || !strcmp(language, "C++")) {
|
||||
if (!strcmp(language, "C")) {
|
||||
return C;
|
||||
} else if (!strcmp(language, "C++") || !strcmp(language, "CPP")) {
|
||||
return CPP;
|
||||
} else if (!strcmp(language, "ASM") || !strcmp(language, "FASM") || !strcmp(language, "ASSEMBLY")) {
|
||||
return ASM;
|
||||
} else if (!strcmp(language, "ADA")) {
|
||||
return ADA;
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ char * port;
|
||||
|
||||
typedef enum {
|
||||
C,
|
||||
CPP,
|
||||
ASM,
|
||||
ADA,
|
||||
} language_t;
|
||||
|
||||
@ -22,6 +24,8 @@ typedef void (*syntax_setter_t)(void);
|
||||
|
||||
syntax_setter_t syntax_functions[] = {
|
||||
[C] = &syntax_c,
|
||||
[CPP] = &syntax_cpp,
|
||||
[ASM] = &syntax_fasm,
|
||||
[ADA] = &syntax_ada,
|
||||
};
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
extern void syntax_c (void);
|
||||
extern void syntax_ada (void);
|
||||
extern void syntax_cpp (void);
|
||||
extern void syntax_fasm (void);
|
||||
|
||||
extern char * syntax_highlight (char * string);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user