Skip to content

Commit f6a93c8

Browse files
committed
First ILSpy 6 Version
1 parent 56b91b7 commit f6a93c8

5 files changed

+52
-43
lines changed

ILSpy.XSharpLanguage/ILSpy.XSharpLanguage.xsproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@
7474
<Private>True</Private>
7575
<HintPath>..\ILSpy6\ILSpy.exe</HintPath>
7676
</Reference>
77-
<Reference Include="Microsoft.VisualStudio.Composition, Version=15.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
77+
<Reference Include="Microsoft.VisualStudio.Composition, Version=16.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
7878
<Name>Microsoft.VisualStudio.Composition</Name>
7979
<AssemblyName>Microsoft.VisualStudio.Composition.dll</AssemblyName>
8080
<SpecificVersion>False</SpecificVersion>
8181
<Private>True</Private>
82-
<HintPath>..\packages\Microsoft.VisualStudio.Composition.15.5.23\lib\net45\Microsoft.VisualStudio.Composition.dll</HintPath>
82+
<HintPath>..\ILSpy6\Microsoft.VisualStudio.Composition.dll</HintPath>
8383
</Reference>
8484
<Reference Include="Microsoft.VisualStudio.Validation, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
8585
<Name>Microsoft.VisualStudio.Validation</Name>
@@ -157,19 +157,19 @@
157157
<Reference Include="System.Core" />
158158
<Reference Include="System.Data" />
159159
<Reference Include="System.Data.DataSetExtensions" />
160-
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
160+
<Reference Include="System.Reflection.Metadata, Version=1.4.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
161161
<Name>System.Reflection.Metadata</Name>
162162
<AssemblyName>System.Reflection.Metadata.dll</AssemblyName>
163163
<SpecificVersion>False</SpecificVersion>
164164
<Private>True</Private>
165-
<HintPath>..\ILSpy4\System.Reflection.Metadata.dll</HintPath>
165+
<HintPath>..\ILSpy6\System.Reflection.Metadata.dll</HintPath>
166166
</Reference>
167-
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
167+
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
168168
<Name>System.Threading.Tasks.Dataflow</Name>
169169
<AssemblyName>System.Threading.Tasks.Dataflow.dll</AssemblyName>
170170
<SpecificVersion>False</SpecificVersion>
171171
<Private>True</Private>
172-
<HintPath>..\packages\System.Threading.Tasks.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll</HintPath>
172+
<HintPath>..\ILSpy6\System.Threading.Tasks.Dataflow.dll</HintPath>
173173
</Reference>
174174
<Reference Include="System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
175175
<Name>System.Xaml</Name>

ILSpy.XSharpLanguage/XSharpHighlightingTokenWriter.prg

+3-3
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
550550
SELF:textOutput:EndSpan()
551551
ENDIF
552552

553-
VIRTUAL METHOD WritePrimitiveValue(VALUE AS OBJECT, literalValue := NULL AS STRING) AS VOID
553+
VIRTUAL METHOD WritePrimitiveValue(VALUE AS OBJECT, format := LiteralFormat.None AS LiteralFormat ) AS VOID
554554
LOCAL color AS HighlightingColor
555555
//
556556
color := NULL
@@ -568,9 +568,9 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
568568
ENDIF
569569
// Indicate to XSharp to keep the String as it is
570570
IF ( VALUE IS STRING )
571-
SUPER:WritePrimitiveValue( NULL, "e" )
571+
SUPER:WritePrimitiveValue( "e" )
572572
ENDIF
573-
SUPER:WritePrimitiveValue(VALUE, literalValue)
573+
SUPER:WritePrimitiveValue(VALUE )
574574
IF (color != NULL)
575575
//
576576
SELF:textOutput:EndSpan()

ILSpy.XSharpLanguage/XSharpLanguage.prg

+2-4
Original file line numberDiff line numberDiff line change
@@ -481,14 +481,12 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
481481

482482
CLASS XSharpWholeProjectDecompiler INHERIT WholeProjectDecompiler
483483
PRIVATE INITONLY assembly AS LoadedAssembly
484-
485484
PRIVATE INITONLY options AS DecompilationOptions
486485

