update dependencies and adapt to TypeIdentifierPart & DeclaratorIdentList

This commit is contained in:
Basile Burg 2018-01-29 12:31:33 +01:00
parent a3d2d8453b
commit 10bf4725c0
13 changed files with 31 additions and 31 deletions

@ -1 +1 @@
Subproject commit 2892cfc1e7a205d4f81af3970cbb53e4f365a765
Subproject commit f58dd7bf160f76762a79029a6bda7637d5a788e7

@ -1 +1 @@
Subproject commit 6920a0489fbef44f105cdfb76d426a03ae14259a
Subproject commit 89f6ee88bf8d0fc0df232cba56bf797f5b3b0487

View File

@ -12,10 +12,10 @@
"StdLoggerDisableWarning"
],
"dependencies" : {
"libdparse" : "~>0.7.2-alpha.5",
"dsymbol" : "~>0.2.6",
"libdparse" : "~>0.8.0-alpha.1",
"dsymbol" : "~>0.3.0-alpha.1",
"inifiled" : ">=1.0.2",
"emsi_containers" : "~>0.5.3",
"emsi_containers" : "~>0.6.0",
"libddoc" : "~>0.2.0"
},
"targetPath" : "bin"

@ -1 +1 @@
Subproject commit 35f8d2d914560f8c73cf5e6b80b8e0f47f498d64
Subproject commit b79a61bc22179c52abbb7554c630b100963b2d1c

@ -1 +1 @@
Subproject commit 65d07af1111b1da8b1541ba8b5f486e44c9efb88
Subproject commit 015abf8af982fea3d1741934adb82bf5faa04f03

View File

