Browse Source

Merge changes from NRefactory into SharpDevelop newNR branch.

newNRvisualizers
Daniel Grunwald 14 years ago
parent
commit
48790ee777
  1. 3
      src/Libraries/NRefactory/ICSharpCode.Editor/.gitignore
  2. 74
      src/Libraries/NRefactory/ICSharpCode.Editor/ICSharpCode.Editor.csproj
  3. 117
      src/Libraries/NRefactory/ICSharpCode.Editor/ITextEditor.cs
  4. 83
      src/Libraries/NRefactory/ICSharpCode.Editor/LinkedElement.cs
  5. 1
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs
  6. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Analysis/DefiniteAssignmentAnalysis.cs
  7. 24
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
  8. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs
  9. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs
  10. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpModifierToken.cs
  11. 16
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs
  12. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpUtil.cs
  13. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/CompilationUnit.cs
  14. 6
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/ComposedType.cs
  15. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs
  16. 8
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/ErrorNode.cs
  17. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs
  18. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs
  19. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayCreateExpression.cs
  20. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayInitializerExpression.cs
  21. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AsExpression.cs
  22. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AssignmentExpression.cs
  23. 8
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BaseReferenceExpression.cs
  24. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BinaryOperatorExpression.cs
  25. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CastExpression.cs
  26. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CheckedExpression.cs
  27. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ConditionalExpression.cs
  28. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DefaultValueExpression.cs
  29. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DirectionExpression.cs
  30. 12
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs
  31. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/Expression.cs
  32. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs
  33. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IndexerExpression.cs
  34. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs
  35. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IsExpression.cs
  36. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs
  37. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/MemberReferenceExpression.cs
  38. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs
  39. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedExpression.cs
  40. 10
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NullReferenceExpression.cs
  41. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ObjectCreateExpression.cs
  42. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ParenthesizedExpression.cs
  43. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PointerReferenceExpression.cs
  44. 12
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs
  45. 10
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/QueryExpression.cs
  46. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/SizeOfExpression.cs
  47. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/StackAllocExpression.cs
  48. 8
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ThisReferenceExpression.cs
  49. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeOfExpression.cs
  50. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeReferenceExpression.cs
  51. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs
  52. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UncheckedExpression.cs
  53. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UndocumentedExpression.cs
  54. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs
  55. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs
  56. 14
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Comment.cs
  57. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Constraint.cs
  58. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs
  59. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/ExternAliasDeclaration.cs
  60. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs
  61. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs
  62. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs
  63. 8
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs
  64. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingDeclaration.cs
  65. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs
  66. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/IRelocatable.cs
  67. 24
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs
  68. 54
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/IdentifierExpressionBackreference.cs
  69. 6
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/MemberType.cs
  70. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Modifiers.cs
  71. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/NodeType.cs
  72. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs
  73. 12
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/PrimitiveType.cs
  74. 8
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/SimpleType.cs
  75. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs
  76. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs
  77. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/CheckedStatement.cs
  78. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ContinueStatement.cs
  79. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/DoWhileStatement.cs
  80. 12
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs
  81. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ExpressionStatement.cs
  82. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/FixedStatement.cs
  83. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForStatement.cs
  84. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForeachStatement.cs
  85. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/GotoStatement.cs
  86. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs
  87. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/LabelStatement.cs
  88. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/LockStatement.cs
  89. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ReturnStatement.cs
  90. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/Statement.cs
  91. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs
  92. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ThrowStatement.cs
  93. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/TryCatchStatement.cs
  94. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/UncheckedStatement.cs
  95. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/UnsafeStatement.cs
  96. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/UsingStatement.cs
  97. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/VariableDeclarationStatement.cs
  98. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/WhileStatement.cs
  99. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldBreakStatement.cs
  100. 0
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldStatement.cs
  101. Some files were not shown because too many files have changed in this diff Show More

3
src/Libraries/NRefactory/ICSharpCode.Editor/.gitignore vendored

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
bin/
obj/

74
src/Libraries/NRefactory/ICSharpCode.Editor/ICSharpCode.Editor.csproj

@ -1,74 +0,0 @@ @@ -1,74 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{F054A788-B591-4561-A8BA-AE745BBEB817}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.Editor</RootNamespace>
<AssemblyName>ICSharpCode.Editor</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<AppDesignerFolder>Properties</AppDesignerFolder>
<SignAssembly>True</SignAssembly>
<DelaySign>False</DelaySign>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<DocumentationFile>bin\Debug\ICSharpCode.Editor.xml</DocumentationFile>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RunCodeAnalysis>False</RunCodeAnalysis>
<AssemblyOriginatorKeyFile>..\ICSharpCode.NRefactory.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<StartAction>Project</StartAction>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="IDocument.cs" />
<Compile Include="IDocumentLine.cs" />
<Compile Include="ISegment.cs" />
<Compile Include="ITextEditor.cs" />
<Compile Include="ITextSource.cs" />
<Compile Include="LinkedElement.cs" />
<Compile Include="ReadOnlyDocument.cs" />
<Compile Include="StringTextSource.cs" />
<Compile Include="TextLocation.cs" />
<Compile Include="ITextAnchor.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TextChangeEventArgs.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