487486
PUBLIC CONSTRUCTOR(assembly AS LoadedAssembly , options AS DecompilationOptions )
487+
SUPER(options:DecompilerSettings, assembly:GetAssemblyResolver(), assembly:GetDebugInfoOrNull() )
488488
SELF:assembly := assembly
489489
SELF:options := options
490-
SUPER:Settings := options:DecompilerSettings
491-
SUPER:AssemblyResolver := assembly:GetAssemblyResolver()
492490

493491

494492
PROTECTED OVERRIDE METHOD WriteResourceToFile(fileName AS STRING , resourceName AS STRING , entryStream AS Stream ) AS IEnumerable<ValueTuple<STRING, STRING>>
@@ -498,7 +496,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
498496
entryStream:Position := 0L
499497
fileName := Path.Combine(targetDirectory, fileName)
500498
fileName := exportedValue:WriteResourceToFile(SELF:assembly, fileName, entryStream, SELF:options)
501-
RETURN ValueTuple<STRING, STRING>{ ValueTuple.Create(exportedValue:EntryType, fileName) }
499+
RETURN <ValueTuple<STRING, STRING>>{ ValueTuple.Create<STRING, STRING>(exportedValue:EntryType, fileName) }
502500
ENDIF
503501
NEXT
504502
RETURN SUPER:WriteResourceToFile(fileName, resourceName, entryStream)

ILSpy.XSharpLanguage/XSharpLocalVisitor.prg

+6-2
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
286286
VIRTUAL METHOD VisitParameterDeclaration(parameterDeclaration AS ParameterDeclaration) AS VOID
287287

288288
VIRTUAL METHOD VisitParenthesizedExpression(parenthesizedExpression AS ParenthesizedExpression) AS VOID
289+
290+
VIRTUAL METHOD VisitParenthesizedVariableDesignation( parenthesizedVariableDesignation AS ParenthesizedVariableDesignation ) AS VOID
289291

290292
VIRTUAL METHOD VisitPatternPlaceholder(placeholder AS AstNode, pattern AS Pattern) AS VOID
291293

@@ -325,20 +327,22 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
325327

326328
VIRTUAL METHOD VisitSimpleType(simpleType AS SimpleType) AS VOID //
327329
SELF:WriteIdentifier(simpleType:IdentifierToken)
330+
331+
VIRTUAL METHOD VisitSingleVariableDesignation( singleVariableDesignation AS SingleVariableDesignation ) AS VOID
328332

329333
VIRTUAL METHOD VisitSizeOfExpression(sizeOfExpression AS SizeOfExpression) AS VOID
330334

331335
VIRTUAL METHOD VisitStackAllocExpression(stackAllocExpression AS StackAllocExpression) AS VOID
332336

333337
VIRTUAL METHOD VisitSwitchExpression( switchExpression AS SwitchExpression ) AS VOID
334338
switchExpression:Expression:AcceptVisitor(SELF)
335-
FOREACH node AS AstNode IN switchExpression.SwitchSections
339+
FOREACH node AS AstNode IN switchExpression:SwitchSections
336340
node.AcceptVisitor(SELF)
337341
NEXT
338342

339343
VIRTUAL METHOD VisitSwitchExpressionSection( switchExpressionSection AS SwitchExpressionSection) AS VOID
340344
switchExpressionSection:Pattern:AcceptVisitor(SELF)
341-
switchExpressionSection.Body:AcceptVisitor(SELF)
345+
switchExpressionSection:Body:AcceptVisitor(SELF)
342346

343347
VIRTUAL METHOD VisitSwitchSection(switchSection AS SwitchSection) AS VOID
344348
FOREACH statement AS Statement IN switchSection:Statements

ILSpy.XSharpLanguage/XSharpOutputVisitor.prg

