Browse Source

implemented Interfaces and fixed build

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/vbnet@6138 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Siegfried Pammer 16 years ago
parent
commit
f85b849478
  1. 2
      src/AddIns/BackendBindings/VBNetBinding/Test/CodeCompletionTests.cs
  2. 44
      src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg
  3. 6572
      src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs

2
src/AddIns/BackendBindings/VBNetBinding/Test/CodeCompletionTests.cs

@ -28,7 +28,7 @@ namespace ICSharpCode.VBNetBinding.Tests @@ -28,7 +28,7 @@ namespace ICSharpCode.VBNetBinding.Tests
ContainsAll(list.Items.Select(item => item.Text).ToArray(),
"Class", "Delegate", "Friend", "Imports", "Module",
"Namespace", "Option", "Private", "Protected", "Public",
"Shadows", "Structure");
"Shadows", "Structure", "Interface", "Enum");
}
);
}

44
src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg

@ -313,7 +313,8 @@ TypeDeclaration = @@ -313,7 +313,8 @@ TypeDeclaration =
{ TypeModifier }
( ClassOrModuleOrStructureTypeDeclaration |
DelegateTypeDeclaration |
EnumTypeDeclaration )
EnumTypeDeclaration |
InterfaceDeclaration )
.
ClassOrModuleOrStructureTypeDeclaration =
@ -322,7 +323,7 @@ ClassOrModuleOrStructureTypeDeclaration = @@ -322,7 +323,7 @@ ClassOrModuleOrStructureTypeDeclaration =
[ "(" "Of" GenericTypeParameterDeclaration ")" ] StatementTerminator
[ (. isMissingModifier = false; .) "Inherits" { ANY } StatementTerminator ]
[ (. isMissingModifier = false; .) "Implements" { ANY } StatementTerminator ]
{ MemberDeclaration } (. isMissingModifier = false; Console.WriteLine("after {MemberDeclaration}"); .)
{ MemberDeclaration } (. isMissingModifier = false; .)
"End" ( "Module" | "Class" | "Structure" ) StatementTerminator
(. PopContext(); .)
.
@ -333,6 +334,43 @@ EnumTypeDeclaration = @@ -333,6 +334,43 @@ EnumTypeDeclaration =
"End" "Enum" StatementTerminator
.
InterfaceDeclaration =
"Interface" Identifier [ "(" "Of" GenericTypeParameterDeclaration ")" ] StatementTerminator
[ "Inherits" TypeName { "," TypeName } StatementTerminator ]
{
{ AttributeBlock } (.OnEachPossiblePath: isMissingModifier = true; .)
{ TypeAndMemberModifier (. isMissingModifier = false; .) } (. isMissingModifier = false; .)
( ClassOrModuleOrStructureTypeDeclaration | DelegateTypeDeclaration | EnumTypeDeclaration
| InterfaceDeclaration | InterfaceMemberDeclaration )
}
(. isMissingModifier = false; .)
"End" "Interface" StatementTerminator
.
InterfaceMemberDeclaration =
InterfaceEvent | InterfaceProperty | InterfaceSubOrFunction
.
TypeAndMemberModifier =
MemberModifier /* contains all modifiers for types */
.
InterfaceEvent =
"Event" Identifier [ "As" TypeName | "(" [ ParameterList ] ")" ] StatementTerminator
.
InterfaceProperty =
"Property" Identifier [ "(" [ ParameterList ] ")" ] [ "As" { AttributeBlock } TypeName ] StatementTerminator
.
InterfaceSubOrFunction =
("Sub" | "Function")
(. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) ANY (. PopContext(); .)
{ "(" [ ( "Of" GenericTypeParameterDeclaration | ParameterList ) ] ")" }
[ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ]
StatementTerminator
.
GenericConstraint =
TypeName | "New" | "Class" | "Structure"
.
@ -356,7 +394,7 @@ MemberDeclaration = @@ -356,7 +394,7 @@ MemberDeclaration =
(.OnEachPossiblePath: isMissingModifier = true; .)
(. PushContext(Context.Member, la, t); .)
{ AttributeBlock } { MemberModifier (. isMissingModifier = false; .) } (. isMissingModifier = false; .)
(
(
MemberVariableOrConstantDeclaration |
SubOrFunctionDeclaration |
ExternalMemberDeclaration |

6572
src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save