117
src/Libraries/NRefactory/ICSharpCode.Editor/ITextEditor.cs

@ -1,117 +0,0 @@ @@ -1,117 +0,0 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace ICSharpCode.Editor
{
/*
/// <summary>
/// Interface for text editors.
/// </summary>
public interface ITextEditor : IServiceProvider
{
/// <summary>
/// Gets the document that is being edited.
/// </summary>
IDocument Document { get; }
/// <summary>
/// Gets an object that represents the caret inside this text editor.
/// </summary>
ITextEditorCaret Caret { get; }
/// <summary>
/// Sets the caret to the specified line/column and brings the caret into view.
/// </summary>
void JumpTo(int line, int column);
/// <summary>
/// Gets the start offset of the selection.
/// </summary>
int SelectionStart { get; }
/// <summary>
/// Gets the length of the selection.
/// </summary>
int SelectionLength { get; }
/// <summary>
/// Gets/Sets the selected text.
/// </summary>
string SelectedText { get; set; }
/// <summary>
/// Sets the selection.
/// </summary>
/// <param name="selectionStart">Start offset of the selection</param>
/// <param name="selectionLength">Length of the selection</param>
void Select(int selectionStart, int selectionLength);
/// <summary>
/// Shows the specified linked elements, and allows the user to edit them.
/// </summary>
/// <returns>
/// Returns true when the user has finished editing the elements and pressed Return;
/// or false when editing is aborted for any reason.
/// </returns>
/// <remarks>
/// The user can also edit other parts of the document (or other documents) while in link mode.
/// In case of success (true return value), this method will update the offsets of the linked elements
/// to reflect the changes done by the user.
/// If the text editor does not support link mode, it will immediately return false.
/// </remarks>
// Task<bool> ShowLinkedElements(IEnumerable<LinkedElement> linkedElements);
}
*/
/// <summary>
/// Represents the caret in a text editor.
/// </summary>
public interface ITextEditorCaret
{
/// <summary>
/// Gets/Sets the caret offset;
/// </summary>
int Offset { get; set; }
/// <summary>
/// Gets/Sets the caret line number.
/// Line numbers are counted starting from 1.
/// </summary>
int Line { get; set; }
/// <summary>
/// Gets/Sets the caret column number.
/// Column numbers are counted starting from 1.
/// </summary>
int Column { get; set; }
/// <summary>
/// Gets/sets the caret location.
/// </summary>
TextLocation Location { get; set; }
/// <summary>
/// Is raised whenever the location of the caret has changed.
/// </summary>
event EventHandler LocationChanged;
}
}

83
src/Libraries/NRefactory/ICSharpCode.Editor/LinkedElement.cs

@ -1,83 +0,0 @@ @@ -1,83 +0,0 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
namespace ICSharpCode.Editor
{
// I'm not sure if we need this.
// How about a method in the context - this method could wrap the internal representation.
// public void StartTextLinkMode (int linkLength, IEnumerable<int> offsets)
// and maybe then variations taking more than one link element ?
// /// <summary>
// /// Represents an element in the text editor that is either editable, or bound to another editable element.
// /// Used with <see cref="ITextEditor.ShowLinkedElements"/>
// /// </summary>
// public class LinkedElement
// {
// LinkedElement boundTo;
//
// /// <summary>
// /// Gets/Sets the start offset of this linked element.
// /// </summary>
// public int StartOffset { get; set; }
//
// /// <summary>
// /// Gets/Sets the end offset of this linked element.
// /// </summary>
// public int EndOffset { get; set; }
//
// /// <summary>
// /// Gets the linked element to which this element is bound.
// /// </summary>
// public LinkedElement BoundTo {
// get { return boundTo; }
// }
//
// /// <summary>
// /// Gets whether this element is editable. Returns true if this element is not bound.
// /// </summary>
// public bool IsEditable {
// get { return boundTo == null; }
// }
//
// /// <summary>
// /// Creates a new editable element.
// /// </summary>
// public LinkedElement(int startOffset, int endOffset)
// {
// this.StartOffset = startOffset;
// this.EndOffset = endOffset;
// }
//
// /// <summary>
// /// Creates a new element that is bound to <paramref name="boundTo"/>.
// /// </summary>
// public LinkedElement(int startOffset, int endOffset, LinkedElement boundTo)
// {
// if (boundTo == null)
// throw new ArgumentNullException("boundTo");
// this.StartOffset = startOffset;
// this.EndOffset = endOffset;
// while (boundTo.boundTo != null)
// boundTo = boundTo.boundTo;
// this.boundTo = boundTo;
// }
// }
}

