mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 18:00:26 +00:00
20 lines
806 B
C
20 lines
806 B
C
|
#pragma once
|
||
|
|
||
|
#include "language_server_api.h"
|
||
|
|
||
|
#include <string>
|
||
|
|
||
|
|
||
|
// Utility method to map |position| to an offset inside of |content|.
|
||
|
int GetOffsetForPosition(lsPosition position, const std::string& content);
|
||
|
// Utility method to find a position for the given character.
|
||
|
lsPosition CharPos(const std::string& search, char character, int character_offset = 0);
|
||
|
|
||
|
bool ShouldRunIncludeCompletion(const std::string& line);
|
||
|
|
||
|
// TODO: eliminate |line_number| param.
|
||
|
optional<lsRange> ExtractQuotedRange(int line_number, const std::string& line);
|
||
|
|
||
|
void LexFunctionDeclaration(const std::string& buffer_content, lsPosition declaration_spelling, optional<std::string> type_name, std::string* insert_text, int* newlines_after_name);
|
||
|
|
||
|
std::string LexWordAroundPos(lsPosition position, const std::string& content);
|