Use scope instead of std.typecons.scoped
This commit is contained in:
parent
02acaa534b
commit
5aba1b1b54
|
@ -213,7 +213,7 @@ AutocompleteResponse dotCompletion(T)(T beforeTokens, const(Token)[] tokenArray,
|
||||||
mixin(TYPE_IDENT_CASES);
|
mixin(TYPE_IDENT_CASES);
|
||||||
case tok!")":
|
case tok!")":
|
||||||
case tok!"]":
|
case tok!"]":
|
||||||
auto allocator = scoped!(ASTAllocator)();
|
scope allocator = new ASTAllocator();
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||||
&rba, cursorPosition, moduleCache);
|
&rba, cursorPosition, moduleCache);
|
||||||
|
@ -229,7 +229,7 @@ AutocompleteResponse dotCompletion(T)(T beforeTokens, const(Token)[] tokenArray,
|
||||||
case tok!";":
|
case tok!";":
|
||||||
case tok!"}":
|
case tok!"}":
|
||||||
case tok!",":
|
case tok!",":
|
||||||
auto allocator = scoped!(ASTAllocator)();
|
scope allocator = new ASTAllocator();
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||||
&rba, 1, moduleCache);
|
&rba, 1, moduleCache);
|
||||||
|
@ -302,7 +302,7 @@ AutocompleteResponse parenCompletion(T)(T beforeTokens,
|
||||||
case tok!")":
|
case tok!")":
|
||||||
case tok!"]":
|
case tok!"]":
|
||||||
mixin(STRING_LITERAL_CASES);
|
mixin(STRING_LITERAL_CASES);
|
||||||
auto allocator = scoped!(ASTAllocator)();
|
scope allocator = new ASTAllocator();
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||||
&rba, cursorPosition, moduleCache);
|
&rba, cursorPosition, moduleCache);
|
||||||
|
|
|
@ -45,7 +45,7 @@ public AutocompleteResponse getDoc(const AutocompleteRequest request,
|
||||||
// trace("Getting doc comments");
|
// trace("Getting doc comments");
|
||||||
AutocompleteResponse response;
|
AutocompleteResponse response;
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
auto allocator = scoped!(ASTAllocator)();
|
scope allocator = new ASTAllocator();
|
||||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||||
SymbolStuff stuff = getSymbolsForCompletion(request, CompletionType.ddoc,
|
SymbolStuff stuff = getSymbolsForCompletion(request, CompletionType.ddoc,
|
||||||
allocator, &rba, cache, moduleCache);
|
allocator, &rba, cache, moduleCache);
|
||||||
|
|
|
@ -45,7 +45,7 @@ public AutocompleteResponse findLocalUse(AutocompleteRequest request,
|
||||||
{
|
{
|
||||||
AutocompleteResponse response;
|
AutocompleteResponse response;
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
auto allocator = scoped!(ASTAllocator)();
|
scope allocator = new ASTAllocator();
|
||||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||||
|
|
||||||
// patchs the original request for the subsequent requests
|
// patchs the original request for the subsequent requests
|
||||||
|
|
|
@ -47,7 +47,7 @@ public AutocompleteResponse findDeclaration(const AutocompleteRequest request,
|
||||||
{
|
{
|
||||||
AutocompleteResponse response;
|
AutocompleteResponse response;
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
auto allocator = scoped!(ASTAllocator)();
|
scope allocator = new ASTAllocator();
|
||||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||||
SymbolStuff stuff = getSymbolsForCompletion(request,
|
SymbolStuff stuff = getSymbolsForCompletion(request,
|
||||||
CompletionType.location, allocator, &rba, cache, moduleCache);
|
CompletionType.location, allocator, &rba, cache, moduleCache);
|
||||||
|
@ -75,7 +75,7 @@ public AutocompleteResponse symbolSearch(const AutocompleteRequest request,
|
||||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||||
const(Token)[] tokenArray = getTokensForParser(cast(ubyte[]) request.sourceCode,
|
const(Token)[] tokenArray = getTokensForParser(cast(ubyte[]) request.sourceCode,
|
||||||
config, &cache);
|
config, &cache);
|
||||||
auto allocator = scoped!(ASTAllocator)();
|
scope allocator = new ASTAllocator();
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||||
&rba, request.cursorPosition, moduleCache);
|
&rba, request.cursorPosition, moduleCache);
|
||||||
|
|
Loading…
Reference in New Issue