1
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Analysis/ControlFlow.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs

@ -23,6 +23,7 @@ using System.Linq; @@ -23,6 +23,7 @@ using System.Linq;
using System.Threading;
using ICSharpCode.NRefactory.CSharp.Resolver;
using ICSharpCode.NRefactory.Semantics;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.CSharp.Analysis

2
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Analysis/DefiniteAssignmentAnalysis.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Analysis/DefiniteAssignmentAnalysis.cs

@ -21,7 +21,9 @@ using System.Collections.Generic; @@ -21,7 +21,9 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using ICSharpCode.NRefactory.CSharp.Resolver;
using ICSharpCode.NRefactory.Semantics;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
using ICSharpCode.NRefactory.Utils;

24
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/AstNode.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs

@ -117,20 +117,20 @@ namespace ICSharpCode.NRefactory.CSharp @@ -117,20 +117,20 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
public virtual AstLocation StartLocation {
public virtual TextLocation StartLocation {
get {
var child = firstChild;
if (child == null)
return AstLocation.Empty;
return TextLocation.Empty;
return child.StartLocation;
}
}
public virtual AstLocation EndLocation {
public virtual TextLocation EndLocation {
get {
var child = lastChild;
if (child == null)
return AstLocation.Empty;
return TextLocation.Empty;
return child.EndLocation;
}
}
@ -506,10 +506,10 @@ namespace ICSharpCode.NRefactory.CSharp @@ -506,10 +506,10 @@ namespace ICSharpCode.NRefactory.CSharp
public AstNode GetNodeAt (int line, int column, Predicate<AstNode> pred = null)
{
return GetNodeAt (new AstLocation (line, column), pred);
return GetNodeAt (new TextLocation (line, column), pred);
}
public AstNode GetNodeAt (AstLocation location, Predicate<AstNode> pred = null)
public AstNode GetNodeAt (TextLocation location, Predicate<AstNode> pred = null)
{
AstNode result = null;
AstNode node = this;
@ -533,14 +533,14 @@ namespace ICSharpCode.NRefactory.CSharp @@ -533,14 +533,14 @@ namespace ICSharpCode.NRefactory.CSharp
public T GetNodeAt<T> (int line, int column) where T : AstNode
{
return GetNodeAt<T> (new AstLocation (line, column));
return GetNodeAt<T> (new TextLocation (line, column));
}
/// <summary>
/// Gets the node specified by T at location. This is useful for getting a specific node from the tree. For example searching
/// the current method declaration.
/// </summary>
public T GetNodeAt<T> (AstLocation location) where T : AstNode
public T GetNodeAt<T> (TextLocation location) where T : AstNode
{
T result = null;
AstNode node = this;
@ -564,10 +564,10 @@ namespace ICSharpCode.NRefactory.CSharp @@ -564,10 +564,10 @@ namespace ICSharpCode.NRefactory.CSharp
public IEnumerable<AstNode> GetNodesBetween (int startLine, int startColumn, int endLine, int endColumn)
{
return GetNodesBetween (new AstLocation (startLine, startColumn), new AstLocation (endLine, endColumn));
return GetNodesBetween (new TextLocation (startLine, startColumn), new TextLocation (endLine, endColumn));
}
public IEnumerable<AstNode> GetNodesBetween (AstLocation start, AstLocation end)
public IEnumerable<AstNode> GetNodesBetween (TextLocation start, TextLocation end)
{
AstNode node = this;
while (node != null) {
@ -593,10 +593,10 @@ namespace ICSharpCode.NRefactory.CSharp @@ -593,10 +593,10 @@ namespace ICSharpCode.NRefactory.CSharp
public bool Contains (int line, int column)
{
return Contains (new AstLocation (line, column));
return Contains (new TextLocation (line, column));
}
public bool Contains (AstLocation location)
public bool Contains (TextLocation location)
{
return this.StartLocation <= location && location < this.EndLocation;
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/AstType.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs

2
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/CSharpModifierToken.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpModifierToken.cs

@ -64,7 +64,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -64,7 +64,7 @@ namespace ICSharpCode.NRefactory.CSharp
get { return allModifiers; }
}
public CSharpModifierToken (AstLocation location, Modifiers modifier) : base (location, 0)
public CSharpModifierToken (TextLocation location, Modifiers modifier) : base (location, 0)
{
this.Modifier = modifier;
}

16
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/CSharpTokenNode.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// TokenNode.cs
//
// Author:
@ -38,7 +38,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -38,7 +38,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
public NullCSharpTokenNode () : base (AstLocation.Empty, 0)
public NullCSharpTokenNode () : base (TextLocation.Empty, 0)
{
}
@ -60,28 +60,28 @@ namespace ICSharpCode.NRefactory.CSharp @@ -60,28 +60,28 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
AstLocation startLocation;
public override AstLocation StartLocation {
TextLocation startLocation;
public override TextLocation StartLocation {
get {
return startLocation;
}
}
protected int tokenLength;
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (StartLocation.Line, StartLocation.Column + tokenLength);
return new TextLocation (StartLocation.Line, StartLocation.Column + tokenLength);
}
}
public CSharpTokenNode (AstLocation location, int tokenLength)
public CSharpTokenNode (TextLocation location, int tokenLength)
{
this.startLocation = location;
this.tokenLength = tokenLength;
}
#region IRelocationable implementation
void IRelocatable.SetStartLocation (AstLocation startLocation)
void IRelocatable.SetStartLocation (TextLocation startLocation)
{
this.startLocation = startLocation;
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/CSharpUtil.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpUtil.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/CompilationUnit.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/CompilationUnit.cs

6
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/ComposedType.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/ComposedType.cs

@ -46,7 +46,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -46,7 +46,7 @@ namespace ICSharpCode.NRefactory.CSharp
return !GetChildByRole(NullableRole).IsNull;
}
set {
SetChildByRole(NullableRole, value ? new CSharpTokenNode(AstLocation.Empty, 1) : null);
SetChildByRole(NullableRole, value ? new CSharpTokenNode(TextLocation.Empty, 1) : null);
}
}
@ -63,7 +63,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -63,7 +63,7 @@ namespace ICSharpCode.NRefactory.CSharp
d--;
}
while (d < value) {
InsertChildBefore(GetChildByRole(PointerRole), new CSharpTokenNode(AstLocation.Empty, 1), PointerRole);
InsertChildBefore(GetChildByRole(PointerRole), new CSharpTokenNode(TextLocation.Empty, 1), PointerRole);
d++;
}
}
@ -149,7 +149,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -149,7 +149,7 @@ namespace ICSharpCode.NRefactory.CSharp
d--;
}
while (d < value) {
InsertChildBefore(GetChildByRole(Roles.Comma), new CSharpTokenNode(AstLocation.Empty, 1), Roles.Comma);
InsertChildBefore(GetChildByRole(Roles.Comma), new CSharpTokenNode(TextLocation.Empty, 1), Roles.Comma);
d++;
}
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/DepthFirstAstVisitor.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs

8
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/ErrorNode.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/ErrorNode.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// ErrorNode.cs
//
// Author:
@ -34,7 +34,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -34,7 +34,7 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary>
public class ErrorNode : AstNode
{
static AstLocation maxLoc = new AstLocation (int.MaxValue, int.MaxValue);
static TextLocation maxLoc = new TextLocation (int.MaxValue, int.MaxValue);
public override NodeType NodeType {
get {
@ -42,13 +42,13 @@ namespace ICSharpCode.NRefactory.CSharp @@ -42,13 +42,13 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
public override AstLocation StartLocation {
public override TextLocation StartLocation {
get {
return maxLoc;
}
}
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return maxLoc;
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousMethodExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ArrayCreateExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayCreateExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ArrayInitializerExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayInitializerExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AsExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AsExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AssignmentExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AssignmentExpression.cs

8
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/BaseReferenceExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BaseReferenceExpression.cs

@ -31,19 +31,19 @@ namespace ICSharpCode.NRefactory.CSharp @@ -31,19 +31,19 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary>
public class BaseReferenceExpression : Expression
{
public AstLocation Location {
public TextLocation Location {
get;
set;
}
public override AstLocation StartLocation {
public override TextLocation StartLocation {
get {
return Location;
}
}
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (Location.Line, Location.Column + "base".Length);
return new TextLocation (Location.Line, Location.Column + "base".Length);
}
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/BinaryOperatorExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BinaryOperatorExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CastExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CastExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CheckedExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CheckedExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ConditionalExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ConditionalExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DefaultValueExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DefaultValueExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DirectionExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DirectionExpression.cs

12
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/EmptyExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// EmptyExpression.cs
//
// Author:
@ -32,15 +32,15 @@ namespace ICSharpCode.NRefactory.CSharp @@ -32,15 +32,15 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary>
public class EmptyExpression : Expression, IRelocatable
{
AstLocation location;
TextLocation location;
public override AstLocation StartLocation {
public override TextLocation StartLocation {
get {
return location;
}
}
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return location;
}
@ -50,13 +50,13 @@ namespace ICSharpCode.NRefactory.CSharp @@ -50,13 +50,13 @@ namespace ICSharpCode.NRefactory.CSharp
{
}
public EmptyExpression (AstLocation location)
public EmptyExpression (TextLocation location)
{
this.location = location;
}
#region IRelocationable implementation
void IRelocatable.SetStartLocation (AstLocation startLocation)
void IRelocatable.SetStartLocation (TextLocation startLocation)
{
this.location = startLocation;
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/Expression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/Expression.cs

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/IdentifierExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs

@ -38,7 +38,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -38,7 +38,7 @@ namespace ICSharpCode.NRefactory.CSharp
this.Identifier = identifier;
}
public IdentifierExpression(string identifier, AstLocation location)
public IdentifierExpression(string identifier, TextLocation location)
{
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (identifier, location));
}
@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, TextLocation.Empty));
}
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/IndexerExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IndexerExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/InvocationExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/IsExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IsExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/LambdaExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/MemberReferenceExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/MemberReferenceExpression.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// MemberReferenceExpression.cs
//
// Author:
@ -43,7 +43,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -43,7 +43,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole (Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole (Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

2
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NamedArgumentExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs

@ -40,7 +40,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -40,7 +40,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, TextLocation.Empty));
}
}

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NamedExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedExpression.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// NamedExpression.cs
//
// Author:
@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, TextLocation.Empty));
}
}

