Browse Source

Fixed SD2-1628 - Incorrect folding for VB.NET functions

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5624 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
ec8557da3d
  1. 2075
      src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs
  2. 5
      src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG
  3. 1
      src/Libraries/NRefactory/Test/Parser/TypeLevel/MethodDeclarationTests.cs

2075
src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs

File diff suppressed because it is too large Load Diff

5
src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG

@ -903,6 +903,7 @@ StructureMemberDecl<ModifierList m, List<AttributeSection> attributes> @@ -903,6 +903,7 @@ StructureMemberDecl<ModifierList m, List<AttributeSection> attributes>
HandlesClause<out handlesClause>
)
]
(. Location endLocation = t.EndLocation; .)
(
/* abstract methods without a body */
IF(IsMustOverride(m))
@ -912,7 +913,7 @@ StructureMemberDecl<ModifierList m, List<AttributeSection> attributes> @@ -912,7 +913,7 @@ StructureMemberDecl<ModifierList m, List<AttributeSection> attributes>
Name = name, Modifier = m.Modifier, TypeReference = type,
Parameters = p, Attributes = attributes,
StartLocation = m.GetDeclarationLocation(startPos),
EndLocation = t.EndLocation,
EndLocation = endLocation,
HandlesClause = handlesClause,
Templates = templates,
InterfaceImplementations = implementsClause
@ -930,7 +931,7 @@ StructureMemberDecl<ModifierList m, List<AttributeSection> attributes> @@ -930,7 +931,7 @@ StructureMemberDecl<ModifierList m, List<AttributeSection> attributes>
Name = name, Modifier = m.Modifier, TypeReference = type,
Parameters = p, Attributes = attributes,
StartLocation = m.GetDeclarationLocation(startPos),
EndLocation = t.EndLocation,
EndLocation = endLocation,
Templates = templates,
HandlesClause = handlesClause,
InterfaceImplementations = implementsClause

1
src/Libraries/NRefactory/Test/Parser/TypeLevel/MethodDeclarationTests.cs

@ -312,7 +312,6 @@ namespace ICSharpCode.NRefactory.Tests.Ast @@ -312,7 +312,6 @@ namespace ICSharpCode.NRefactory.Tests.Ast
}
[Test]
[Ignore("End line for function is off by one.")]
public void VBNetFunctionMethodDeclarationTest()
{
const string program = @"public function MyFunction() as Integer

Loading…
Cancel
Save