+35-28
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
314314
LOCAL i AS LONG
315315
//
316316
nextSibling := node:NextSibling
317-
WHILE (((nextSibling IS WhitespaceNode) .OR. (nextSibling IS NewLineNode)))
318-
//
319-
nextSibling := nextSibling:NextSibling
320-
ENDDO
317+
// WHILE (((nextSibling IS WhitespaceNode) .OR. (nextSibling IS NewLineNode)))
318+
// //
319+
// nextSibling := nextSibling:NextSibling
320+
// ENDDO
321321
IF (((node IS UsingDeclaration) .OR. (node IS UsingAliasDeclaration)) .AND. (! (nextSibling IS UsingDeclaration) .AND. ! (nextSibling IS UsingAliasDeclaration)))
322322
//
323323
i := 0
@@ -1337,7 +1337,8 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
13371337
SELF:StartNode(foreachStatement)
13381338
SELF:WriteKeyword("FOREACH")
13391339
SELF:Space()
1340-
SELF:WriteIdentifier(foreachStatement:VariableNameToken)
1340+
//SELF:WriteIdentifier(foreachStatement:VariableNameToken)
1341+
foreachStatement:VariableDesignation:AcceptVisitor(SELF)
13411342
SELF:Space()
13421343
SELF:WriteKeyword("AS")
13431344
SELF:Space()
@@ -1407,7 +1408,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
14071408
ENDIF
14081409
//SELF:WriteToken(Roles.LChevron)
14091410
SELF:WriteCommaSeparatedList(;
1410-
functionPointerType:Parameters:Concat<AstNode>(NEW[] { functionPointerType.ReturnType }))
1411+
functionPointerType:Parameters:Concat<AstNode>(<AstNode>{ functionPointerType:ReturnType }))
14111412
//SELF:WriteToken(Roles.RChevron)
14121413
SELF:EndNode(functionPointerType)
14131414

@@ -1554,7 +1555,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
15541555
VIRTUAL METHOD VisitInterpolatedStringText(interpolatedStringText AS InterpolatedStringText) AS VOID
15551556
//
15561557
SELF:StartNode(interpolatedStringText)
1557-
SELF:writer:WritePrimitiveValue("", TextWriterTokenWriter.ConvertString(interpolatedStringText:Text))
1558+
SELF:writer:WritePrimitiveValue(TextWriterTokenWriter.ConvertString(interpolatedStringText:Text))
15581559
SELF:EndNode(interpolatedStringText)
15591560

15601561
VIRTUAL METHOD VisitInterpolation(interpolation AS Interpolation) AS VOID
@@ -1565,7 +1566,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
15651566
IF (interpolation:Suffix != NULL)
15661567
//
15671568
SELF:writer:WriteToken(NULL, ":")
1568-
SELF:writer:WritePrimitiveValue("", interpolation:Suffix)
1569+
SELF:writer:WritePrimitiveValue( interpolation:Suffix)
15691570
ENDIF
15701571
SELF:writer:WriteToken(Interpolation.RBrace, "}")
15711572
SELF:EndNode(interpolation)
@@ -1654,17 +1655,18 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
16541655

16551656
VIRTUAL METHOD VisitLocalFunctionDeclarationStatement(localFunctionDeclarationStatement AS LocalFunctionDeclarationStatement ) AS VOID
16561657
SELF:StartNode(localFunctionDeclarationStatement)
1657-
SELF:WriteModifiers(localFunctionDeclarationStatement:ModifierTokens)
1658-
localFunctionDeclarationStatement:ReturnType:AcceptVisitor(SELF)
1659-
SELF:Space()
1660-
SELF:WriteIdentifier(localFunctionDeclarationStatement:NameToken)
1661-
SELF:WriteTypeParameters(localFunctionDeclarationStatement:TypeParameters)
1662-
SELF:Space(SELF:policy:SpaceBeforeMethodDeclarationParentheses)
1663-
SELF:WriteCommaSeparatedListInParenthesis(localFunctionDeclarationStatement:Parameters, SELF:policy:SpaceWithinMethodDeclarationParentheses)
1664-
FOREACH constraint AS Constraint IN localFunctionDeclarationStatement:Constraints
1665-
constraint:AcceptVisitor(SELF)
1666-
NEXT
1667-
SELF:WriteMethodBody(localFunctionDeclarationStatement:Body, SELF:policy:MethodBraceStyle)
1658+
// SELF:WriteModifiers(localFunctionDeclarationStatement:ModifierTokens)
1659+
// localFunctionDeclarationStatement:ReturnType:AcceptVisitor(SELF)
1660+
// SELF:Space()
1661+
// SELF:WriteIdentifier(localFunctionDeclarationStatement:NameToken)
1662+
// SELF:WriteTypeParameters(localFunctionDeclarationStatement:TypeParameters)
1663+
// SELF:Space(SELF:policy:SpaceBeforeMethodDeclarationParentheses)
1664+
// SELF:WriteCommaSeparatedListInParenthesis(localFunctionDeclarationStatement:Parameters, SELF:policy:SpaceWithinMethodDeclarationParentheses)
1665+
// FOREACH constraint AS Constraint IN localFunctionDeclarationStatement:Constraints
1666+
// constraint:AcceptVisitor(SELF)
1667+
// NEXT
1668+
// SELF:WriteMethodBody(localFunctionDeclarationStatement:Body, SELF:policy:MethodBraceStyle)
1669+
localFunctionDeclarationStatement:Declaration:AcceptVisitor(SELF)
16681670
SELF:EndNode(localFunctionDeclarationStatement)
16691671

