ccls/src/language.h

15 lines
465 B
C
Raw Normal View History

2018-02-20 03:06:48 +00:00
#pragma once
#include "serializer.h"
2018-05-05 03:40:52 +00:00
#include <string_view>
2018-02-20 03:06:48 +00:00
// Used to identify the language at a file level. The ordering is important, as
// a file previously identified as `C`, will be changed to `Cpp` if it
// encounters a c++ declaration.
enum class LanguageId { Unknown = 0, C = 1, Cpp = 2, ObjC = 3, ObjCpp = 4 };
MAKE_REFLECT_TYPE_PROXY(LanguageId);
2018-05-05 03:40:52 +00:00
LanguageId SourceFileLanguage(std::string_view path);
const char* LanguageIdentifier(LanguageId lang);