ccls/src/language.h
Fangrui Song 86efddf032 README
2018-05-05 15:25:43 -07:00

15 lines
465 B
C++

#pragma once
#include "serializer.h"
#include <string_view>
// 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);
LanguageId SourceFileLanguage(std::string_view path);
const char* LanguageIdentifier(LanguageId lang);