16701672

@@ -1860,7 +1862,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
18601862
VIRTUAL METHOD VisitNullReferenceExpression(nullReferenceExpression AS NullReferenceExpression) AS VOID
18611863
//
18621864
SELF:StartNode(nullReferenceExpression)
1863-
SELF:writer:WritePrimitiveValue(NULL, NULL)
1865+
SELF:writer:WritePrimitiveValue(NULL)
18641866
SELF:isAfterSpace := FALSE
18651867
SELF:EndNode(nullReferenceExpression)
18661868

@@ -2014,6 +2016,8 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
20142016
SELF:Space(SELF:policy:SpacesWithinParentheses)
20152017
SELF:RPar()
20162018
SELF:EndNode(parenthesizedExpression)
2019+
2020+
VIRTUAL METHOD VisitParenthesizedVariableDesignation( parenthesizedVariableDesignation AS ParenthesizedVariableDesignation ) AS VOID
20172021

20182022
VIRTUAL METHOD VisitPatternPlaceholder(placeholder AS AstNode, pattern AS Pattern) AS VOID
20192023
//
@@ -2039,12 +2043,13 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
20392043
VIRTUAL METHOD VisitPrimitiveExpression(primitiveExpression AS PrimitiveExpression) AS VOID
20402044
//
20412045
SELF:StartNode(primitiveExpression)
2042-
SELF:writer:WritePrimitiveValue(primitiveExpression:Value, primitiveExpression:UnsafeLiteralValue)
2043-
// Store Parameters Name
2044-
IF ( SELF:inMethodAttributes == ClipperState.Attribute) .AND. SELF:isClipper
2045-
SELF:paramsList:Add( primitiveExpression:Value:ToString() )
2046-
ENDIF
2047-
//
2046+
// SELF:writer:WritePrimitiveValue(primitiveExpression:Value, primitiveExpression:UnsafeLiteralValue)
2047+
// // Store Parameters Name
2048+
// IF ( SELF:inMethodAttributes == ClipperState.Attribute) .AND. SELF:isClipper
2049+
// SELF:paramsList:Add( primitiveExpression:Value:ToString() )
2050+
// ENDIF
2051+
// //
2052+
SELF:writer:WritePrimitiveValue(primitiveExpression:Value, primitiveExpression:Format )
20482053
SELF:isAfterSpace := FALSE
20492054
SELF:EndNode(primitiveExpression)
20502055

@@ -2347,6 +2352,8 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
23472352
ENDIF
23482353
SELF:WriteTypeArguments(simpleType:TypeArguments)
23492354
SELF:EndNode(simpleType)
2355+
2356+
VIRTUAL METHOD VisitSingleVariableDesignation( singleVariableDesignation AS SingleVariableDesignation ) AS VOID
23502357

23512358
VIRTUAL METHOD VisitSizeOfExpression(sizeOfExpression AS SizeOfExpression) AS VOID
23522359
//
@@ -2374,7 +2381,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
23742381
switchExpression:Expression:AcceptVisitor(SELF)
23752382
SELF:Space()
23762383
SELF:WriteKeyword(SwitchExpression.SwitchKeywordRole)
2377-
FOREACH node AS AstNode IN switchExpression.SwitchSections
2384+
FOREACH node AS AstNode IN switchExpression:SwitchSections
23782385
node.AcceptVisitor(SELF)
23792386
SELF:Comma(node)
23802387
SELF:NewLine()
@@ -2387,7 +2394,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
23872394
SELF:Space()
23882395
SELF:WriteToken(Roles.Arrow)
23892396
SELF:Space()
2390-
switchExpressionSection.Body:AcceptVisitor(SELF)
2397+
switchExpressionSection:Body:AcceptVisitor(SELF)
23912398
SELF:EndNode(switchExpressionSection)
23922399

23932400
VIRTUAL METHOD VisitSwitchSection(switchSection AS SwitchSection) AS VOID

0 commit comments

Comments
 (0)