@ -23,12 +23,12 @@ class AliasSyntaxCheck : BaseAnalyzer
override void visit(const AliasDeclaration ad)
{
if (ad.identifierList is null)
if (ad.declaratorIdentifierList is null)
return;
assert(ad.identifierList.identifiers.length > 0,
assert(ad.declaratorIdentifierList.identifiers.length > 0,
"Identifier list length is zero, libdparse has a bug");
addErrorMessage(ad.identifierList.identifiers[0].line,
ad.identifierList.identifiers[0].column, KEY,
addErrorMessage(ad.declaratorIdentifierList.identifiers[0].line,
ad.declaratorIdentifierList.identifiers[0].column, KEY,
"Prefer the new \"'alias' identifier '=' type ';'\" syntax"
~ " to the old \"'alias' type identifier ';'\" syntax.");
}

View File

@ -63,12 +63,11 @@ class PokemonExceptionCheck : BaseAnalyzer
return;
}
if (type2.symbol.identifierOrTemplateChain.identifiersOrTemplateInstances.length != 1)
if (type2.typeIdentifierPart.typeIdentifierPart !is null)
{
return;
}
const identOrTemplate = type2.symbol.identifierOrTemplateChain
.identifiersOrTemplateInstances[0];
const identOrTemplate = type2.typeIdentifierPart.identifierOrTemplateInstance;
if (identOrTemplate.templateInstance !is null)
{
return;

View File

@ -276,10 +276,10 @@ class UnusedVariableCheck : BaseAnalyzer
override void visit(const Type2 tp)
{
if (tp.symbol && tp.symbol.identifierOrTemplateChain &&
tp.symbol.identifierOrTemplateChain.identifiersOrTemplateInstances)
if (tp.typeIdentifierPart && tp.typeIdentifierPart &&
tp.typeIdentifierPart.identifierOrTemplateInstance)
{
const IdentifierOrTemplateInstance idt = tp.symbol.identifierOrTemplateChain.identifiersOrTemplateInstances[0];
const IdentifierOrTemplateInstance idt = tp.typeIdentifierPart.identifierOrTemplateInstance;
if (idt.identifier != tok!"")
variableUsed(idt.identifier.text);
else if (idt.templateInstance)

View File

@ -171,11 +171,11 @@ public:
bool isStr, isSzInt;
Token customType;
if (decl.type.type2.symbol && decl.type.type2.symbol.identifierOrTemplateChain &&
decl.type.type2.symbol.identifierOrTemplateChain.identifiersOrTemplateInstances.length == 1)
if (decl.type.type2.typeIdentifierPart && decl.type.type2.typeIdentifierPart &&
decl.type.type2.typeIdentifierPart.typeIdentifierPart is null)
{
const IdentifierOrTemplateInstance idt =
decl.type.type2.symbol.identifierOrTemplateChain.identifiersOrTemplateInstances[0];
decl.type.type2.typeIdentifierPart.identifierOrTemplateInstance;
customType = idt.identifier;
isStr = customType.text.among("string", "wstring", "dstring") != 0;

View File

@ -605,10 +605,10 @@ class XMLPrinter : ASTVisitor
if (linkageAttribute.hasPlusPlus)
{
output.write("<linkageAttribute linkage=\"C++\"");
if (linkageAttribute.identifierChain !is null && linkageAttribute.identifierChain.identifiers.length > 0)
if (linkageAttribute.typeIdentifierPart !is null && linkageAttribute.typeIdentifierPart.typeIdentifierPart !is null)
{
output.write(" namespace=\"");
format(output.lockingTextWriter, linkageAttribute.identifierChain);
format(output.lockingTextWriter, linkageAttribute.typeIdentifierPart);
output.writeln("\"/>");
}
else if (linkageAttribute.classOrStruct == tok!"class")
@ -894,8 +894,8 @@ class XMLPrinter : ASTVisitor
if (type2.builtinType != tok!"")
{
output.writeln("<type2>", str(type2.builtinType), "</type2>");
if (type2.identifierOrTemplateChain !is null)
visit(type2.identifierOrTemplateChain);
if (type2.typeIdentifierPart !is null)
visit(type2.typeIdentifierPart);
}
else
{
@ -1077,6 +1077,7 @@ class XMLPrinter : ASTVisitor
override void visit(const Declaration declaration) { mixin (tagAndAccept!"declaration"); }
override void visit(const DeclarationOrStatement declarationOrStatement) { mixin (tagAndAccept!"declarationOrStatement"); }
override void visit(const DeclarationsAndStatements declarationsAndStatements) { mixin (tagAndAccept!"declarationsAndStatements"); }
override void visit(const DeclaratorIdentifierList declaratorIdentifierList) { mixin (tagAndAccept!"declaratorIdentifierList"); }
override void visit(const DefaultStatement defaultStatement) { mixin (tagAndAccept!"defaultStatement"); }
override void visit(const DeleteExpression deleteExpression) { mixin (tagAndAccept!"deleteExpression"); }
override void visit(const DeleteStatement deleteStatement) { mixin (tagAndAccept!"deleteStatement"); }
@ -1092,7 +1093,6 @@ class XMLPrinter : ASTVisitor
override void visit(const FunctionBody functionBody) { mixin (tagAndAccept!"functionBody"); }
override void visit(const FunctionCallExpression functionCallExpression) { mixin (tagAndAccept!"functionCallExpression"); }
override void visit(const IdentifierChain identifierChain) { mixin (tagAndAccept!"identifierChain"); }
override void visit(const IdentifierList identifierList) { mixin (tagAndAccept!"identifierList"); }
override void visit(const IdentifierOrTemplateChain identifierOrTemplateChain) { mixin (tagAndAccept!"identifierOrTemplateChain"); }
override void visit(const IdentifierOrTemplateInstance identifierOrTemplateInstance) { mixin (tagAndAccept!"identifierOrTemplateInstance"); }
override void visit(const ImportBindings importBindings) { mixin (tagAndAccept!"importBindings"); }
@ -1148,6 +1148,7 @@ class XMLPrinter : ASTVisitor
override void visit(const TemplateValueParameterDefault templateValueParameterDefault) { mixin (tagAndAccept!"templateValueParameterDefault"); }
override void visit(const TemplateValueParameter templateValueParameter) { mixin (tagAndAccept!"templateValueParameter"); }
override void visit(const TernaryExpression ternaryExpression) { mixin (tagAndAccept!"ternaryExpression"); }
override void visit(const TypeIdentifierPart typeIdentifierPart) { mixin (tagAndAccept!"typeIdentifierPart"); }
override void visit(const ThrowStatement throwStatement) { mixin (tagAndAccept!"throwStatement"); }
override void visit(const TryStatement tryStatement) { mixin (tagAndAccept!"tryStatement"); } override void visit(const TemplateInstance templateInstance) { mixin (tagAndAccept!"templateInstance"); }
override void visit(const TypeofExpression typeofExpression) { mixin (tagAndAccept!"typeofExpression"); } override void visit(const TypeSpecialization typeSpecialization) { mixin (tagAndAccept!"typeSpecialization"); } override void visit(const TraitsExpression traitsExpression) { mixin (tagAndAccept!"traitsExpression"); }

View File

@ -322,9 +322,9 @@ final class CTagsPrinter : ASTVisitor
override void visit(const AliasDeclaration dec)
{
// Old style alias
if (dec.identifierList)
if (dec.declaratorIdentifierList)
{
foreach (i; dec.identifierList.identifiers)
foreach (i; dec.declaratorIdentifierList.identifiers)
{
tagLines.insert("%s\t%s\t%d;\"\ta\tline:%d%s%s\n".format(i.text,
fileName, i.line, i.line, context.c, context.access));

View File

@ -245,9 +245,9 @@ final class EtagsPrinter : ASTVisitor
override void visit(const AliasDeclaration dec)
{
// Old style alias
if (dec.identifierList)
if (dec.declaratorIdentifierList)
{
foreach (i; dec.identifierList.identifiers)
foreach (i; dec.declaratorIdentifierList.identifiers)
maketag(i);
}
dec.accept(this);

View File

@ -95,9 +95,9 @@ class FinderVisitor : ASTVisitor
override void visit(const AliasDeclaration dec)
{
if (dec.identifierList !is null)
if (dec.declaratorIdentifierList !is null)
{
foreach (ident; dec.identifierList.identifiers)
foreach (ident; dec.declaratorIdentifierList.identifiers)
{
if (ident.text == symbolName)
output(fileName, ident.line, ident.column);