Update libdparse to v0.10.x
This commit is contained in:
parent
fd1f2f5161
commit
7b8211b282
2
dub.json
2
dub.json
|
@ -4,7 +4,7 @@
|
||||||
"targetType": "autodetect",
|
"targetType": "autodetect",
|
||||||
"license": "BSL-1.0",
|
"license": "BSL-1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"libdparse": "~>0.9.10"
|
"libdparse": "~>0.10.7"
|
||||||
},
|
},
|
||||||
"targetPath" : "bin/",
|
"targetPath" : "bin/",
|
||||||
"targetName" : "dfmt",
|
"targetName" : "dfmt",
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit f8460d0d3581bebd41ee8629bd3e253c94c8a387
|
Subproject commit 15c8d2ef166b633825e971eb914d4d78eb33b3ac
|
|
@ -214,9 +214,9 @@ final class FormatVisitor : ASTVisitor
|
||||||
|
|
||||||
override void visit(const FunctionLiteralExpression funcLit)
|
override void visit(const FunctionLiteralExpression funcLit)
|
||||||
{
|
{
|
||||||
if (funcLit.functionBody !is null)
|
if (funcLit.specifiedFunctionBody !is null)
|
||||||
{
|
{
|
||||||
const bs = funcLit.functionBody.blockStatement;
|
const bs = funcLit.specifiedFunctionBody.blockStatement;
|
||||||
|
|
||||||
astInformation.funLitStartLocations ~= bs.startLocation;
|
astInformation.funLitStartLocations ~= bs.startLocation;
|
||||||
astInformation.funLitEndLocations ~= bs.endLocation;
|
astInformation.funLitEndLocations ~= bs.endLocation;
|
||||||
|
@ -244,15 +244,11 @@ final class FormatVisitor : ASTVisitor
|
||||||
caseRangeStatement.accept(this);
|
caseRangeStatement.accept(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
override void visit(const FunctionBody functionBody)
|
override void visit(const SpecifiedFunctionBody specifiedFunctionBody)
|
||||||
{
|
{
|
||||||
if (functionBody.blockStatement !is null)
|
if (specifiedFunctionBody.blockStatement !is null)
|
||||||
astInformation.doubleNewlineLocations ~= functionBody.blockStatement.endLocation;
|
astInformation.doubleNewlineLocations ~= specifiedFunctionBody.blockStatement.endLocation;
|
||||||
if (functionBody.bodyStatement !is null && functionBody.bodyStatement
|
specifiedFunctionBody.accept(this);
|
||||||
.blockStatement !is null)
|
|
||||||
astInformation.doubleNewlineLocations
|
|
||||||
~= functionBody.bodyStatement.blockStatement.endLocation;
|
|
||||||
functionBody.accept(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void visit(const StructInitializer structInitializer)
|
override void visit(const StructInitializer structInitializer)
|
||||||
|
@ -367,12 +363,24 @@ final class FormatVisitor : ASTVisitor
|
||||||
storageClass.accept(this);
|
storageClass.accept(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override void visit(const InContractExpression inContractExpression)
|
||||||
|
{
|
||||||
|
astInformation.contractLocations ~= inContractExpression.inTokenLocation;
|
||||||
|
inContractExpression.accept(this);
|
||||||
|
}
|
||||||
|
|
||||||
override void visit(const InStatement inStatement)
|
override void visit(const InStatement inStatement)
|
||||||
{
|
{
|
||||||
astInformation.contractLocations ~= inStatement.inTokenLocation;
|
astInformation.contractLocations ~= inStatement.inTokenLocation;
|
||||||
inStatement.accept(this);
|
inStatement.accept(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override void visit(const OutContractExpression outContractExpression)
|
||||||
|
{
|
||||||
|
astInformation.contractLocations ~= outContractExpression.outTokenLocation;
|
||||||
|
outContractExpression.accept(this);
|
||||||
|
}
|
||||||
|
|
||||||
override void visit(const OutStatement outStatement)
|
override void visit(const OutStatement outStatement)
|
||||||
{
|
{
|
||||||
astInformation.contractLocations ~= outStatement.outTokenLocation;
|
astInformation.contractLocations ~= outStatement.outTokenLocation;
|
||||||
|
|
Loading…
Reference in New Issue