forked from 4coder-archive/4coder_fleury
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4coder_fleury_lang_list.h
68 lines (62 loc) · 2.24 KB
/
4coder_fleury_lang_list.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* date = January 29th 2021 9:37 pm */
#ifndef FCODER_FLEURY_LANG_LIST_H
#define FCODER_FLEURY_LANG_LIST_H
// NOTE(rjf): Include language files here.
#include "generated/4coder_fleury_lexer_jai.h"
#include "generated/4coder_fleury_lexer_jai.cpp"
#include "4coder_fleury_lang_cpp.cpp"
#include "4coder_fleury_lang_jai.cpp"
#include "4coder_fleury_lang_metadesk.cpp"
// NOTE(rjf): @f4_register_languages Register languages.
function void
F4_RegisterLanguages(void)
{
// NOTE(rjf): C/C++
{
String_Const_u8 extensions[] =
{
S8Lit("cpp"), S8Lit("cc"), S8Lit("c"), S8Lit("cxx"),
S8Lit("C"), S8Lit("h"), S8Lit("hpp"),
};
for(int i = 0; i < ArrayCount(extensions); i += 1)
{
F4_RegisterLanguage(extensions[i],
F4_CPP_IndexFile,
lex_full_input_cpp_init,
lex_full_input_cpp_breaks,
F4_CPP_PosContext,
F4_CPP_Highlight,
Lex_State_Cpp);
}
}
// NOTE(rjf): Jai
{
F4_RegisterLanguage(S8Lit("jai"),
F4_Jai_IndexFile,
lex_full_input_jai_init,
lex_full_input_jai_breaks,
F4_Jai_PosContext,
F4_Jai_Highlight,
Lex_State_Jai);
}
// NOTE(rjf): Metadesk
{
String_Const_u8 extensions[] =
{
// TODO(rjf): Maybe find a config-driven way to specify these? "mc" was sort of
// introduced ad-hoc...
S8Lit("md"), S8Lit("mc"), S8Lit("metacode"), S8Lit("meta"), S8Lit("metadesk"),
};
for(int i = 0; i < ArrayCount(extensions); i += 1)
{
F4_RegisterLanguage(extensions[i],
F4_MD_IndexFile,
lex_full_input_cpp_init,
lex_full_input_cpp_breaks,
F4_MD_PosContext,
F4_MD_Highlight,
Lex_State_Cpp);
}
}
}
#endif //FCODER_FLEURY_LANG_LIST_H