Browse Source

- Modified the InitializerPeepholeTransforms' Array Initializers to do a forward scan of the block instead of just checking the next instruction. The next-instruction thing breaks down under the case where you have an array-of-arrays (int[][]) - Added to the InitializerPeepholeTransforms' Array Initializers to detect the creation of a multi-dimensional array (int[,]) - Modified the ILCode.InitArray contract to take an ArrayType instead of just the element type, and passing with the ArrayType.Dimensions set accordingly. - AstMethodBodyBuilder now used the ArrayType.Dimensions info to build a tree of ArrayInitializerExpressions from the raw, element-by-element list. - Fixed OutputVisitor not calling StartNode for EmptyExpressions

Known issues:
- ArrayCreateExpression outputs extra space in the array specifier when using EmptyExpressions, ala: "new int[][, ]"
- The tree of ArrayInitializerExpressions outputs with blank lines before and after each block.
newNRvisualizers
Alex Lyman 14 years ago committed by Daniel Grunwald
parent
commit
5c3be8f4cc
  1. 1
      ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

1
ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

@ -838,6 +838,7 @@ namespace ICSharpCode.NRefactory.CSharp
public object VisitEmptyExpression (EmptyExpression emptyExpression, object data) public object VisitEmptyExpression (EmptyExpression emptyExpression, object data)
{ {
StartNode(emptyExpression);
return EndNode (emptyExpression); return EndNode (emptyExpression);
} }
#region VisitPrimitiveExpression #region VisitPrimitiveExpression

Loading…
Cancel
Save