Browse Source

reimplement some helper methods

pull/254/head
Siegfried Pammer 14 years ago
parent
commit
04460cc7d1
  1. 30
      NRefactory/ICSharpCode.NRefactory.VB/Ast/Statements/BlockStatement.cs

30
NRefactory/ICSharpCode.NRefactory.VB/Ast/Statements/BlockStatement.cs

@ -88,28 +88,26 @@ namespace ICSharpCode.NRefactory.VB.Ast
AddChild(statement, StatementRole); AddChild(statement, StatementRole);
} }
// TODO : uncomment public void Add(Expression expression)
{
AddChild(new ExpressionStatement { Expression = expression }, StatementRole);
}
// public void Add(Expression expression)
// {
// AddChild(new ExpressionStatement { Expression = expression }, StatementRole);
// }
//
public void AddRange(IEnumerable<Statement> statements) public void AddRange(IEnumerable<Statement> statements)
{ {
foreach (Statement st in statements) foreach (Statement st in statements)
AddChild(st, StatementRole); AddChild(st, StatementRole);
} }
// public void AddAssignment(Expression left, Expression right) public void AddAssignment(Expression left, Expression right)
// { {
// Add(new AssignmentExpression { Left = left, Operator = AssignmentOperatorType.Assign, Right = right }); Add(new AssignmentExpression(left, AssignmentOperatorType.Assign, right));
// } }
//
// public void AddReturnStatement(Expression expression) public void AddReturnStatement(Expression expression)
// { {
// Add(new ReturnStatement { Expression = expression }); Add(new ReturnStatement { Expression = expression });
// } }
#endregion #endregion
IEnumerator<Statement> IEnumerable<Statement>.GetEnumerator() IEnumerator<Statement> IEnumerable<Statement>.GetEnumerator()
@ -122,6 +120,4 @@ namespace ICSharpCode.NRefactory.VB.Ast
return this.Statements.GetEnumerator(); return this.Statements.GetEnumerator();
} }
} }
} }

Loading…
Cancel
Save