@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?
⬇️ Suggested change- kindDefinition *def; - - if (lang == TM_PARSER_NONE) - return "unknown"; - - def = getLanguageKindForLetter(lang, kind); + 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:
⬇️ Suggested change- kindDefinition *def; - - if (lang == TM_PARSER_NONE) - return '-'; - - def = getLanguageKindForName(lang, name); + kindDefinition *def = NULL; + + if (lang != TM_PARSER_NONE) + def = getLanguageKindForName(lang, name);
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.