fix deprecations messages related to message function (#503)
* fix deprecations messages related to message function * update dsymbol as a git submodule too
This commit is contained in:
parent
0b064a000e
commit
7ee23b3d73
2
dsymbol
2
dsymbol
|
@ -1 +1 @@
|
|||
Subproject commit d22c9714a60ac05cb32db938e81a396cffb5ffa6
|
||||
Subproject commit 6920a0489fbef44f105cdfb76d426a03ae14259a
|
4
dub.json
4
dub.json
|
@ -12,8 +12,8 @@
|
|||
"StdLoggerDisableWarning"
|
||||
],
|
||||
"dependencies" : {
|
||||
"libdparse" : "~>0.7.1-beta.6",
|
||||
"dsymbol" : "~>0.2.0",
|
||||
"libdparse" : "~>0.7.1-beta.7",
|
||||
"dsymbol" : "~>0.2.6",
|
||||
"inifiled" : ">=1.0.2",
|
||||
"emsi_containers" : "~>0.5.3",
|
||||
"libddoc" : "~>0.2.0"
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 454a95abb2ac7093f1526f262d4a712730dd9ac3
|
||||
Subproject commit 4229f11828a901ea5379409015f14a033e742906
|
|
@ -11,6 +11,7 @@ import std.conv;
|
|||
import std.algorithm;
|
||||
import std.range;
|
||||
import std.array;
|
||||
import std.functional : toDelegate;
|
||||
import dparse.lexer;
|
||||
import dparse.parser;
|
||||
import dparse.ast;
|
||||
|
@ -202,8 +203,9 @@ const(Module) parseModule(string fileName, ubyte[] code, RollbackAllocator* p,
|
|||
tokens = getTokensForParser(code, config, &cache);
|
||||
if (linesOfCode !is null)
|
||||
(*linesOfCode) += count!(a => isLineOfCode(a.type))(tokens);
|
||||
return dparse.parser.parseModule(tokens, fileName, p, report
|
||||
? &messageFunctionJSON : &messageFunction, errorCount, warningCount);
|
||||
return dparse.parser.parseModule(tokens, fileName, p,
|
||||
report ? toDelegate(&messageFunctionJSON) : toDelegate(&messageFunction),
|
||||
errorCount, warningCount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,6 +17,7 @@ import std.conv;
|
|||
import std.typecons;
|
||||
import containers.ttree;
|
||||
import std.string;
|
||||
import std.functional : toDelegate;
|
||||
|
||||
/**
|
||||
* Prints CTAGS information to the given file.
|
||||
|
@ -65,7 +66,7 @@ void printCtags(File output, string[] fileNames)
|
|||
}
|
||||
|
||||
auto tokens = getTokensForParser(bytes, config, &cache);
|
||||
Module m = parseModule(tokens.array, fileName, &rba, &doNothing);
|
||||
Module m = parseModule(tokens.array, fileName, &rba, toDelegate(&doNothing));
|
||||
|
||||
auto printer = new CTagsPrinter(&tags);
|
||||
printer.fileName = fileName;
|
||||
|
|
|
@ -17,6 +17,7 @@ import std.path;
|
|||
import std.array;
|
||||
import std.conv;
|
||||
import std.string;
|
||||
import std.functional : toDelegate;
|
||||
|
||||
// Prefix tags with their module name. Seems like correct behavior, but just
|
||||
// in case, make it an option.
|
||||
|
@ -48,7 +49,7 @@ void printEtags(File output, bool tagAll, string[] fileNames)
|
|||
auto bytes = uninitializedArray!(ubyte[])(to!size_t(f.size));
|
||||
f.rawRead(bytes);
|
||||
auto tokens = getTokensForParser(bytes, config, &cache);
|
||||
Module m = parseModule(tokens.array, fileName, &rba, &doNothing);
|
||||
Module m = parseModule(tokens.array, fileName, &rba, toDelegate(&doNothing));
|
||||
|
||||
auto printer = new EtagsPrinter;
|
||||
printer.moduleName = m.moduleFullName(fileName);
|
||||
|
|
|
@ -11,6 +11,7 @@ import dparse.parser;
|
|||
import dparse.rollback_allocator;
|
||||
import std.stdio;
|
||||
import std.container.rbtree;
|
||||
import std.functional : toDelegate;
|
||||
import readers;
|
||||
|
||||
/**
|
||||
|
@ -63,7 +64,7 @@ private void visitFile(bool usingStdin, string fileName, RedBlackTree!string imp
|
|||
config.stringBehavior = StringBehavior.source;
|
||||
auto visitor = new ImportPrinter;
|
||||
auto tokens = getTokensForParser(usingStdin ? readStdin() : readFile(fileName), config, cache);
|
||||
auto mod = parseModule(tokens, fileName, &rba, &doNothing);
|
||||
auto mod = parseModule(tokens, fileName, &rba, toDelegate(&doNothing));
|
||||
visitor.visit(mod);
|
||||
importedModules.insert(visitor.imports[]);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import std.stdio;
|
|||
import std.range;
|
||||
import std.experimental.lexer;
|
||||
import std.typecons : scoped;
|
||||
import std.functional : toDelegate;
|
||||
import dparse.lexer;
|
||||
import dparse.parser;
|
||||
import dparse.rollback_allocator;
|
||||
|
@ -283,7 +284,7 @@ else
|
|||
config.stringBehavior = StringBehavior.source;
|
||||
auto tokens = getTokensForParser(usingStdin ? readStdin()
|
||||
: readFile(args[1]), config, &cache);
|
||||
auto mod = parseModule(tokens, fileName, &rba, &doNothing);
|
||||
auto mod = parseModule(tokens, fileName, &rba, toDelegate(&doNothing));
|
||||
|
||||
if (ast)
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ import dparse.ast;
|
|||
import dparse.rollback_allocator;
|
||||
import std.stdio;
|
||||
import std.file : isFile;
|
||||
import std.functional : toDelegate;
|
||||
|
||||
void findDeclarationOf(File output, string symbolName, string[] fileNames)
|
||||
{
|
||||
|
@ -31,7 +32,7 @@ void findDeclarationOf(File output, string symbolName, string[] fileNames)
|
|||
f.rawRead(bytes);
|
||||
auto tokens = getTokensForParser(bytes, config, &cache);
|
||||
RollbackAllocator rba;
|
||||
Module m = parseModule(tokens.array, fileName, &rba, &doNothing);
|
||||
Module m = parseModule(tokens.array, fileName, &rba, toDelegate(&doNothing));
|
||||
visitor.fileName = fileName;
|
||||
visitor.visit(m);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue