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

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

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

Loading…
Cancel
Save