Browse Source

fixed bug in EF parser grammar regarding Using statements

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6404 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Siegfried Pammer 15 years ago
parent
commit
6f668e1749
  1. 13
      src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg
  2. 2920
      src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs

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

@ -499,6 +499,7 @@ MemberVariableOrConstantDeclaration = @@ -499,6 +499,7 @@ MemberVariableOrConstantDeclaration =
MemberVariableOrConstantDeclarator =
[ "Const" ]
(. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) IdentifierForFieldDeclaration (. PopContext(); .)
[ "?" ] { "(" [ Expression ] { "," [ Expression ] } ")" }
[ "As" (. PushContext(Context.Type, la, t); .) ( NewExpression | TypeName ) (. PopContext(); .) ]
[ "=" Expression ]
.
@ -1072,10 +1073,10 @@ Statement = @@ -1072,10 +1073,10 @@ Statement =
VariableDeclarationStatement =
( "Dim" | "Static" | "Const" )
(. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .)
Identifier (. PopContext(); .) [ "?" ] [ ( "(" { "," } ")" ) ]
Identifier (. PopContext(); .) [ "?" ] { "(" [ Expression ] { "," [ Expression ] } ")" }
{ ","
(. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .)
Identifier (. PopContext(); .) [ "?" ] [ ( "(" { "," } ")" ) ]
Identifier (. PopContext(); .) [ "?" ] { "(" [ Expression ] { "," [ Expression ] } ")" }
}
[ "As" (. PushContext(Context.Type, la, t); .) ( NewExpression | TypeName ) (. PopContext(); .) ]
[ "=" Expression ]
@ -1228,7 +1229,13 @@ UsingVariable = @@ -1228,7 +1229,13 @@ UsingVariable =
(. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .)
// HACK: needs to be optional because Expression can start with Identifier too
[
"As" (. PushContext(Context.Type, la, t); .) ( NewExpression | TypeName ) (. PopContext(); .) "="
"As" [ EXPECTEDCONFLICT("Where", "UShort", "Until", "Unicode", "ULong", "UInteger", "Text", "Take",
"String", "Skip", "Single", "Short", "SByte", "Preserve", "Out", "Order",
"Off", "Object", "Long", "Key", "Join", "Into", "Integer", "Infer", "Group",
"From", "Explicit", "Equals", "Double", "Distinct", "Descending", "Decimal",
"Date", "Compare", "Char", "Byte", "By", "Boolean", "Binary", "Binary", "Auto",
"Assembly", "Ascending", "Ansi", "Aggregate", ident)
(. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) "=" ]
| "="
| (.
currentState = endOfStatementTerminatorAndBlock; /* leave this block */

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

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