mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
NodeType was NRefactory's coarse node category, but only three reads remained here: two checks now expressed as "is not Trivia" and one debug assert for the pattern category. Remove the enum, the abstract property, every per-node override, and the generator's emission, preserving the pattern-placeholder case through an IPatternPlaceholder marker interface the output-visitor assert checks. Also remove the unused PrimitiveExpression.AdvanceLocation helper. Assisted-by: Claude:claude-opus-4-8:Claude Codepull/3807/head
40 changed files with 33 additions and 243 deletions
@ -1,54 +0,0 @@ |
|||||||
//
|
|
||||||
// NodeType.cs
|
|
||||||
//
|
|
||||||
// Author:
|
|
||||||
// Mike Krüger <mkrueger@novell.com>
|
|
||||||
//
|
|
||||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
|
||||||
//
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
namespace ICSharpCode.Decompiler.CSharp.Syntax |
|
||||||
{ |
|
||||||
public enum NodeType |
|
||||||
{ |
|
||||||
Unknown, |
|
||||||
/// <summary>
|
|
||||||
/// AstType
|
|
||||||
/// </summary>
|
|
||||||
TypeReference, |
|
||||||
/// <summary>
|
|
||||||
/// Type or delegate declaration
|
|
||||||
/// </summary>
|
|
||||||
TypeDeclaration, |
|
||||||
Member, |
|
||||||
Statement, |
|
||||||
Expression, |
|
||||||
Token, |
|
||||||
QueryClause, |
|
||||||
/// <summary>
|
|
||||||
/// Comment or whitespace or pre-processor directive
|
|
||||||
/// </summary>
|
|
||||||
Whitespace, |
|
||||||
/// <summary>
|
|
||||||
/// Placeholder for a pattern
|
|
||||||
/// </summary>
|
|
||||||
Pattern |
|
||||||
} |
|
||||||
} |
|
||||||
@ -0,0 +1,28 @@ |
|||||||
|
// Copyright (c) 2011-2013 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.
|
||||||
|
|
||||||
|
namespace ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Marker for the generated node that wraps a <see cref="Pattern"/> so it can occupy an AST slot
|
||||||
|
/// (one per node type, each a sealed subclass of its own node, so they share no common node base).
|
||||||
|
/// </summary>
|
||||||
|
public interface IPatternPlaceholder |
||||||
|
{ |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue