Browse Source

remove old files

pull/262/head
Siegfried Pammer 14 years ago
parent
commit
31e71509fd
  1. 92
      NRefactory/ICSharpCode.NRefactory.VB/AstBuilder/ExpressionBuilder.cs
  2. 55
      NRefactory/ICSharpCode.NRefactory.VB/AstBuilder/StatementBuilder.cs
  3. 6
      NRefactory/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj
  4. 2078
      NRefactory/ICSharpCode.NRefactory.VB/Visitors/AbstractAstTransformer.cs
  5. 1156
      NRefactory/ICSharpCode.NRefactory.VB/Visitors/AbstractAstVisitor.cs
  6. 1266
      NRefactory/ICSharpCode.NRefactory.VB/Visitors/NodeTrackingAstVisitor.cs

92
NRefactory/ICSharpCode.NRefactory.VB/AstBuilder/ExpressionBuilder.cs

@ -1,92 +0,0 @@ @@ -1,92 +0,0 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using ICSharpCode.NRefactory.VB.Ast;
namespace ICSharpCode.NRefactory.VB.AstBuilder
{
/// <summary>
/// Extension methods for NRefactory.Dom.Expression.
/// </summary>
public static class ExpressionBuilder
{/*
public static SimpleNameExpression Identifier(string identifier)
{
return new SimpleNameExpression(identifier);
}
public static MemberReferenceExpression Member(this Expression targetObject, string memberName)
{
if (targetObject == null)
throw new ArgumentNullException("targetObject");
return new MemberReferenceExpression(targetObject, memberName);
}
public static InvocationExpression Call(this Expression callTarget, string methodName, params Expression[] arguments)
{
if (callTarget == null)
throw new ArgumentNullException("callTarget");
return Call(Member(callTarget, methodName), arguments);
}
public static InvocationExpression Call(this Expression callTarget, params Expression[] arguments)
{
if (callTarget == null)
throw new ArgumentNullException("callTarget");
if (arguments == null)
throw new ArgumentNullException("arguments");
return new InvocationExpression(callTarget, new List<Expression>(arguments));
}
public static ObjectCreateExpression New(this TypeReference createType, params Expression[] arguments)
{
if (createType == null)
throw new ArgumentNullException("createType");
if (arguments == null)
throw new ArgumentNullException("arguments");
return new ObjectCreateExpression(createType, new List<Expression>(arguments));
}
public static Expression CreateDefaultValueForType(TypeReference type)
{
if (type != null && !type.IsArrayType) {
switch (type.Type) {
case "System.SByte":
case "System.Byte":
case "System.Int16":
case "System.UInt16":
case "System.Int32":
case "System.UInt32":
case "System.Int64":
case "System.UInt64":
case "System.Single":
case "System.Double":
return new PrimitiveExpression(0, "0");
case "System.Char":
return new PrimitiveExpression('\0', "'\\0'");
case "System.Object":
case "System.String":
return new PrimitiveExpression(null, "null");
case "System.Boolean":
return new PrimitiveExpression(false, "false");
default:
return new DefaultValueExpression(type);
}
} else {
return new PrimitiveExpression(null, "null");
}
}
/// <summary>
/// Just calls the BinaryOperatorExpression constructor,
/// but being an extension method; this allows for a nicer
/// infix syntax in some cases.
/// </summary>
public static BinaryOperatorExpression Operator(this Expression left, BinaryOperatorType op, Expression right)
{
return new BinaryOperatorExpression(left, op, right);
}*/
}
}

55
NRefactory/ICSharpCode.NRefactory.VB/AstBuilder/StatementBuilder.cs

@ -1,55 +0,0 @@ @@ -1,55 +0,0 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using ICSharpCode.NRefactory.VB.Ast;
namespace ICSharpCode.NRefactory.VB.AstBuilder
{
/// <summary>
/// Extension methods for NRefactory.Dom.Expression.
/// </summary>
// public static class StatementBuilder
// {
// public static void AddStatement(this BlockStatement block, Statement statement)
// {
// if (block == null)
// throw new ArgumentNullException("block");
// if (statement == null)
// throw new ArgumentNullException("statement");
// block.AddChild(statement);
// statement.Parent = block;
// }
//
// public static void AddStatement(this BlockStatement block, Expression expressionStatement)
// {
// if (expressionStatement == null)
// throw new ArgumentNullException("expressionStatement");
// AddStatement(block, new ExpressionStatement(expressionStatement));
// }
//
// public static void Throw(this BlockStatement block, Expression expression)
// {
// if (expression == null)
// throw new ArgumentNullException("expression");
// AddStatement(block, new ThrowStatement(expression));
// }
//
// public static void Return(this BlockStatement block, Expression expression)
// {
// if (expression == null)
// throw new ArgumentNullException("expression");
// AddStatement(block, new ReturnStatement(expression));
// }
//
// public static void Assign(this BlockStatement block, Expression left, Expression right)
// {
// if (left == null)
// throw new ArgumentNullException("left");
// if (right == null)
// throw new ArgumentNullException("right");
// AddStatement(block, new AssignmentExpression(left, AssignmentOperatorType.Assign, right));
// }
// }
}

6
NRefactory/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj

@ -45,8 +45,6 @@ @@ -45,8 +45,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AstBuilder\ExpressionBuilder.cs" />
<Compile Include="AstBuilder\StatementBuilder.cs" />
<Compile Include="Ast\AstLocation.cs" />
<Compile Include="Ast\AstNode.cs" />
<Compile Include="Ast\AstNodeCollection.cs" />
@ -180,14 +178,10 @@ @@ -180,14 +178,10 @@
<Compile Include="PrettyPrinter\VBNet\VBNetPrettyPrintOptions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VBParser.cs" />
<Compile Include="Visitors\AbstractAstTransformer.cs" />
<Compile Include="Visitors\AbstractAstVisitor.cs" />
<Compile Include="Visitors\CSharpToVBConverterVisitor.cs" />
<Compile Include="Visitors\NodeTrackingAstVisitor.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Ast" />
<Folder Include="AstBuilder" />
<Folder Include="Ast\General" />
<Folder Include="Ast\GlobalScope" />
<Folder Include="Ast\Expressions" />

2078
NRefactory/ICSharpCode.NRefactory.VB/Visitors/AbstractAstTransformer.cs

File diff suppressed because it is too large Load Diff

1156
NRefactory/ICSharpCode.NRefactory.VB/Visitors/AbstractAstVisitor.cs

File diff suppressed because it is too large Load Diff

1266
NRefactory/ICSharpCode.NRefactory.VB/Visitors/NodeTrackingAstVisitor.cs

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save