10
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NullReferenceExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NullReferenceExpression.cs

@ -31,16 +31,16 @@ namespace ICSharpCode.NRefactory.CSharp @@ -31,16 +31,16 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary>
public class NullReferenceExpression : Expression
{
AstLocation location;
public override AstLocation StartLocation {
TextLocation location;
public override TextLocation StartLocation {
get {
return location;
}
}
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (location.Line, location.Column + "null".Length);
return new TextLocation (location.Line, location.Column + "null".Length);
}
}
@ -48,7 +48,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -48,7 +48,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
}
public NullReferenceExpression (AstLocation location)
public NullReferenceExpression (TextLocation location)
{
this.location = location;
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ObjectCreateExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ObjectCreateExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ParenthesizedExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ParenthesizedExpression.cs

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/PointerReferenceExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PointerReferenceExpression.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// PointerReferenceExpression.cs
//
// Author:
@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

12
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/PrimitiveExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs

@ -33,17 +33,17 @@ namespace ICSharpCode.NRefactory.CSharp @@ -33,17 +33,17 @@ namespace ICSharpCode.NRefactory.CSharp
{
public static readonly object AnyValue = new object();
AstLocation startLocation;
public override AstLocation StartLocation {
TextLocation startLocation;
public override TextLocation StartLocation {
get {
return startLocation;
}
}
string literalValue;
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (StartLocation.Line, StartLocation.Column + literalValue.Length);
return new TextLocation (StartLocation.Line, StartLocation.Column + literalValue.Length);
}
}
@ -69,7 +69,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -69,7 +69,7 @@ namespace ICSharpCode.NRefactory.CSharp
this.literalValue = literalValue ?? "";
}
public PrimitiveExpression (object value, AstLocation startLocation, string literalValue)
public PrimitiveExpression (object value, TextLocation startLocation, string literalValue)
{
this.Value = value;
this.startLocation = startLocation;
@ -77,7 +77,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -77,7 +77,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
#region IRelocationable implementation
void IRelocatable.SetStartLocation (AstLocation startLocation)
void IRelocatable.SetStartLocation (TextLocation startLocation)
{
this.startLocation = startLocation;
}

10
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/QueryExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/QueryExpression.cs

@ -104,7 +104,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -104,7 +104,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, TextLocation.Empty));
}
}
@ -139,7 +139,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -139,7 +139,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, TextLocation.Empty));
}
}
@ -176,7 +176,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -176,7 +176,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole(Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value, TextLocation.Empty));
}
}
@ -264,7 +264,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -264,7 +264,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole(JoinIdentifierRole).Name;
}
set {
SetChildByRole(JoinIdentifierRole, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(JoinIdentifierRole, Identifier.Create (value, TextLocation.Empty));
}
}
@ -308,7 +308,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -308,7 +308,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (IntoIdentifierRole).Name;
}
set {
SetChildByRole(IntoIdentifierRole, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(IntoIdentifierRole, Identifier.Create (value, TextLocation.Empty));
}
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/SizeOfExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/SizeOfExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/StackAllocExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/StackAllocExpression.cs

8
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ThisReferenceExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ThisReferenceExpression.cs

@ -31,19 +31,19 @@ namespace ICSharpCode.NRefactory.CSharp @@ -31,19 +31,19 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary>
public class ThisReferenceExpression : Expression
{
public AstLocation Location {
public TextLocation Location {
get;
set;
}
public override AstLocation StartLocation {
public override TextLocation StartLocation {
get {
return Location;
}
}
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (Location.Line, Location.Column + "this".Length);
return new TextLocation (Location.Line, Location.Column + "this".Length);
}
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeOfExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeOfExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeReferenceExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeReferenceExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UnaryOperatorExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UncheckedExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UncheckedExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UndocumentedExpression.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UndocumentedExpression.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/Attribute.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/AttributeSection.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs

14
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/Comment.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Comment.cs

@ -55,15 +55,15 @@ namespace ICSharpCode.NRefactory.CSharp @@ -55,15 +55,15 @@ namespace ICSharpCode.NRefactory.CSharp
set;
}
AstLocation startLocation;
public override AstLocation StartLocation {
TextLocation startLocation;
public override TextLocation StartLocation {
get {
return startLocation;
}
}
AstLocation endLocation;
public override AstLocation EndLocation {
TextLocation endLocation;
public override TextLocation EndLocation {
get {
return endLocation;
}
@ -75,7 +75,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -75,7 +75,7 @@ namespace ICSharpCode.NRefactory.CSharp
this.Content = content;
}
public Comment (CommentType commentType, AstLocation startLocation, AstLocation endLocation)
public Comment (CommentType commentType, TextLocation startLocation, TextLocation endLocation)
{
this.CommentType = commentType;
this.startLocation = startLocation;
@ -83,10 +83,10 @@ namespace ICSharpCode.NRefactory.CSharp @@ -83,10 +83,10 @@ namespace ICSharpCode.NRefactory.CSharp
}
#region IRelocationable implementation
void IRelocatable.SetStartLocation (AstLocation startLocation)
void IRelocatable.SetStartLocation (TextLocation startLocation)
{
int lineDelta = startLocation.Line - this.startLocation.Line;
endLocation = new AstLocation (endLocation.Line + lineDelta, lineDelta != 0 ? endLocation.Column : endLocation.Column + startLocation.Column - this.startLocation.Column);
endLocation = new TextLocation (endLocation.Line + lineDelta, lineDelta != 0 ? endLocation.Column : endLocation.Column + startLocation.Column - this.startLocation.Column);
this.startLocation = startLocation;
}
#endregion

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/Constraint.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Constraint.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// Constraint.cs
//
// Author:
@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/DelegateDeclaration.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// DelegateDeclaration.cs
//
// Author:
@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole (Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole (Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/ExternAliasDeclaration.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/ExternAliasDeclaration.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// ExternAliasDeclaration.cs
//
// Author:
@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole (Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole (Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/NamespaceDeclaration.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// NamespaceDeclaration.cs
//
// Author:
@ -54,7 +54,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -54,7 +54,7 @@ namespace ICSharpCode.NRefactory.CSharp
return builder.ToString ();
}
set {
GetChildrenByRole(Roles.Identifier).ReplaceWith(value.Split('.').Select(ident => Identifier.Create (ident, AstLocation.Empty)));
GetChildrenByRole(Roles.Identifier).ReplaceWith(value.Split('.').Select(ident => Identifier.Create (ident, TextLocation.Empty)));
}
}

2
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/TypeDeclaration.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs

@ -63,7 +63,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -63,7 +63,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole (Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole (Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

2
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs

@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

8
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// UsingAliasDeclaration.cs
//
// Author:
@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (AliasRole).Name;
}
set {
SetChildByRole(AliasRole, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(AliasRole, Identifier.Create (value, TextLocation.Empty));
}
}
@ -72,13 +72,13 @@ namespace ICSharpCode.NRefactory.CSharp @@ -72,13 +72,13 @@ namespace ICSharpCode.NRefactory.CSharp
public UsingAliasDeclaration (string alias, string nameSpace)
{
AddChild (Identifier.Create (alias, AstLocation.Empty), AliasRole);
AddChild (Identifier.Create (alias, TextLocation.Empty), AliasRole);
AddChild (new SimpleType (nameSpace), ImportRole);
}
public UsingAliasDeclaration (string alias, AstType import)
{
AddChild (Identifier.Create (alias, AstLocation.Empty), AliasRole);
AddChild (Identifier.Create (alias, TextLocation.Empty), AliasRole);
AddChild (import, ImportRole);
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingDeclaration.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingDeclaration.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/IAstVisitor.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/IRelocatable.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/IRelocatable.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// IRelocationable.cs
//
// Author:
@ -29,7 +29,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -29,7 +29,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
public interface IRelocatable
{
void SetStartLocation (AstLocation startLocation);
void SetStartLocation (TextLocation startLocation);
}
}

24
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Identifier.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs

@ -66,8 +66,8 @@ namespace ICSharpCode.NRefactory.CSharp @@ -66,8 +66,8 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
AstLocation startLocation;
public override AstLocation StartLocation {
TextLocation startLocation;
public override TextLocation StartLocation {
get {
return startLocation;
}
@ -81,15 +81,15 @@ namespace ICSharpCode.NRefactory.CSharp @@ -81,15 +81,15 @@ namespace ICSharpCode.NRefactory.CSharp
}
#region IRelocationable implementation
void IRelocatable.SetStartLocation (AstLocation startLocation)
void IRelocatable.SetStartLocation (TextLocation startLocation)
{
this.startLocation = startLocation;
}
#endregion
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (StartLocation.Line, StartLocation.Column + (Name ?? "").Length);
return new TextLocation (StartLocation.Line, StartLocation.Column + (Name ?? "").Length);
}
}
@ -98,7 +98,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -98,7 +98,7 @@ namespace ICSharpCode.NRefactory.CSharp
this.name = string.Empty;
}
protected Identifier (string name, AstLocation location)
protected Identifier (string name, TextLocation location)
{
if (name == null)
throw new ArgumentNullException("name");
@ -108,10 +108,10 @@ namespace ICSharpCode.NRefactory.CSharp @@ -108,10 +108,10 @@ namespace ICSharpCode.NRefactory.CSharp
public static Identifier Create (string name)
{
return Create (name, AstLocation.Empty);
return Create (name, TextLocation.Empty);
}
public static Identifier Create (string name, AstLocation location)
public static Identifier Create (string name, TextLocation location)
{
if (name == null)
throw new ArgumentNullException("name");
@ -120,7 +120,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -120,7 +120,7 @@ namespace ICSharpCode.NRefactory.CSharp
return new Identifier (name, location);
}
public static Identifier Create (string name, AstLocation location, bool isVerbatim)
public static Identifier Create (string name, TextLocation location, bool isVerbatim)
{
if (name == null)
throw new ArgumentNullException("name");
@ -143,9 +143,9 @@ namespace ICSharpCode.NRefactory.CSharp @@ -143,9 +143,9 @@ namespace ICSharpCode.NRefactory.CSharp
class VerbatimIdentifier : Identifier
{
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (StartLocation.Line, StartLocation.Column + (Name ?? "").Length + 1); // @"..."
return new TextLocation (StartLocation.Line, StartLocation.Column + (Name ?? "").Length + 1); // @"..."
}
}
@ -155,7 +155,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -155,7 +155,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
public VerbatimIdentifier(string name, AstLocation location) : base (name, location)
public VerbatimIdentifier(string name, TextLocation location) : base (name, location)
{
}
}

54
src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/IdentifierExpressionBackreference.cs

@ -0,0 +1,54 @@ @@ -0,0 +1,54 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Linq;
using ICSharpCode.NRefactory.PatternMatching;
namespace ICSharpCode.NRefactory.CSharp
{
/// <summary>
/// Matches identifier expressions that have the same identifier as the referenced variable/type definition/method definition.
/// </summary>
public class IdentifierExpressionBackreference : Pattern
{
readonly string referencedGroupName;
public string ReferencedGroupName {
get { return referencedGroupName; }
}
public IdentifierExpressionBackreference(string referencedGroupName)
{
if (referencedGroupName == null)
throw new ArgumentNullException("referencedGroupName");
this.referencedGroupName = referencedGroupName;
}
public override bool DoMatch(INode other, Match match)
{
CSharp.IdentifierExpression ident = other as CSharp.IdentifierExpression;
if (ident == null || ident.TypeArguments.Any())
return false;
CSharp.AstNode referenced = (CSharp.AstNode)match.Get(referencedGroupName).Last();
if (referenced == null)
return false;
return ident.Identifier == referenced.GetChildByRole(CSharp.AstNode.Roles.Identifier).Name;
}
}
}

6
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/MemberType.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/MemberType.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// FullTypeName.cs
//
// Author:
@ -47,7 +47,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -47,7 +47,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole (Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole (Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}
@ -109,7 +109,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -109,7 +109,7 @@ namespace ICSharpCode.NRefactory.CSharp
b.Append(this.MemberName);
if (this.TypeArguments.Any()) {
b.Append('<');
b.Append(DotNet35Compat.StringJoin(", ", this.TypeArguments));
b.Append(string.Join(", ", this.TypeArguments));
b.Append('>');
}
return b.ToString();

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Modifiers.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Modifiers.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/NodeType.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/NodeType.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/ObservableAstVisitor.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs

12
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/PrimitiveType.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/PrimitiveType.cs

@ -32,7 +32,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -32,7 +32,7 @@ namespace ICSharpCode.NRefactory.CSharp
public class PrimitiveType : AstType, IRelocatable
{
public string Keyword { get; set; }
public AstLocation Location { get; set; }
public TextLocation Location { get; set; }
public PrimitiveType()
{
@ -43,26 +43,26 @@ namespace ICSharpCode.NRefactory.CSharp @@ -43,26 +43,26 @@ namespace ICSharpCode.NRefactory.CSharp
this.Keyword = keyword;
}
public PrimitiveType(string keyword, AstLocation location)
public PrimitiveType(string keyword, TextLocation location)
{
this.Keyword = keyword;
this.Location = location;
}
public override AstLocation StartLocation {
public override TextLocation StartLocation {
get {
return Location;
}
}
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (Location.Line, Location.Column + (Keyword != null ? Keyword.Length : 0));
return new TextLocation (Location.Line, Location.Column + (Keyword != null ? Keyword.Length : 0));
}
}
#region IRelocationable implementation
void IRelocatable.SetStartLocation (AstLocation startLocation)
void IRelocatable.SetStartLocation (TextLocation startLocation)
{
this.Location = startLocation;
}

8
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/SimpleType.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/SimpleType.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// FullTypeName.cs
//
// Author:
@ -42,7 +42,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -42,7 +42,7 @@ namespace ICSharpCode.NRefactory.CSharp
this.Identifier = identifier;
}
public SimpleType(string identifier, AstLocation location)
public SimpleType(string identifier, TextLocation location)
{
SetChildByRole (Roles.Identifier, CSharp.Identifier.Create (identifier, location));
}
@ -64,7 +64,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -64,7 +64,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole (Roles.Identifier, CSharp.Identifier.Create (value, AstLocation.Empty));
SetChildByRole (Roles.Identifier, CSharp.Identifier.Create (value, TextLocation.Empty));
}
}
@ -97,7 +97,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -97,7 +97,7 @@ namespace ICSharpCode.NRefactory.CSharp
StringBuilder b = new StringBuilder(this.Identifier);
if (this.TypeArguments.Any()) {
b.Append('<');
b.Append(DotNet35Compat.StringJoin(", ", this.TypeArguments));
b.Append(string.Join(", ", this.TypeArguments));
b.Append('>');
}
return b.ToString();

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/BlockStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/BreakStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/CheckedStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/CheckedStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/ContinueStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ContinueStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/DoWhileStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/DoWhileStatement.cs

12
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/EmptyStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// EmptyStatement.cs
//
// Author:
@ -31,25 +31,25 @@ namespace ICSharpCode.NRefactory.CSharp @@ -31,25 +31,25 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary>
public class EmptyStatement : Statement, IRelocatable
{
public AstLocation Location {
public TextLocation Location {
get;
set;
}
public override AstLocation StartLocation {
public override TextLocation StartLocation {
get {
return Location;
}
}
public override AstLocation EndLocation {
public override TextLocation EndLocation {
get {
return new AstLocation (Location.Line, Location.Column);
return new TextLocation (Location.Line, Location.Column);
}
}
#region IRelocationable implementation
void IRelocatable.SetStartLocation (AstLocation startLocation)
void IRelocatable.SetStartLocation (TextLocation startLocation)
{
this.Location = startLocation;
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/ExpressionStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ExpressionStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/FixedStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/FixedStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/ForStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForStatement.cs

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/ForeachStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForeachStatement.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// ForeachStatement.cs
//
// Author:
@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/GotoStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/GotoStatement.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// GotoStatement.cs
//
// Author:
@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp
if (string.IsNullOrEmpty(value))
SetChildByRole(Roles.Identifier, null);
else
SetChildByRole(Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/IfElseStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/LabelStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/LabelStatement.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// LabelStatement.cs
//
// Author:
@ -36,7 +36,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -36,7 +36,7 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildByRole (Roles.Identifier).Name;
}
set {
SetChildByRole(Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole(Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/LockStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/LockStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/ReturnStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ReturnStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/Statement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/Statement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/SwitchStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/ThrowStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ThrowStatement.cs

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/TryCatchStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/TryCatchStatement.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// TryCatchStatement.cs
//
// Author:
@ -140,7 +140,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -140,7 +140,7 @@ namespace ICSharpCode.NRefactory.CSharp
if (string.IsNullOrEmpty(value))
SetChildByRole (Roles.Identifier, null);
else
SetChildByRole (Roles.Identifier, Identifier.Create (value, AstLocation.Empty));
SetChildByRole (Roles.Identifier, Identifier.Create (value, TextLocation.Empty));
}
}

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/UncheckedStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/UncheckedStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/UnsafeStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/UnsafeStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/UsingStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/UsingStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/VariableDeclarationStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/VariableDeclarationStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/WhileStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/WhileStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/YieldBreakStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldBreakStatement.cs

0
src/Libraries/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/Statements/YieldStatement.cs → src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldStatement.cs

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save