dcd.server.autocomplete.util

This file is part of DCD, a development tool for the D programming language. Copyright (C) 2014 Brian Schott

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Members

Enums

ImportKind
enum ImportKind
Undocumented in source.

Functions

determineImportKind
ImportKind determineImportKind(T tokens)

Determines if an import is selective, whole-module, or neither.

getExpression
T getExpression(T beforeTokens)
getSymbolsByTokenChain
DSymbol*[] getSymbolsByTokenChain(Scope* completionScope, T tokens, size_t cursorPosition, CompletionType completionType)
getSymbolsForCompletion
SymbolStuff getSymbolsForCompletion(AutocompleteRequest request, CompletionType type, IAllocator allocator, RollbackAllocator* rba, StringCache cache, ModuleCache moduleCache)
getTokensBeforeCursor
auto getTokensBeforeCursor(const(ubyte[]) sourceCode, size_t cursorPosition, StringCache cache, const(Token)[] tokenArray)
goBackToOpenParen
size_t goBackToOpenParen(T beforeTokens)

Traverses a token slice in reverse to find the opening parentheses or square bracket that begins the block the last token is in.

isSliceExpression
bool isSliceExpression(T tokens, size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
isUdaExpression
bool isUdaExpression(T tokens)
Undocumented in source. Be warned that the author may not have intended to support it.
makeSymbolCompletionInfo
AutocompleteResponse.Completion makeSymbolCompletionInfo(DSymbol* symbol, char kind)
Undocumented in source. Be warned that the author may not have intended to support it.
shouldSwapWithType
bool shouldSwapWithType(CompletionType completionType, CompletionKind kind, size_t current, size_t max)
skipParen
void skipParen(T tokenSlice, size_t i, IdType open, IdType close)

Skips blocks of parentheses until the starting block has been closed

skipParenReverse
size_t skipParenReverse(T beforeTokens, size_t i, IdType open, IdType close)

Skips blocks of parentheses in reverse until the starting block has been opened

skipParenReverseBefore
size_t skipParenReverseBefore(T beforeTokens, size_t i, IdType open, IdType close)
Undocumented in source. Be warned that the author may not have intended to support it.
stringToken
istring stringToken(Token a)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

STRING_LITERAL_CASES
enum STRING_LITERAL_CASES;
Undocumented in source.
TYPE_IDENT_AND_LITERAL_CASES
enum TYPE_IDENT_AND_LITERAL_CASES;
Undocumented in source.
TYPE_IDENT_CASES
enum TYPE_IDENT_CASES;
Undocumented in source.

Structs

SymbolStuff
struct SymbolStuff
Undocumented in source.

Meta