Browse Source

r7317@daniel-notebook (orig r3348): daniel | 2008-08-14 13:28:28 +0200

Fixed parsing of in-place arrays "unsafe fixed byte name[100];"


git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3350 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
62d696d1ee
  1. 1833
      src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs
  2. 9
      src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG

1833
src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs

File diff suppressed because it is too large Load Diff

9
src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG

@ -731,7 +731,6 @@ StructMemberDecl<ModifierList m, List<AttributeSection> attributes> @@ -731,7 +731,6 @@ StructMemberDecl<ModifierList m, List<AttributeSection> attributes>
Expression expr;
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
Statement stmt = null;
List<VariableDeclaration> variableDeclarators = new List<VariableDeclaration>();
List<TemplateDefinition> templates = new List<TemplateDefinition>();
TypeReference explicitInterface = null;
bool isExtensionMethod = false;
@ -918,14 +917,14 @@ StructMemberDecl<ModifierList m, List<AttributeSection> attributes> @@ -918,14 +917,14 @@ StructMemberDecl<ModifierList m, List<AttributeSection> attributes>
( IF (m.Contains(Modifiers.Fixed))
VariableDeclarator<fd>
"["
Expr<out expr> (. if (variableDeclarators.Count > 0)
variableDeclarators[variableDeclarators.Count-1].FixedArrayInitialization = expr; .)
Expr<out expr> (. if (fd.Fields.Count > 0)
fd.Fields[fd.Fields.Count-1].FixedArrayInitialization = expr; .)
"]"
{ ","
VariableDeclarator<fd>
"["
Expr<out expr> (. if (variableDeclarators.Count > 0)
variableDeclarators[variableDeclarators.Count-1].FixedArrayInitialization = expr; .)
Expr<out expr> (. if (fd.Fields.Count > 0)
fd.Fields[fd.Fields.Count-1].FixedArrayInitialization = expr; .)
"]"
}
| /* non-fixed field */

Loading…
Cancel
Save