From 0a481a573c703443b9186a36acf846fee6ec636c Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 23 Dec 2015 16:55:58 +0100 Subject: [PATCH] Add AvalonEdit, NRefactory, and cecil submodules. --- .gitmodules | 9 +++++ AvalonEdit | 1 + ICSharpCode.Decompiler/Ast/AstBuilder.cs | 14 +++---- .../ICSharpCode.Decompiler.csproj | 2 +- .../ILAst/ILAstOptimizer.cs | 1 - ICSharpCode.Decompiler/ILAst/ILAstTypes.cs | 1 - ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs | 14 +++---- .../Tests/ICSharpCode.Decompiler.Tests.csproj | 2 +- ILSpy.AddIn/ILSpy.AddIn.csproj | 6 +-- .../ILSpy.BamlDecompiler.csproj | 2 +- .../Tests/ILSpy.BamlDecompiler.Tests.csproj | 2 +- ILSpy.sln | 38 +++++++++++------- ILSpy/ILSpy.csproj | 12 +++--- ILSpy/Properties/app.config.template | 6 +-- NRefactory | 1 + .../ICSharpCode.NRefactory.VB.Tests.csproj | 11 +++-- .../Lexer/LexerPositionTests.cs | 40 +++++++++---------- .../GlobalScope/ImportsStatementTests.cs | 2 +- .../ICSharpCode.NRefactory.VB.csproj | 8 ++-- TestPlugin/TestPlugin.csproj | 2 +- cecil | 1 + 21 files changed, 99 insertions(+), 76 deletions(-) create mode 100644 .gitmodules create mode 160000 AvalonEdit create mode 160000 NRefactory create mode 160000 cecil diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..1a78e6950 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "AvalonEdit"] + path = AvalonEdit + url = https://github.com/icsharpcode/AvalonEdit.git +[submodule "NRefactory"] + path = NRefactory + url = https://github.com/icsharpcode/NRefactory.git +[submodule "cecil"] + path = cecil + url = https://github.com/jbevain/cecil.git diff --git a/AvalonEdit b/AvalonEdit new file mode 160000 index 000000000..19611add5 --- /dev/null +++ b/AvalonEdit @@ -0,0 +1 @@ +Subproject commit 19611add5ac9fea77a41a145fc85211c6c32f921 diff --git a/ICSharpCode.Decompiler/Ast/AstBuilder.cs b/ICSharpCode.Decompiler/Ast/AstBuilder.cs index 43e278c47..aa97dc9bf 100644 --- a/ICSharpCode.Decompiler/Ast/AstBuilder.cs +++ b/ICSharpCode.Decompiler/Ast/AstBuilder.cs @@ -181,7 +181,7 @@ namespace ICSharpCode.Decompiler.Ast Type = new SimpleType("AssemblyVersion") .WithAnnotation(new TypeReference( "System.Reflection", "AssemblyVersionAttribute", - moduleDefinition, moduleDefinition.TypeSystem.Corlib)), + moduleDefinition, moduleDefinition.TypeSystem.CoreLibrary)), Arguments = { new PrimitiveExpression(moduleDefinition.Assembly.Name.Version.ToString()) } @@ -225,7 +225,7 @@ namespace ICSharpCode.Decompiler.Ast Type = new SimpleType("TypeForwardedTo") .WithAnnotation(new TypeReference( "System.Runtime.CompilerServices", "TypeForwardedToAttribute", - module, module.TypeSystem.Corlib)), + module, module.TypeSystem.CoreLibrary)), Arguments = { forwardedType } } } @@ -1264,7 +1264,7 @@ namespace ICSharpCode.Decompiler.Ast Ast.Attribute methodImpl = CreateNonCustomAttribute(typeof(MethodImplAttribute)); TypeReference methodImplOptions = new TypeReference( "System.Runtime.CompilerServices", "MethodImplOptions", - methodDefinition.Module, methodDefinition.Module.TypeSystem.Corlib); + methodDefinition.Module, methodDefinition.Module.TypeSystem.CoreLibrary); methodImpl.Arguments.Add(MakePrimitive((long)implAttributes, methodImplOptions)); attributedNode.Attributes.Add(new AttributeSection(methodImpl)); } @@ -1311,7 +1311,7 @@ namespace ICSharpCode.Decompiler.Ast { MarshalInfo marshalInfo = marshalInfoProvider.MarshalInfo; Ast.Attribute attr = CreateNonCustomAttribute(typeof(MarshalAsAttribute), module); - var unmanagedType = new TypeReference("System.Runtime.InteropServices", "UnmanagedType", module, module.TypeSystem.Corlib); + var unmanagedType = new TypeReference("System.Runtime.InteropServices", "UnmanagedType", module, module.TypeSystem.CoreLibrary); attr.Arguments.Add(MakePrimitive((int)marshalInfo.NativeType, unmanagedType)); FixedArrayMarshalInfo fami = marshalInfo as FixedArrayMarshalInfo; @@ -1322,7 +1322,7 @@ namespace ICSharpCode.Decompiler.Ast } SafeArrayMarshalInfo sami = marshalInfo as SafeArrayMarshalInfo; if (sami != null && sami.ElementType != VariantType.None) { - var varEnum = new TypeReference("System.Runtime.InteropServices", "VarEnum", module, module.TypeSystem.Corlib); + var varEnum = new TypeReference("System.Runtime.InteropServices", "VarEnum", module, module.TypeSystem.CoreLibrary); attr.AddNamedArgument("SafeArraySubType", MakePrimitive((int)sami.ElementType, varEnum)); } ArrayMarshalInfo ami = marshalInfo as ArrayMarshalInfo; @@ -1359,7 +1359,7 @@ namespace ICSharpCode.Decompiler.Ast Ast.Attribute attr = new Ast.Attribute(); attr.Type = new SimpleType(attributeType.Name.Substring(0, attributeType.Name.Length - "Attribute".Length)); if (module != null) { - attr.Type.AddAnnotation(new TypeReference(attributeType.Namespace, attributeType.Name, module, module.TypeSystem.Corlib)); + attr.Type.AddAnnotation(new TypeReference(attributeType.Namespace, attributeType.Name, module, module.TypeSystem.CoreLibrary)); } return attr; } @@ -1461,7 +1461,7 @@ namespace ICSharpCode.Decompiler.Ast } var module = secAttribute.AttributeType.Module; - var securityActionType = new TypeReference("System.Security.Permissions", "SecurityAction", module, module.TypeSystem.Corlib); + var securityActionType = new TypeReference("System.Security.Permissions", "SecurityAction", module, module.TypeSystem.CoreLibrary); attribute.Arguments.Add(MakePrimitive((int)secDecl.Action, securityActionType)); if (secAttribute.HasProperties) { diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index e71d3486d..2d8cb71d4 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -139,7 +139,7 @@ - + {D68133BD-1E63-496E-9EDE-4FBDBF77B486} Mono.Cecil diff --git a/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs b/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs index ce62816d7..ecf1e9fc5 100644 --- a/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs +++ b/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs @@ -24,7 +24,6 @@ using ICSharpCode.Decompiler.FlowAnalysis; using ICSharpCode.NRefactory.Utils; using Mono.Cecil; using Mono.Cecil.Cil; -using Mono.CSharp; namespace ICSharpCode.Decompiler.ILAst { diff --git a/ICSharpCode.Decompiler/ILAst/ILAstTypes.cs b/ICSharpCode.Decompiler/ILAst/ILAstTypes.cs index 9cd42a14f..179b40a67 100644 --- a/ICSharpCode.Decompiler/ILAst/ILAstTypes.cs +++ b/ICSharpCode.Decompiler/ILAst/ILAstTypes.cs @@ -27,7 +27,6 @@ using ICSharpCode.Decompiler.Disassembler; using ICSharpCode.NRefactory.Utils; using Mono.Cecil; using Mono.Cecil.Cil; -using Mono.CSharp; using Cecil = Mono.Cecil; namespace ICSharpCode.Decompiler.ILAst diff --git a/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs b/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs index a507ebcc2..f1e47f3d2 100644 --- a/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs +++ b/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs @@ -478,7 +478,7 @@ namespace ICSharpCode.Decompiler.ILAst if (forceInferChildren) { InferTypeForExpression(expr.Arguments[0], typeSystem.TypedReference); } - return new TypeReference("System", "RuntimeTypeHandle", module, module.TypeSystem.Corlib, true); + return new TypeReference("System", "RuntimeTypeHandle", module, module.TypeSystem.CoreLibrary, true); case ILCode.Refanyval: if (forceInferChildren) { InferTypeForExpression(expr.Arguments[0], typeSystem.TypedReference); @@ -607,16 +607,16 @@ namespace ICSharpCode.Decompiler.ILAst case ILCode.Ldc_R8: return typeSystem.Double; case ILCode.Ldc_Decimal: - return new TypeReference("System", "Decimal", module, module.TypeSystem.Corlib, true); + return new TypeReference("System", "Decimal", module, module.TypeSystem.CoreLibrary, true); case ILCode.Ldtoken: if (expr.Operand is TypeReference) - return new TypeReference("System", "RuntimeTypeHandle", module, module.TypeSystem.Corlib, true); + return new TypeReference("System", "RuntimeTypeHandle", module, module.TypeSystem.CoreLibrary, true); else if (expr.Operand is FieldReference) - return new TypeReference("System", "RuntimeFieldHandle", module, module.TypeSystem.Corlib, true); + return new TypeReference("System", "RuntimeFieldHandle", module, module.TypeSystem.CoreLibrary, true); else - return new TypeReference("System", "RuntimeMethodHandle", module, module.TypeSystem.Corlib, true); + return new TypeReference("System", "RuntimeMethodHandle", module, module.TypeSystem.CoreLibrary, true); case ILCode.Arglist: - return new TypeReference("System", "RuntimeArgumentHandle", module, module.TypeSystem.Corlib, true); + return new TypeReference("System", "RuntimeArgumentHandle", module, module.TypeSystem.CoreLibrary, true); #endregion #region Array instructions case ILCode.Newarr: @@ -996,7 +996,7 @@ namespace ICSharpCode.Decompiler.ILAst GenericInstanceType CreateNullableType(TypeReference type) { if (type == null) return null; - var t = new GenericInstanceType(new TypeReference("System", "Nullable`1", module, module.TypeSystem.Corlib, true)); + var t = new GenericInstanceType(new TypeReference("System", "Nullable`1", module, module.TypeSystem.CoreLibrary, true)); t.GenericArguments.Add(type); return t; } diff --git a/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj index 8bb4934e7..adf4d5607 100644 --- a/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj @@ -111,7 +111,7 @@ - + {D68133BD-1E63-496E-9EDE-4FBDBF77B486} Mono.Cecil diff --git a/ILSpy.AddIn/ILSpy.AddIn.csproj b/ILSpy.AddIn/ILSpy.AddIn.csproj index 7c56424cb..b2cc7f4d6 100644 --- a/ILSpy.AddIn/ILSpy.AddIn.csproj +++ b/ILSpy.AddIn/ILSpy.AddIn.csproj @@ -206,11 +206,11 @@ {1e85eff9-e370-4683-83e4-8a3d063ff791} ILSpy - + {d68133bd-1e63-496e-9ede-4fbdbf77b486} Mono.Cecil - + {63e6915c-7ea4-4d76-ab28-0d7191eea626} Mono.Cecil.Pdb @@ -218,7 +218,7 @@ {53dca265-3c3c-42f9-b647-f72ba678122b} ICSharpCode.NRefactory.CSharp - + {7b82b671-419f-45f4-b778-d9286f996efa} ICSharpCode.NRefactory.VB diff --git a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj index 3be1691c4..4dc0b3234 100644 --- a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj +++ b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj @@ -115,7 +115,7 @@ ILSpy False - + {D68133BD-1E63-496E-9EDE-4FBDBF77B486} Mono.Cecil False diff --git a/ILSpy.BamlDecompiler/Tests/ILSpy.BamlDecompiler.Tests.csproj b/ILSpy.BamlDecompiler/Tests/ILSpy.BamlDecompiler.Tests.csproj index be66cf790..a4194f4f6 100644 --- a/ILSpy.BamlDecompiler/Tests/ILSpy.BamlDecompiler.Tests.csproj +++ b/ILSpy.BamlDecompiler/Tests/ILSpy.BamlDecompiler.Tests.csproj @@ -104,7 +104,7 @@ {1E85EFF9-E370-4683-83E4-8A3D063FF791} ILSpy - + {D68133BD-1E63-496E-9EDE-4FBDBF77B486} Mono.Cecil diff --git a/ILSpy.sln b/ILSpy.sln index 7a69bb14f..ff5451085 100644 --- a/ILSpy.sln +++ b/ILSpy.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{F45DB999-7E72-4000-B5AD-3A7B485A0896}" ProjectSection(SolutionItems) = preProject @@ -12,7 +12,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILSpy", "ILSpy\ILSpy.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "SharpTreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "Mono.Cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}" EndProject @@ -24,9 +24,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Decompiler.Test EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestPlugin", "TestPlugin\TestPlugin.csproj", "{F32EBCC8-0E53-4421-867E-05B3D6E10C70}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Pdb", "Mono.Cecil\symbols\pdb\Mono.Cecil.Pdb.csproj", "{63E6915C-7EA4-4D76-AB28-0D7191EEA626}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.VB", "NRefactory\ICSharpCode.NRefactory.VB\ICSharpCode.NRefactory.VB.csproj", "{7B82B671-419F-45F4-B778-D9286F996EFA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Pdb", "cecil\symbols\pdb\Mono.Cecil.Pdb.csproj", "{63E6915C-7EA4-4D76-AB28-0D7191EEA626}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILSpy.BamlDecompiler", "ILSpy.BamlDecompiler\ILSpy.BamlDecompiler.csproj", "{A6BAD2BA-76BA-461C-8B6D-418607591247}" EndProject @@ -41,6 +39,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Rebracer.xml = Rebracer.xml EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.VB", "NRefactory.VB\ICSharpCode.NRefactory.VB\ICSharpCode.NRefactory.VB.csproj", "{7B82B671-419F-45F4-B778-D9286F996EFA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.VB.Tests", "NRefactory.VB\ICSharpCode.NRefactory.VB.Tests\ICSharpCode.NRefactory.VB.Tests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,14 +123,6 @@ Global {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Release|Any CPU.Build.0 = net_4_0_Release|Any CPU {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Release|x86.ActiveCfg = net_4_0_Release|Any CPU {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Release|x86.Build.0 = net_4_0_Release|Any CPU - {7B82B671-419F-45F4-B778-D9286F996EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7B82B671-419F-45F4-B778-D9286F996EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7B82B671-419F-45F4-B778-D9286F996EFA}.Debug|x86.ActiveCfg = Debug|Any CPU - {7B82B671-419F-45F4-B778-D9286F996EFA}.Debug|x86.Build.0 = Debug|Any CPU - {7B82B671-419F-45F4-B778-D9286F996EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7B82B671-419F-45F4-B778-D9286F996EFA}.Release|Any CPU.Build.0 = Release|Any CPU - {7B82B671-419F-45F4-B778-D9286F996EFA}.Release|x86.ActiveCfg = Release|Any CPU - {7B82B671-419F-45F4-B778-D9286F996EFA}.Release|x86.Build.0 = Release|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.Build.0 = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|x86.ActiveCfg = Debug|x86 @@ -159,6 +153,22 @@ Global {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|Any CPU.ActiveCfg = Release|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|Any CPU.Build.0 = Release|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|x86.ActiveCfg = Release|Any CPU + {7B82B671-419F-45F4-B778-D9286F996EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B82B671-419F-45F4-B778-D9286F996EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B82B671-419F-45F4-B778-D9286F996EFA}.Debug|x86.ActiveCfg = Debug|Any CPU + {7B82B671-419F-45F4-B778-D9286F996EFA}.Debug|x86.Build.0 = Debug|Any CPU + {7B82B671-419F-45F4-B778-D9286F996EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B82B671-419F-45F4-B778-D9286F996EFA}.Release|Any CPU.Build.0 = Release|Any CPU + {7B82B671-419F-45F4-B778-D9286F996EFA}.Release|x86.ActiveCfg = Release|Any CPU + {7B82B671-419F-45F4-B778-D9286F996EFA}.Release|x86.Build.0 = Release|Any CPU + {870115DD-960A-4406-A6B9-600BCDC36A03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {870115DD-960A-4406-A6B9-600BCDC36A03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {870115DD-960A-4406-A6B9-600BCDC36A03}.Debug|x86.ActiveCfg = Debug|x86 + {870115DD-960A-4406-A6B9-600BCDC36A03}.Debug|x86.Build.0 = Debug|x86 + {870115DD-960A-4406-A6B9-600BCDC36A03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {870115DD-960A-4406-A6B9-600BCDC36A03}.Release|Any CPU.Build.0 = Release|Any CPU + {870115DD-960A-4406-A6B9-600BCDC36A03}.Release|x86.ActiveCfg = Release|x86 + {870115DD-960A-4406-A6B9-600BCDC36A03}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 46a29db40..205afba41 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -370,7 +370,7 @@ {984CC812-9470-4A13-AFF9-CC44068D666C} ICSharpCode.Decompiler - + {D68133BD-1E63-496E-9EDE-4FBDBF77B486} Mono.Cecil @@ -378,18 +378,18 @@ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} ICSharpCode.AvalonEdit - + {63E6915C-7EA4-4D76-AB28-0D7191EEA626} Mono.Cecil.Pdb + + {7B82B671-419F-45F4-B778-D9286F996EFA} + ICSharpCode.NRefactory.VB + {53DCA265-3C3C-42F9-B647-F72BA678122B} ICSharpCode.NRefactory.CSharp - - {7B82B671-419F-45F4-B778-D9286F996EFA} - ICSharpCode.NRefactory.VB - {3B2A5653-EC97-4001-BB9B-D90F1AF2C371} ICSharpCode.NRefactory diff --git a/ILSpy/Properties/app.config.template b/ILSpy/Properties/app.config.template index e18725fef..7ed72e881 100644 --- a/ILSpy/Properties/app.config.template +++ b/ILSpy/Properties/app.config.template @@ -13,7 +13,7 @@ - + @@ -37,11 +37,11 @@ - + - + diff --git a/NRefactory b/NRefactory new file mode 160000 index 000000000..a2b55de35 --- /dev/null +++ b/NRefactory @@ -0,0 +1 @@ +Subproject commit a2b55de351be2119b6f0c3a17c36b5b9adbd7c59 diff --git a/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/ICSharpCode.NRefactory.VB.Tests.csproj b/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/ICSharpCode.NRefactory.VB.Tests.csproj index e58b7add4..583a8acae 100644 --- a/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/ICSharpCode.NRefactory.VB.Tests.csproj +++ b/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/ICSharpCode.NRefactory.VB.Tests.csproj @@ -13,12 +13,14 @@ False OnBuildSuccess Library - ..\..\..\..\bin\UnitTests\ + bin\$(Configuration)\ False 4 v4.0 - false + False Client + False + obj\$(Configuration)\ True @@ -33,6 +35,7 @@ Full true Project + obj\ False @@ -62,7 +65,7 @@ - ..\..\Mono.Cecil\Test\libs\nunit-2.4.8\nunit.framework.dll + ..\..\ICSharpCode.Decompiler\Tests\nunit.framework.dll @@ -94,7 +97,7 @@ {7B82B671-419F-45F4-B778-D9286F996EFA} ICSharpCode.NRefactory.VB - + {3B2A5653-EC97-4001-BB9B-D90F1AF2C371} ICSharpCode.NRefactory diff --git a/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/Lexer/LexerPositionTests.cs b/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/Lexer/LexerPositionTests.cs index 8525f63f8..47c52f8ee 100644 --- a/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/Lexer/LexerPositionTests.cs +++ b/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/Lexer/LexerPositionTests.cs @@ -22,16 +22,16 @@ namespace ICSharpCode.NRefactory.VB.Tests.Lexer VBLexer l = GenerateLexer("public\nstatic"); Token t = l.NextToken(); Assert.AreEqual(Tokens.Public, t.Kind); - Assert.AreEqual(new AstLocation(1, 1), t.Location); - Assert.AreEqual(new AstLocation(1, 7), t.EndLocation); + Assert.AreEqual(new TextLocation(1, 1), t.Location); + Assert.AreEqual(new TextLocation(1, 7), t.EndLocation); t = l.NextToken(); Assert.AreEqual(Tokens.EOL, t.Kind); - Assert.AreEqual(new AstLocation(1, 7), t.Location); - Assert.AreEqual(new AstLocation(2, 1), t.EndLocation); + Assert.AreEqual(new TextLocation(1, 7), t.Location); + Assert.AreEqual(new TextLocation(2, 1), t.EndLocation); t = l.NextToken(); Assert.AreEqual(Tokens.Static, t.Kind); - Assert.AreEqual(new AstLocation(2, 1), t.Location); - Assert.AreEqual(new AstLocation(2, 7), t.EndLocation); + Assert.AreEqual(new TextLocation(2, 1), t.Location); + Assert.AreEqual(new TextLocation(2, 7), t.EndLocation); } [Test] @@ -40,16 +40,16 @@ namespace ICSharpCode.NRefactory.VB.Tests.Lexer VBLexer l = GenerateLexer("public\r\nstatic"); Token t = l.NextToken(); Assert.AreEqual(Tokens.Public, t.Kind); - Assert.AreEqual(new AstLocation(1, 1), t.Location); - Assert.AreEqual(new AstLocation(1, 7), t.EndLocation); + Assert.AreEqual(new TextLocation(1, 1), t.Location); + Assert.AreEqual(new TextLocation(1, 7), t.EndLocation); t = l.NextToken(); Assert.AreEqual(Tokens.EOL, t.Kind); - Assert.AreEqual(new AstLocation(1, 7), t.Location); - Assert.AreEqual(new AstLocation(2, 1), t.EndLocation); + Assert.AreEqual(new TextLocation(1, 7), t.Location); + Assert.AreEqual(new TextLocation(2, 1), t.EndLocation); t = l.NextToken(); Assert.AreEqual(Tokens.Static, t.Kind); - Assert.AreEqual(new AstLocation(2, 1), t.Location); - Assert.AreEqual(new AstLocation(2, 7), t.EndLocation); + Assert.AreEqual(new TextLocation(2, 1), t.Location); + Assert.AreEqual(new TextLocation(2, 7), t.EndLocation); } [Test] @@ -59,13 +59,13 @@ namespace ICSharpCode.NRefactory.VB.Tests.Lexer l.NextToken(); // public Token t = l.NextToken(); Assert.AreEqual(Tokens.EOL, t.Kind); - Assert.AreEqual(new AstLocation(1, 7), t.Location); - Assert.AreEqual(new AstLocation(1, 7), t.EndLocation); + Assert.AreEqual(new TextLocation(1, 7), t.Location); + Assert.AreEqual(new TextLocation(1, 7), t.EndLocation); t = l.NextToken(); Assert.AreEqual(Tokens.EOF, t.Kind); - Assert.AreEqual(new AstLocation(1, 7), t.Location); - Assert.AreEqual(new AstLocation(1, 7), t.EndLocation); + Assert.AreEqual(new TextLocation(1, 7), t.Location); + Assert.AreEqual(new TextLocation(1, 7), t.EndLocation); } [Test] @@ -75,13 +75,13 @@ namespace ICSharpCode.NRefactory.VB.Tests.Lexer l.NextToken(); // public Token t = l.NextToken(); Assert.AreEqual(Tokens.EOL, t.Kind); - Assert.AreEqual(new AstLocation(2, 2), t.Location); - Assert.AreEqual(new AstLocation(2, 2), t.EndLocation); + Assert.AreEqual(new TextLocation(2, 2), t.Location); + Assert.AreEqual(new TextLocation(2, 2), t.EndLocation); t = l.NextToken(); Assert.AreEqual(Tokens.EOF, t.Kind); - Assert.AreEqual(new AstLocation(2, 2), t.Location); - Assert.AreEqual(new AstLocation(2, 2), t.EndLocation); + Assert.AreEqual(new TextLocation(2, 2), t.Location); + Assert.AreEqual(new TextLocation(2, 2), t.EndLocation); } } } diff --git a/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/Parser/GlobalScope/ImportsStatementTests.cs b/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/Parser/GlobalScope/ImportsStatementTests.cs index 56c7d8ee9..971805090 100644 --- a/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/Parser/GlobalScope/ImportsStatementTests.cs +++ b/NRefactory.VB/ICSharpCode.NRefactory.VB.Tests/Parser/GlobalScope/ImportsStatementTests.cs @@ -47,7 +47,7 @@ namespace ICSharpCode.NRefactory.VB.Tests.Ast string program = "Imports My.Name.Space\n"; var clause2 = new MemberImportsClause { - Member = new QualifiedType(new QualifiedType(new SimpleType("My"), new Identifier ("Name", AstLocation.Empty)), new Identifier ("Space", AstLocation.Empty)) + Member = new QualifiedType(new QualifiedType(new SimpleType("My"), new Identifier ("Name", TextLocation.Empty)), new Identifier ("Space", TextLocation.Empty)) }; var node = new ImportsStatement(); diff --git a/NRefactory.VB/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj b/NRefactory.VB/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj index 90a339b72..5c75126ba 100644 --- a/NRefactory.VB/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj +++ b/NRefactory.VB/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj @@ -13,7 +13,7 @@ 4 false True - ..\ICSharpCode.NRefactory.snk + ..\..\NRefactory\ICSharpCode.NRefactory.snk False File @@ -47,7 +47,7 @@ - + Properties\GlobalAssemblyInfo.cs @@ -210,11 +210,11 @@ - + {53DCA265-3C3C-42F9-B647-F72BA678122B} ICSharpCode.NRefactory.CSharp - + {3B2A5653-EC97-4001-BB9B-D90F1AF2C371} ICSharpCode.NRefactory diff --git a/TestPlugin/TestPlugin.csproj b/TestPlugin/TestPlugin.csproj index 432b868ad..dc2e78f56 100644 --- a/TestPlugin/TestPlugin.csproj +++ b/TestPlugin/TestPlugin.csproj @@ -90,7 +90,7 @@ {1E85EFF9-E370-4683-83E4-8A3D063FF791} ILSpy - + {D68133BD-1E63-496E-9EDE-4FBDBF77B486} Mono.Cecil diff --git a/cecil b/cecil new file mode 160000 index 000000000..53df0bc39 --- /dev/null +++ b/cecil @@ -0,0 +1 @@ +Subproject commit 53df0bc39e48d8544020856e83f8d8a2e11c8a3a