2018-08-21 05:27:52 +00:00
|
|
|
// Copyright 2017-2018 ccls Authors
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
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.
|
2018-09-02 21:51:25 +00:00
|
|
|
enum class LanguageId { Unknown = -1, C = 0, Cpp = 1, ObjC = 2, ObjCpp = 3 };
|
2018-02-20 03:06:48 +00:00
|
|
|
MAKE_REFLECT_TYPE_PROXY(LanguageId);
|
2018-05-05 03:40:52 +00:00
|
|
|
|
|
|
|
LanguageId SourceFileLanguage(std::string_view path);
|
2018-08-09 17:08:14 +00:00
|
|
|
const char *LanguageIdentifier(LanguageId lang);
|