|
|
@ -314,6 +314,25 @@ namespace ICSharpCode.NRefactory.VB.Visitors |
|
|
|
public AstNode VisitTypeDeclaration(CSharp.TypeDeclaration typeDeclaration, object data) |
|
|
|
public AstNode VisitTypeDeclaration(CSharp.TypeDeclaration typeDeclaration, object data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// TODO add missing features!
|
|
|
|
// TODO add missing features!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (typeDeclaration.ClassType == ClassType.Enum) { |
|
|
|
|
|
|
|
var type = new EnumDeclaration(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ConvertNodes(typeDeclaration.Attributes, type.Attributes); |
|
|
|
|
|
|
|
ConvertNodes(typeDeclaration.ModifierTokens, type.ModifierTokens); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (typeDeclaration.BaseTypes.Any()) { |
|
|
|
|
|
|
|
var first = typeDeclaration.BaseTypes.First(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type.UnderlyingType = (AstType)first.AcceptVisitor(this, data); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type.Name = new Identifier(typeDeclaration.Name, AstLocation.Empty); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ConvertNodes(typeDeclaration.Members, type.Members); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return EndNode(typeDeclaration, type); |
|
|
|
|
|
|
|
} else { |
|
|
|
var type = new TypeDeclaration(); |
|
|
|
var type = new TypeDeclaration(); |
|
|
|
|
|
|
|
|
|
|
|
CSharp.Attribute stdModAttr; |
|
|
|
CSharp.Attribute stdModAttr; |
|
|
@ -348,6 +367,7 @@ namespace ICSharpCode.NRefactory.VB.Visitors |
|
|
|
|
|
|
|
|
|
|
|
return EndNode(typeDeclaration, type); |
|
|
|
return EndNode(typeDeclaration, type); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public AstNode VisitUsingAliasDeclaration(CSharp.UsingAliasDeclaration usingAliasDeclaration, object data) |
|
|
|
public AstNode VisitUsingAliasDeclaration(CSharp.UsingAliasDeclaration usingAliasDeclaration, object data) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -565,7 +585,13 @@ namespace ICSharpCode.NRefactory.VB.Visitors |
|
|
|
|
|
|
|
|
|
|
|
public AstNode VisitEnumMemberDeclaration(CSharp.EnumMemberDeclaration enumMemberDeclaration, object data) |
|
|
|
public AstNode VisitEnumMemberDeclaration(CSharp.EnumMemberDeclaration enumMemberDeclaration, object data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
throw new NotImplementedException(); |
|
|
|
var result = new EnumMemberDeclaration(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ConvertNodes(enumMemberDeclaration.Attributes, result.Attributes); |
|
|
|
|
|
|
|
result.Name = new Identifier(enumMemberDeclaration.Name, AstLocation.Empty); |
|
|
|
|
|
|
|
result.Value = (Expression)enumMemberDeclaration.Initializer.AcceptVisitor(this, data); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return EndNode(enumMemberDeclaration, result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public AstNode VisitEventDeclaration(CSharp.EventDeclaration eventDeclaration, object data) |
|
|
|
public AstNode VisitEventDeclaration(CSharp.EventDeclaration eventDeclaration, object data) |
|
|
|