@b4n commented on this pull request.
LGTM, apart possibly the inline comments. Sad we have to do that in several functions, but makes sense.
- kindDefinition *def;
+ + if (lang == TM_PARSER_NONE) + return "unknown"; + + def = getLanguageKindForLetter(lang, kind);
Maybe something like this to avoid repeating the fallback value? ```suggestion kindDefinition *def = NULL;
if (lang != TM_PARSER_NONE) def = getLanguageKindForLetter(lang, kind); ```
- kindDefinition *def;
+ + if (lang == TM_PARSER_NONE) + return '-'; + + def = getLanguageKindForName(lang, name);
Ditto here, maybe:
```suggestion kindDefinition *def = NULL;
if (lang != TM_PARSER_NONE) def = getLanguageKindForName(lang, name); ```