From 02b066d83385e3017ac247eaa23a290e0a418c33 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 10 May 2012 21:26:54 +0200 Subject: [PATCH 01/22] fix operators in VB Parser - http://community.sharpdevelop.net/forums/t/15791.aspx --- .../Project/Src/Parser/VBNet/Parser.cs | 2774 +++++++++-------- .../Project/Src/Parser/VBNet/VBNET.ATG | 3 + .../Project/Src/Parser/VBNet/VBNetParser.cs | 69 + 3 files changed, 1463 insertions(+), 1383 deletions(-) diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs index 43f8a2d119..6fd33cca4f 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs @@ -1,5 +1,5 @@ -//#line 1 "VBNET.ATG" +#line 1 "VBNET.ATG" using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; @@ -26,7 +26,7 @@ partial class Parser : AbstractParser const bool x = false; -//#line 13 "VBNET.ATG" +#line 13 "VBNET.ATG" /* @@ -35,7 +35,7 @@ partial class Parser : AbstractParser void VBNET() { -//#line 263 "VBNET.ATG" +#line 263 "VBNET.ATG" lexer.NextToken(); // get the first token compilationUnit = new CompilationUnit(); BlockStart(compilationUnit); @@ -56,7 +56,7 @@ partial class Parser : AbstractParser } } while ( -//#line 271 "VBNET.ATG" +#line 271 "VBNET.ATG" IsGlobalAttrTarget()) { GlobalAttributeSection(); while (la.kind == 1 || la.kind == 21) { @@ -83,59 +83,59 @@ IsGlobalAttrTarget()) { void OptionStmt() { -//#line 276 "VBNET.ATG" +#line 276 "VBNET.ATG" INode node = null; bool val = true; Expect(173); -//#line 277 "VBNET.ATG" +#line 277 "VBNET.ATG" Location startPos = t.Location; if (la.kind == 121) { lexer.NextToken(); if (la.kind == 170 || la.kind == 171) { OptionValue( -//#line 279 "VBNET.ATG" +#line 279 "VBNET.ATG" ref val); } -//#line 280 "VBNET.ATG" +#line 280 "VBNET.ATG" node = new OptionDeclaration(OptionType.Explicit, val); } else if (la.kind == 207) { lexer.NextToken(); if (la.kind == 170 || la.kind == 171) { OptionValue( -//#line 282 "VBNET.ATG" +#line 282 "VBNET.ATG" ref val); } -//#line 283 "VBNET.ATG" +#line 283 "VBNET.ATG" node = new OptionDeclaration(OptionType.Strict, val); } else if (la.kind == 87) { lexer.NextToken(); if (la.kind == 67) { lexer.NextToken(); -//#line 285 "VBNET.ATG" +#line 285 "VBNET.ATG" node = new OptionDeclaration(OptionType.CompareBinary, val); } else if (la.kind == 213) { lexer.NextToken(); -//#line 286 "VBNET.ATG" +#line 286 "VBNET.ATG" node = new OptionDeclaration(OptionType.CompareText, val); } else SynErr(241); } else if (la.kind == 139) { lexer.NextToken(); if (la.kind == 170 || la.kind == 171) { OptionValue( -//#line 289 "VBNET.ATG" +#line 289 "VBNET.ATG" ref val); } -//#line 290 "VBNET.ATG" +#line 290 "VBNET.ATG" node = new OptionDeclaration(OptionType.Infer, val); } else SynErr(242); EndOfStmt(); -//#line 294 "VBNET.ATG" +#line 294 "VBNET.ATG" if (node != null) { node.StartLocation = startPos; node.EndLocation = t.Location; @@ -146,33 +146,33 @@ ref val); void ImportsStmt() { -//#line 315 "VBNET.ATG" +#line 315 "VBNET.ATG" List usings = new List(); Expect(137); -//#line 319 "VBNET.ATG" +#line 319 "VBNET.ATG" Location startPos = t.Location; Using u; ImportClause( -//#line 322 "VBNET.ATG" +#line 322 "VBNET.ATG" out u); -//#line 322 "VBNET.ATG" +#line 322 "VBNET.ATG" if (u != null) { usings.Add(u); } while (la.kind == 22) { lexer.NextToken(); ImportClause( -//#line 324 "VBNET.ATG" +#line 324 "VBNET.ATG" out u); -//#line 324 "VBNET.ATG" +#line 324 "VBNET.ATG" if (u != null) { usings.Add(u); } } EndOfStmt(); -//#line 328 "VBNET.ATG" +#line 328 "VBNET.ATG" UsingDeclaration usingDeclaration = new UsingDeclaration(usings); usingDeclaration.StartLocation = startPos; usingDeclaration.EndLocation = t.Location; @@ -183,7 +183,7 @@ out u); void GlobalAttributeSection() { Expect(40); -//#line 2823 "VBNET.ATG" +#line 2826 "VBNET.ATG" Location startPos = t.Location; if (la.kind == 65) { lexer.NextToken(); @@ -191,20 +191,20 @@ out u); lexer.NextToken(); } else SynErr(243); -//#line 2825 "VBNET.ATG" +#line 2828 "VBNET.ATG" string attributeTarget = t.val != null ? t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture) : null; List attributes = new List(); ASTAttribute attribute; Expect(21); Attribute( -//#line 2829 "VBNET.ATG" +#line 2832 "VBNET.ATG" out attribute); -//#line 2829 "VBNET.ATG" +#line 2832 "VBNET.ATG" attributes.Add(attribute); while ( -//#line 2830 "VBNET.ATG" +#line 2833 "VBNET.ATG" NotFinalComma()) { if (la.kind == 22) { lexer.NextToken(); @@ -216,10 +216,10 @@ NotFinalComma()) { Expect(21); } Attribute( -//#line 2830 "VBNET.ATG" +#line 2833 "VBNET.ATG" out attribute); -//#line 2830 "VBNET.ATG" +#line 2833 "VBNET.ATG" attributes.Add(attribute); } if (la.kind == 22) { @@ -228,7 +228,7 @@ out attribute); Expect(39); EndOfStmt(); -//#line 2835 "VBNET.ATG" +#line 2838 "VBNET.ATG" AttributeSection section = new AttributeSection { AttributeTarget = attributeTarget, Attributes = attributes, @@ -241,7 +241,7 @@ out attribute); void NamespaceMemberDecl() { -//#line 361 "VBNET.ATG" +#line 361 "VBNET.ATG" ModifierList m = new ModifierList(); AttributeSection section; List attributes = new List(); @@ -250,14 +250,14 @@ out attribute); if (la.kind == 160) { lexer.NextToken(); -//#line 368 "VBNET.ATG" +#line 368 "VBNET.ATG" Location startPos = t.Location; Qualident( -//#line 370 "VBNET.ATG" +#line 370 "VBNET.ATG" out qualident); -//#line 372 "VBNET.ATG" +#line 372 "VBNET.ATG" INode node = new NamespaceDeclaration(qualident); node.StartLocation = startPos; AddChild(node); @@ -266,67 +266,67 @@ out qualident); EndOfStmt(); NamespaceBody(); -//#line 380 "VBNET.ATG" +#line 380 "VBNET.ATG" node.EndLocation = t.Location; BlockEnd(); } else if (StartOf(2)) { while (la.kind == 40) { AttributeSection( -//#line 384 "VBNET.ATG" +#line 384 "VBNET.ATG" out section); -//#line 384 "VBNET.ATG" +#line 384 "VBNET.ATG" attributes.Add(section); } while (StartOf(3)) { TypeModifier( -//#line 385 "VBNET.ATG" +#line 385 "VBNET.ATG" m); } NonModuleDeclaration( -//#line 385 "VBNET.ATG" +#line 385 "VBNET.ATG" m, attributes); } else SynErr(245); } void OptionValue( -//#line 302 "VBNET.ATG" +#line 302 "VBNET.ATG" ref bool val) { if (la.kind == 171) { lexer.NextToken(); -//#line 304 "VBNET.ATG" +#line 304 "VBNET.ATG" val = true; } else if (la.kind == 170) { lexer.NextToken(); -//#line 306 "VBNET.ATG" +#line 306 "VBNET.ATG" val = false; } else SynErr(246); } void ImportClause( -//#line 335 "VBNET.ATG" +#line 335 "VBNET.ATG" out Using u) { -//#line 337 "VBNET.ATG" +#line 337 "VBNET.ATG" string qualident = null; TypeReference aliasedType = null; u = null; if (StartOf(4)) { Qualident( -//#line 342 "VBNET.ATG" +#line 342 "VBNET.ATG" out qualident); if (la.kind == 20) { lexer.NextToken(); TypeName( -//#line 343 "VBNET.ATG" +#line 343 "VBNET.ATG" out aliasedType); } -//#line 345 "VBNET.ATG" +#line 345 "VBNET.ATG" if (qualident != null && qualident.Length > 0) { if (aliasedType != null) { u = new Using(qualident, aliasedType); @@ -337,64 +337,64 @@ out aliasedType); } else if (la.kind == 10) { -//#line 353 "VBNET.ATG" +#line 353 "VBNET.ATG" string prefix = null; lexer.NextToken(); Identifier(); -//#line 354 "VBNET.ATG" +#line 354 "VBNET.ATG" prefix = t.val; Expect(20); Expect(3); -//#line 354 "VBNET.ATG" +#line 354 "VBNET.ATG" u = new Using(t.literalValue as string, prefix); Expect(11); } else SynErr(247); } void Qualident( -//#line 3623 "VBNET.ATG" +#line 3626 "VBNET.ATG" out string qualident) { -//#line 3625 "VBNET.ATG" +#line 3628 "VBNET.ATG" string name; qualidentBuilder.Length = 0; Identifier(); -//#line 3629 "VBNET.ATG" +#line 3632 "VBNET.ATG" qualidentBuilder.Append(t.val); while ( -//#line 3630 "VBNET.ATG" +#line 3633 "VBNET.ATG" DotAndIdentOrKw()) { Expect(26); IdentifierOrKeyword( -//#line 3630 "VBNET.ATG" +#line 3633 "VBNET.ATG" out name); -//#line 3630 "VBNET.ATG" +#line 3633 "VBNET.ATG" qualidentBuilder.Append('.'); qualidentBuilder.Append(name); } -//#line 3632 "VBNET.ATG" +#line 3635 "VBNET.ATG" qualident = qualidentBuilder.ToString(); } void TypeName( -//#line 2694 "VBNET.ATG" +#line 2697 "VBNET.ATG" out TypeReference typeref) { -//#line 2695 "VBNET.ATG" +#line 2698 "VBNET.ATG" ArrayList rank = null; Location startLocation = la.Location; NonArrayTypeName( -//#line 2697 "VBNET.ATG" +#line 2700 "VBNET.ATG" out typeref, false); ArrayTypeModifiers( -//#line 2698 "VBNET.ATG" +#line 2701 "VBNET.ATG" out rank); -//#line 2700 "VBNET.ATG" +#line 2703 "VBNET.ATG" if (typeref != null) { if (rank != null) { typeref.RankSpecifier = (int[])rank.ToArray(typeof(int)); @@ -429,10 +429,10 @@ out rank); } void AttributeSection( -//#line 2901 "VBNET.ATG" +#line 2904 "VBNET.ATG" out AttributeSection section) { -//#line 2903 "VBNET.ATG" +#line 2906 "VBNET.ATG" string attributeTarget = ""; List attributes = new List(); ASTAttribute attribute; @@ -440,22 +440,22 @@ out AttributeSection section) { Expect(40); if ( -//#line 2909 "VBNET.ATG" +#line 2912 "VBNET.ATG" IsLocalAttrTarget()) { if (la.kind == 119) { lexer.NextToken(); -//#line 2910 "VBNET.ATG" +#line 2913 "VBNET.ATG" attributeTarget = "event"; } else if (la.kind == 195) { lexer.NextToken(); -//#line 2911 "VBNET.ATG" +#line 2914 "VBNET.ATG" attributeTarget = "return"; } else { Identifier(); -//#line 2914 "VBNET.ATG" +#line 2917 "VBNET.ATG" string val = t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture); if (val != "field" || val != "method" || val != "module" || val != "param" || @@ -468,20 +468,20 @@ IsLocalAttrTarget()) { Expect(21); } Attribute( -//#line 2924 "VBNET.ATG" +#line 2927 "VBNET.ATG" out attribute); -//#line 2924 "VBNET.ATG" +#line 2927 "VBNET.ATG" attributes.Add(attribute); while ( -//#line 2925 "VBNET.ATG" +#line 2928 "VBNET.ATG" NotFinalComma()) { Expect(22); Attribute( -//#line 2925 "VBNET.ATG" +#line 2928 "VBNET.ATG" out attribute); -//#line 2925 "VBNET.ATG" +#line 2928 "VBNET.ATG" attributes.Add(attribute); } if (la.kind == 22) { @@ -489,7 +489,7 @@ out attribute); } Expect(39); -//#line 2929 "VBNET.ATG" +#line 2932 "VBNET.ATG" section = new AttributeSection { AttributeTarget = attributeTarget, Attributes = attributes, @@ -500,69 +500,69 @@ out attribute); } void TypeModifier( -//#line 3708 "VBNET.ATG" +#line 3711 "VBNET.ATG" ModifierList m) { switch (la.kind) { case 188: { lexer.NextToken(); -//#line 3709 "VBNET.ATG" +#line 3712 "VBNET.ATG" m.Add(Modifiers.Public, t.Location); break; } case 187: { lexer.NextToken(); -//#line 3710 "VBNET.ATG" +#line 3713 "VBNET.ATG" m.Add(Modifiers.Protected, t.Location); break; } case 125: { lexer.NextToken(); -//#line 3711 "VBNET.ATG" +#line 3714 "VBNET.ATG" m.Add(Modifiers.Internal, t.Location); break; } case 185: { lexer.NextToken(); -//#line 3712 "VBNET.ATG" +#line 3715 "VBNET.ATG" m.Add(Modifiers.Private, t.Location); break; } case 200: { lexer.NextToken(); -//#line 3713 "VBNET.ATG" +#line 3716 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); break; } case 199: { lexer.NextToken(); -//#line 3714 "VBNET.ATG" +#line 3717 "VBNET.ATG" m.Add(Modifiers.New, t.Location); break; } case 156: { lexer.NextToken(); -//#line 3715 "VBNET.ATG" +#line 3718 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 166: { lexer.NextToken(); -//#line 3716 "VBNET.ATG" +#line 3719 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 183: { lexer.NextToken(); -//#line 3717 "VBNET.ATG" +#line 3720 "VBNET.ATG" m.Add(Modifiers.Partial, t.Location); break; } @@ -571,21 +571,21 @@ ModifierList m) { } void NonModuleDeclaration( -//#line 455 "VBNET.ATG" +#line 455 "VBNET.ATG" ModifierList m, List attributes) { -//#line 457 "VBNET.ATG" +#line 457 "VBNET.ATG" TypeReference typeRef = null; List baseInterfaces = null; switch (la.kind) { case 84: { -//#line 460 "VBNET.ATG" +#line 460 "VBNET.ATG" m.Check(Modifiers.Classes); lexer.NextToken(); -//#line 463 "VBNET.ATG" +#line 463 "VBNET.ATG" TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); newType.StartLocation = t.Location; AddChild(newType); @@ -595,42 +595,42 @@ ModifierList m, List attributes) { Identifier(); -//#line 470 "VBNET.ATG" +#line 470 "VBNET.ATG" newType.Name = t.val; TypeParameterList( -//#line 471 "VBNET.ATG" +#line 471 "VBNET.ATG" newType.Templates); EndOfStmt(); -//#line 473 "VBNET.ATG" +#line 473 "VBNET.ATG" newType.BodyStartLocation = t.Location; if (la.kind == 140) { ClassBaseType( -//#line 474 "VBNET.ATG" +#line 474 "VBNET.ATG" out typeRef); -//#line 474 "VBNET.ATG" +#line 474 "VBNET.ATG" SafeAdd(newType, newType.BaseTypes, typeRef); } while (la.kind == 136) { TypeImplementsClause( -//#line 475 "VBNET.ATG" +#line 475 "VBNET.ATG" out baseInterfaces); -//#line 475 "VBNET.ATG" +#line 475 "VBNET.ATG" newType.BaseTypes.AddRange(baseInterfaces); } ClassBody( -//#line 476 "VBNET.ATG" +#line 476 "VBNET.ATG" newType); Expect(113); Expect(84); -//#line 477 "VBNET.ATG" +#line 477 "VBNET.ATG" newType.EndLocation = t.EndLocation; EndOfStmt(); -//#line 480 "VBNET.ATG" +#line 480 "VBNET.ATG" BlockEnd(); break; @@ -638,7 +638,7 @@ newType); case 155: { lexer.NextToken(); -//#line 484 "VBNET.ATG" +#line 484 "VBNET.ATG" m.Check(Modifiers.VBModules); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); AddChild(newType); @@ -648,17 +648,17 @@ newType); Identifier(); -//#line 491 "VBNET.ATG" +#line 491 "VBNET.ATG" newType.Name = t.val; EndOfStmt(); -//#line 493 "VBNET.ATG" +#line 493 "VBNET.ATG" newType.BodyStartLocation = t.Location; ModuleBody( -//#line 494 "VBNET.ATG" +#line 494 "VBNET.ATG" newType); -//#line 496 "VBNET.ATG" +#line 496 "VBNET.ATG" BlockEnd(); break; @@ -666,7 +666,7 @@ newType); case 209: { lexer.NextToken(); -//#line 500 "VBNET.ATG" +#line 500 "VBNET.ATG" m.Check(Modifiers.VBStructures); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); AddChild(newType); @@ -676,28 +676,28 @@ newType); Identifier(); -//#line 507 "VBNET.ATG" +#line 507 "VBNET.ATG" newType.Name = t.val; TypeParameterList( -//#line 508 "VBNET.ATG" +#line 508 "VBNET.ATG" newType.Templates); EndOfStmt(); -//#line 510 "VBNET.ATG" +#line 510 "VBNET.ATG" newType.BodyStartLocation = t.Location; while (la.kind == 136) { TypeImplementsClause( -//#line 511 "VBNET.ATG" +#line 511 "VBNET.ATG" out baseInterfaces); -//#line 511 "VBNET.ATG" +#line 511 "VBNET.ATG" newType.BaseTypes.AddRange(baseInterfaces); } StructureBody( -//#line 512 "VBNET.ATG" +#line 512 "VBNET.ATG" newType); -//#line 514 "VBNET.ATG" +#line 514 "VBNET.ATG" BlockEnd(); break; @@ -705,7 +705,7 @@ newType); case 115: { lexer.NextToken(); -//#line 519 "VBNET.ATG" +#line 519 "VBNET.ATG" m.Check(Modifiers.VBEnums); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); newType.StartLocation = m.GetDeclarationLocation(t.Location); @@ -716,26 +716,26 @@ newType); Identifier(); -//#line 527 "VBNET.ATG" +#line 527 "VBNET.ATG" newType.Name = t.val; if (la.kind == 63) { lexer.NextToken(); NonArrayTypeName( -//#line 528 "VBNET.ATG" +#line 528 "VBNET.ATG" out typeRef, false); -//#line 528 "VBNET.ATG" +#line 528 "VBNET.ATG" SafeAdd(newType, newType.BaseTypes, typeRef); } EndOfStmt(); -//#line 530 "VBNET.ATG" +#line 530 "VBNET.ATG" newType.BodyStartLocation = t.Location; EnumBody( -//#line 531 "VBNET.ATG" +#line 531 "VBNET.ATG" newType); -//#line 533 "VBNET.ATG" +#line 533 "VBNET.ATG" BlockEnd(); break; @@ -743,7 +743,7 @@ newType); case 142: { lexer.NextToken(); -//#line 538 "VBNET.ATG" +#line 538 "VBNET.ATG" m.Check(Modifiers.VBInterfacs); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); newType.StartLocation = m.GetDeclarationLocation(t.Location); @@ -753,28 +753,28 @@ newType); Identifier(); -//#line 545 "VBNET.ATG" +#line 545 "VBNET.ATG" newType.Name = t.val; TypeParameterList( -//#line 546 "VBNET.ATG" +#line 546 "VBNET.ATG" newType.Templates); EndOfStmt(); -//#line 548 "VBNET.ATG" +#line 548 "VBNET.ATG" newType.BodyStartLocation = t.Location; while (la.kind == 140) { InterfaceBase( -//#line 549 "VBNET.ATG" +#line 549 "VBNET.ATG" out baseInterfaces); -//#line 549 "VBNET.ATG" +#line 549 "VBNET.ATG" newType.BaseTypes.AddRange(baseInterfaces); } InterfaceBody( -//#line 550 "VBNET.ATG" +#line 550 "VBNET.ATG" newType); -//#line 552 "VBNET.ATG" +#line 552 "VBNET.ATG" BlockEnd(); break; @@ -782,7 +782,7 @@ newType); case 103: { lexer.NextToken(); -//#line 557 "VBNET.ATG" +#line 557 "VBNET.ATG" m.Check(Modifiers.VBDelegates); DelegateDeclaration delegateDeclr = new DelegateDeclaration(m.Modifier, attributes); delegateDeclr.ReturnType = new TypeReference("System.Void", true); @@ -793,63 +793,63 @@ newType); lexer.NextToken(); Identifier(); -//#line 564 "VBNET.ATG" +#line 564 "VBNET.ATG" delegateDeclr.Name = t.val; TypeParameterList( -//#line 565 "VBNET.ATG" +#line 565 "VBNET.ATG" delegateDeclr.Templates); if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 566 "VBNET.ATG" +#line 566 "VBNET.ATG" p); } Expect(38); -//#line 566 "VBNET.ATG" +#line 566 "VBNET.ATG" delegateDeclr.Parameters = p; } } else if (la.kind == 127) { lexer.NextToken(); Identifier(); -//#line 568 "VBNET.ATG" +#line 568 "VBNET.ATG" delegateDeclr.Name = t.val; TypeParameterList( -//#line 569 "VBNET.ATG" +#line 569 "VBNET.ATG" delegateDeclr.Templates); if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 570 "VBNET.ATG" +#line 570 "VBNET.ATG" p); } Expect(38); -//#line 570 "VBNET.ATG" +#line 570 "VBNET.ATG" delegateDeclr.Parameters = p; } if (la.kind == 63) { lexer.NextToken(); -//#line 571 "VBNET.ATG" +#line 571 "VBNET.ATG" TypeReference type; TypeName( -//#line 571 "VBNET.ATG" +#line 571 "VBNET.ATG" out type); -//#line 571 "VBNET.ATG" +#line 571 "VBNET.ATG" delegateDeclr.ReturnType = type; } } else SynErr(250); -//#line 573 "VBNET.ATG" +#line 573 "VBNET.ATG" delegateDeclr.EndLocation = t.EndLocation; EndOfStmt(); -//#line 576 "VBNET.ATG" +#line 576 "VBNET.ATG" AddChild(delegateDeclr); break; @@ -859,31 +859,31 @@ out type); } void TypeParameterList( -//#line 389 "VBNET.ATG" +#line 389 "VBNET.ATG" List templates) { -//#line 391 "VBNET.ATG" +#line 391 "VBNET.ATG" TemplateDefinition template; if ( -//#line 395 "VBNET.ATG" +#line 395 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { lexer.NextToken(); Expect(169); TypeParameter( -//#line 396 "VBNET.ATG" +#line 396 "VBNET.ATG" out template); -//#line 398 "VBNET.ATG" +#line 398 "VBNET.ATG" if (template != null) templates.Add(template); while (la.kind == 22) { lexer.NextToken(); TypeParameter( -//#line 401 "VBNET.ATG" +#line 401 "VBNET.ATG" out template); -//#line 403 "VBNET.ATG" +#line 403 "VBNET.ATG" if (template != null) templates.Add(template); } @@ -892,35 +892,35 @@ out template); } void TypeParameter( -//#line 411 "VBNET.ATG" +#line 411 "VBNET.ATG" out TemplateDefinition template) { -//#line 412 "VBNET.ATG" +#line 412 "VBNET.ATG" VarianceModifier modifier = VarianceModifier.Invariant; Location startLocation = la.Location; if (la.kind == 138 || la.kind == 178) { if (la.kind == 138) { lexer.NextToken(); -//#line 415 "VBNET.ATG" +#line 415 "VBNET.ATG" modifier = VarianceModifier.Contravariant; } else { lexer.NextToken(); -//#line 415 "VBNET.ATG" +#line 415 "VBNET.ATG" modifier = VarianceModifier.Covariant; } } Identifier(); -//#line 415 "VBNET.ATG" +#line 415 "VBNET.ATG" template = new TemplateDefinition(t.val, null) { VarianceModifier = modifier }; if (la.kind == 63) { TypeParameterConstraints( -//#line 416 "VBNET.ATG" +#line 416 "VBNET.ATG" template); } -//#line 419 "VBNET.ATG" +#line 419 "VBNET.ATG" if (template != null) { template.StartLocation = startLocation; template.EndLocation = t.EndLocation; @@ -929,141 +929,141 @@ template); } void TypeParameterConstraints( -//#line 427 "VBNET.ATG" +#line 427 "VBNET.ATG" TemplateDefinition template) { -//#line 429 "VBNET.ATG" +#line 429 "VBNET.ATG" TypeReference constraint; Expect(63); if (la.kind == 35) { lexer.NextToken(); TypeParameterConstraint( -//#line 435 "VBNET.ATG" +#line 435 "VBNET.ATG" out constraint); -//#line 435 "VBNET.ATG" +#line 435 "VBNET.ATG" if (constraint != null) { template.Bases.Add(constraint); } while (la.kind == 22) { lexer.NextToken(); TypeParameterConstraint( -//#line 438 "VBNET.ATG" +#line 438 "VBNET.ATG" out constraint); -//#line 438 "VBNET.ATG" +#line 438 "VBNET.ATG" if (constraint != null) { template.Bases.Add(constraint); } } Expect(36); } else if (StartOf(7)) { TypeParameterConstraint( -//#line 441 "VBNET.ATG" +#line 441 "VBNET.ATG" out constraint); -//#line 441 "VBNET.ATG" +#line 441 "VBNET.ATG" if (constraint != null) { template.Bases.Add(constraint); } } else SynErr(252); } void TypeParameterConstraint( -//#line 445 "VBNET.ATG" +#line 445 "VBNET.ATG" out TypeReference constraint) { -//#line 446 "VBNET.ATG" +#line 446 "VBNET.ATG" constraint = null; Location startLocation = la.Location; if (la.kind == 84) { lexer.NextToken(); -//#line 448 "VBNET.ATG" +#line 448 "VBNET.ATG" constraint = TypeReference.ClassConstraint; } else if (la.kind == 209) { lexer.NextToken(); -//#line 449 "VBNET.ATG" +#line 449 "VBNET.ATG" constraint = TypeReference.StructConstraint; } else if (la.kind == 162) { lexer.NextToken(); -//#line 450 "VBNET.ATG" +#line 450 "VBNET.ATG" constraint = TypeReference.NewConstraint; } else if (StartOf(8)) { TypeName( -//#line 451 "VBNET.ATG" +#line 451 "VBNET.ATG" out constraint); } else SynErr(253); } void ClassBaseType( -//#line 797 "VBNET.ATG" +#line 797 "VBNET.ATG" out TypeReference typeRef) { -//#line 799 "VBNET.ATG" +#line 799 "VBNET.ATG" typeRef = null; Expect(140); TypeName( -//#line 802 "VBNET.ATG" +#line 802 "VBNET.ATG" out typeRef); EndOfStmt(); } void TypeImplementsClause( -//#line 1617 "VBNET.ATG" +#line 1620 "VBNET.ATG" out List baseInterfaces) { -//#line 1619 "VBNET.ATG" +#line 1622 "VBNET.ATG" baseInterfaces = new List(); TypeReference type = null; Expect(136); TypeName( -//#line 1622 "VBNET.ATG" +#line 1625 "VBNET.ATG" out type); -//#line 1624 "VBNET.ATG" +#line 1627 "VBNET.ATG" if (type != null) baseInterfaces.Add(type); while (la.kind == 22) { lexer.NextToken(); TypeName( -//#line 1627 "VBNET.ATG" +#line 1630 "VBNET.ATG" out type); -//#line 1628 "VBNET.ATG" +#line 1631 "VBNET.ATG" if (type != null) baseInterfaces.Add(type); } EndOfStmt(); } void ClassBody( -//#line 590 "VBNET.ATG" +#line 590 "VBNET.ATG" TypeDeclaration newType) { -//#line 591 "VBNET.ATG" +#line 591 "VBNET.ATG" AttributeSection section; while (la.kind == 1 || la.kind == 21) { EndOfStmt(); } while (StartOf(9)) { -//#line 594 "VBNET.ATG" +#line 594 "VBNET.ATG" List attributes = new List(); ModifierList m = new ModifierList(); while (la.kind == 40) { AttributeSection( -//#line 597 "VBNET.ATG" +#line 597 "VBNET.ATG" out section); -//#line 597 "VBNET.ATG" +#line 597 "VBNET.ATG" attributes.Add(section); } while (StartOf(10)) { MemberModifier( -//#line 598 "VBNET.ATG" +#line 598 "VBNET.ATG" m); } ClassMemberDecl( -//#line 599 "VBNET.ATG" +#line 599 "VBNET.ATG" m, attributes); while (la.kind == 1 || la.kind == 21) { EndOfStmt(); @@ -1072,35 +1072,35 @@ m, attributes); } void ModuleBody( -//#line 621 "VBNET.ATG" +#line 621 "VBNET.ATG" TypeDeclaration newType) { -//#line 622 "VBNET.ATG" +#line 622 "VBNET.ATG" AttributeSection section; while (la.kind == 1 || la.kind == 21) { EndOfStmt(); } while (StartOf(9)) { -//#line 625 "VBNET.ATG" +#line 625 "VBNET.ATG" List attributes = new List(); ModifierList m = new ModifierList(); while (la.kind == 40) { AttributeSection( -//#line 628 "VBNET.ATG" +#line 628 "VBNET.ATG" out section); -//#line 628 "VBNET.ATG" +#line 628 "VBNET.ATG" attributes.Add(section); } while (StartOf(10)) { MemberModifier( -//#line 629 "VBNET.ATG" +#line 629 "VBNET.ATG" m); } ClassMemberDecl( -//#line 630 "VBNET.ATG" +#line 630 "VBNET.ATG" m, attributes); while (la.kind == 1 || la.kind == 21) { EndOfStmt(); @@ -1109,41 +1109,41 @@ m, attributes); Expect(113); Expect(155); -//#line 633 "VBNET.ATG" +#line 633 "VBNET.ATG" newType.EndLocation = t.EndLocation; EndOfStmt(); } void StructureBody( -//#line 604 "VBNET.ATG" +#line 604 "VBNET.ATG" TypeDeclaration newType) { -//#line 605 "VBNET.ATG" +#line 605 "VBNET.ATG" AttributeSection section; while (la.kind == 1 || la.kind == 21) { EndOfStmt(); } while (StartOf(9)) { -//#line 608 "VBNET.ATG" +#line 608 "VBNET.ATG" List attributes = new List(); ModifierList m = new ModifierList(); while (la.kind == 40) { AttributeSection( -//#line 611 "VBNET.ATG" +#line 611 "VBNET.ATG" out section); -//#line 611 "VBNET.ATG" +#line 611 "VBNET.ATG" attributes.Add(section); } while (StartOf(10)) { MemberModifier( -//#line 612 "VBNET.ATG" +#line 612 "VBNET.ATG" m); } StructureMemberDecl( -//#line 613 "VBNET.ATG" +#line 613 "VBNET.ATG" m, attributes); while (la.kind == 1 || la.kind == 21) { EndOfStmt(); @@ -1152,16 +1152,16 @@ m, attributes); Expect(113); Expect(209); -//#line 616 "VBNET.ATG" +#line 616 "VBNET.ATG" newType.EndLocation = t.EndLocation; EndOfStmt(); } void NonArrayTypeName( -//#line 2722 "VBNET.ATG" +#line 2725 "VBNET.ATG" out TypeReference typeref, bool canBeUnbound) { -//#line 2724 "VBNET.ATG" +#line 2727 "VBNET.ATG" string name; typeref = null; bool isGlobal = false; @@ -1171,36 +1171,36 @@ out TypeReference typeref, bool canBeUnbound) { lexer.NextToken(); Expect(26); -//#line 2729 "VBNET.ATG" +#line 2732 "VBNET.ATG" isGlobal = true; } QualIdentAndTypeArguments( -//#line 2730 "VBNET.ATG" +#line 2733 "VBNET.ATG" out typeref, canBeUnbound); -//#line 2731 "VBNET.ATG" +#line 2734 "VBNET.ATG" typeref.IsGlobal = isGlobal; while (la.kind == 26) { lexer.NextToken(); -//#line 2732 "VBNET.ATG" +#line 2735 "VBNET.ATG" TypeReference nestedTypeRef; QualIdentAndTypeArguments( -//#line 2733 "VBNET.ATG" +#line 2736 "VBNET.ATG" out nestedTypeRef, canBeUnbound); -//#line 2734 "VBNET.ATG" +#line 2737 "VBNET.ATG" typeref = new InnerClassTypeReference(typeref, nestedTypeRef.Type, nestedTypeRef.GenericTypes); } } else if (la.kind == 168) { lexer.NextToken(); -//#line 2737 "VBNET.ATG" +#line 2740 "VBNET.ATG" typeref = new TypeReference("System.Object", true); if (la.kind == 33) { lexer.NextToken(); -//#line 2741 "VBNET.ATG" +#line 2744 "VBNET.ATG" List typeArguments = new List(1); if (typeref != null) typeArguments.Add(typeref); typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true }; @@ -1208,15 +1208,15 @@ out nestedTypeRef, canBeUnbound); } } else if (StartOf(12)) { PrimitiveTypeName( -//#line 2747 "VBNET.ATG" +#line 2750 "VBNET.ATG" out name); -//#line 2747 "VBNET.ATG" +#line 2750 "VBNET.ATG" typeref = new TypeReference(name, true); if (la.kind == 33) { lexer.NextToken(); -//#line 2751 "VBNET.ATG" +#line 2754 "VBNET.ATG" List typeArguments = new List(1); if (typeref != null) typeArguments.Add(typeref); typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true }; @@ -1226,20 +1226,20 @@ out name); } void EnumBody( -//#line 637 "VBNET.ATG" +#line 637 "VBNET.ATG" TypeDeclaration newType) { -//#line 638 "VBNET.ATG" +#line 638 "VBNET.ATG" FieldDeclaration f; while (la.kind == 1 || la.kind == 21) { EndOfStmt(); } while (StartOf(13)) { EnumMemberDecl( -//#line 641 "VBNET.ATG" +#line 641 "VBNET.ATG" out f); -//#line 643 "VBNET.ATG" +#line 643 "VBNET.ATG" AddChild(f); while (la.kind == 1 || la.kind == 21) { @@ -1249,40 +1249,40 @@ out f); Expect(113); Expect(115); -//#line 647 "VBNET.ATG" +#line 647 "VBNET.ATG" newType.EndLocation = t.EndLocation; EndOfStmt(); } void InterfaceBase( -//#line 1602 "VBNET.ATG" +#line 1605 "VBNET.ATG" out List bases) { -//#line 1604 "VBNET.ATG" +#line 1607 "VBNET.ATG" TypeReference type; bases = new List(); Expect(140); TypeName( -//#line 1608 "VBNET.ATG" +#line 1611 "VBNET.ATG" out type); -//#line 1608 "VBNET.ATG" +#line 1611 "VBNET.ATG" if (type != null) bases.Add(type); while (la.kind == 22) { lexer.NextToken(); TypeName( -//#line 1611 "VBNET.ATG" +#line 1614 "VBNET.ATG" out type); -//#line 1611 "VBNET.ATG" +#line 1614 "VBNET.ATG" if (type != null) bases.Add(type); } EndOfStmt(); } void InterfaceBody( -//#line 651 "VBNET.ATG" +#line 651 "VBNET.ATG" TypeDeclaration newType) { while (la.kind == 1 || la.kind == 21) { EndOfStmt(); @@ -1296,168 +1296,168 @@ TypeDeclaration newType) { Expect(113); Expect(142); -//#line 657 "VBNET.ATG" +#line 657 "VBNET.ATG" newType.EndLocation = t.EndLocation; EndOfStmt(); } void FormalParameterList( -//#line 2939 "VBNET.ATG" +#line 2942 "VBNET.ATG" List parameter) { -//#line 2940 "VBNET.ATG" +#line 2943 "VBNET.ATG" ParameterDeclarationExpression p; FormalParameter( -//#line 2942 "VBNET.ATG" +#line 2945 "VBNET.ATG" out p); -//#line 2942 "VBNET.ATG" +#line 2945 "VBNET.ATG" if (p != null) parameter.Add(p); while (la.kind == 22) { lexer.NextToken(); FormalParameter( -//#line 2944 "VBNET.ATG" +#line 2947 "VBNET.ATG" out p); -//#line 2944 "VBNET.ATG" +#line 2947 "VBNET.ATG" if (p != null) parameter.Add(p); } } void MemberModifier( -//#line 3720 "VBNET.ATG" +#line 3723 "VBNET.ATG" ModifierList m) { switch (la.kind) { case 156: { lexer.NextToken(); -//#line 3721 "VBNET.ATG" +#line 3724 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 102: { lexer.NextToken(); -//#line 3722 "VBNET.ATG" +#line 3725 "VBNET.ATG" m.Add(Modifiers.Default, t.Location); break; } case 125: { lexer.NextToken(); -//#line 3723 "VBNET.ATG" +#line 3726 "VBNET.ATG" m.Add(Modifiers.Internal, t.Location); break; } case 199: { lexer.NextToken(); -//#line 3724 "VBNET.ATG" +#line 3727 "VBNET.ATG" m.Add(Modifiers.New, t.Location); break; } case 181: { lexer.NextToken(); -//#line 3725 "VBNET.ATG" +#line 3728 "VBNET.ATG" m.Add(Modifiers.Override, t.Location); break; } case 157: { lexer.NextToken(); -//#line 3726 "VBNET.ATG" +#line 3729 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 185: { lexer.NextToken(); -//#line 3727 "VBNET.ATG" +#line 3730 "VBNET.ATG" m.Add(Modifiers.Private, t.Location); break; } case 187: { lexer.NextToken(); -//#line 3728 "VBNET.ATG" +#line 3731 "VBNET.ATG" m.Add(Modifiers.Protected, t.Location); break; } case 188: { lexer.NextToken(); -//#line 3729 "VBNET.ATG" +#line 3732 "VBNET.ATG" m.Add(Modifiers.Public, t.Location); break; } case 166: { lexer.NextToken(); -//#line 3730 "VBNET.ATG" +#line 3733 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 167: { lexer.NextToken(); -//#line 3731 "VBNET.ATG" +#line 3734 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 200: { lexer.NextToken(); -//#line 3732 "VBNET.ATG" +#line 3735 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); break; } case 180: { lexer.NextToken(); -//#line 3733 "VBNET.ATG" +#line 3736 "VBNET.ATG" m.Add(Modifiers.Virtual, t.Location); break; } case 179: { lexer.NextToken(); -//#line 3734 "VBNET.ATG" +#line 3737 "VBNET.ATG" m.Add(Modifiers.Overloads, t.Location); break; } case 190: { lexer.NextToken(); -//#line 3735 "VBNET.ATG" +#line 3738 "VBNET.ATG" m.Add(Modifiers.ReadOnly, t.Location); break; } case 235: { lexer.NextToken(); -//#line 3736 "VBNET.ATG" +#line 3739 "VBNET.ATG" m.Add(Modifiers.WriteOnly, t.Location); break; } case 234: { lexer.NextToken(); -//#line 3737 "VBNET.ATG" +#line 3740 "VBNET.ATG" m.Add(Modifiers.WithEvents, t.Location); break; } case 105: { lexer.NextToken(); -//#line 3738 "VBNET.ATG" +#line 3741 "VBNET.ATG" m.Add(Modifiers.Dim, t.Location); break; } case 183: { lexer.NextToken(); -//#line 3739 "VBNET.ATG" +#line 3742 "VBNET.ATG" m.Add(Modifiers.Partial, t.Location); break; } @@ -1466,18 +1466,18 @@ ModifierList m) { } void ClassMemberDecl( -//#line 793 "VBNET.ATG" +#line 793 "VBNET.ATG" ModifierList m, List attributes) { StructureMemberDecl( -//#line 794 "VBNET.ATG" +#line 794 "VBNET.ATG" m, attributes); } void StructureMemberDecl( -//#line 807 "VBNET.ATG" +#line 807 "VBNET.ATG" ModifierList m, List attributes) { -//#line 809 "VBNET.ATG" +#line 809 "VBNET.ATG" TypeReference type = null; List p = new List(); Statement stmt = null; @@ -1487,37 +1487,37 @@ ModifierList m, List attributes) { switch (la.kind) { case 84: case 103: case 115: case 142: case 155: case 209: { NonModuleDeclaration( -//#line 816 "VBNET.ATG" +#line 816 "VBNET.ATG" m, attributes); break; } case 210: { lexer.NextToken(); -//#line 820 "VBNET.ATG" +#line 820 "VBNET.ATG" Location startPos = t.Location; if (StartOf(4)) { -//#line 824 "VBNET.ATG" +#line 824 "VBNET.ATG" string name = String.Empty; MethodDeclaration methodDeclaration; List handlesClause = null; List implementsClause = null; Identifier(); -//#line 830 "VBNET.ATG" +#line 830 "VBNET.ATG" name = t.val; m.Check(Modifiers.VBMethods); TypeParameterList( -//#line 833 "VBNET.ATG" +#line 833 "VBNET.ATG" templates); if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 834 "VBNET.ATG" +#line 834 "VBNET.ATG" p); } Expect(38); @@ -1525,23 +1525,23 @@ p); if (la.kind == 134 || la.kind == 136) { if (la.kind == 136) { ImplementsClause( -//#line 837 "VBNET.ATG" +#line 837 "VBNET.ATG" out implementsClause); } else { HandlesClause( -//#line 839 "VBNET.ATG" +#line 839 "VBNET.ATG" out handlesClause); } } -//#line 842 "VBNET.ATG" +#line 842 "VBNET.ATG" Location endLocation = t.EndLocation; if ( -//#line 845 "VBNET.ATG" +#line 845 "VBNET.ATG" IsMustOverride(m)) { EndOfStmt(); -//#line 848 "VBNET.ATG" +#line 848 "VBNET.ATG" methodDeclaration = new MethodDeclaration { Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes, StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation, @@ -1555,7 +1555,7 @@ IsMustOverride(m)) { } else if (la.kind == 1) { lexer.NextToken(); -//#line 861 "VBNET.ATG" +#line 861 "VBNET.ATG" methodDeclaration = new MethodDeclaration { Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes, StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation, @@ -1567,25 +1567,25 @@ IsMustOverride(m)) { AddChild(methodDeclaration); -//#line 872 "VBNET.ATG" +#line 872 "VBNET.ATG" if (ParseMethodBodies) { Block( -//#line 873 "VBNET.ATG" +#line 873 "VBNET.ATG" out stmt); Expect(113); Expect(210); -//#line 875 "VBNET.ATG" +#line 875 "VBNET.ATG" } else { // don't parse method body lexer.SkipCurrentBlock(Tokens.Sub); stmt = new BlockStatement(); } -//#line 881 "VBNET.ATG" +#line 881 "VBNET.ATG" methodDeclaration.Body = (BlockStatement)stmt; -//#line 882 "VBNET.ATG" +#line 882 "VBNET.ATG" methodDeclaration.Body.EndLocation = t.EndLocation; EndOfStmt(); } else SynErr(256); @@ -1595,39 +1595,39 @@ out stmt); lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 886 "VBNET.ATG" +#line 886 "VBNET.ATG" p); } Expect(38); } -//#line 887 "VBNET.ATG" +#line 887 "VBNET.ATG" m.Check(Modifiers.Constructors); -//#line 888 "VBNET.ATG" +#line 888 "VBNET.ATG" Location constructorEndLocation = t.EndLocation; Expect(1); -//#line 891 "VBNET.ATG" +#line 891 "VBNET.ATG" if (ParseMethodBodies) { Block( -//#line 892 "VBNET.ATG" +#line 892 "VBNET.ATG" out stmt); Expect(113); Expect(210); -//#line 894 "VBNET.ATG" +#line 894 "VBNET.ATG" } else { // don't parse method body lexer.SkipCurrentBlock(Tokens.Sub); stmt = new BlockStatement(); } -//#line 900 "VBNET.ATG" +#line 900 "VBNET.ATG" Location endLocation = t.EndLocation; EndOfStmt(); -//#line 903 "VBNET.ATG" +#line 903 "VBNET.ATG" ConstructorDeclaration cd = new ConstructorDeclaration("New", m.Modifier, p, attributes); cd.StartLocation = m.GetDeclarationLocation(startPos); cd.EndLocation = constructorEndLocation; @@ -1641,7 +1641,7 @@ out stmt); case 127: { lexer.NextToken(); -//#line 915 "VBNET.ATG" +#line 915 "VBNET.ATG" m.Check(Modifiers.VBMethods); string name = String.Empty; Location startPos = t.Location; @@ -1651,16 +1651,16 @@ out stmt); Identifier(); -//#line 922 "VBNET.ATG" +#line 922 "VBNET.ATG" name = t.val; TypeParameterList( -//#line 923 "VBNET.ATG" +#line 923 "VBNET.ATG" templates); if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 924 "VBNET.ATG" +#line 924 "VBNET.ATG" p); } Expect(38); @@ -1669,10 +1669,10 @@ p); lexer.NextToken(); while (la.kind == 40) { AttributeSection( -//#line 926 "VBNET.ATG" +#line 926 "VBNET.ATG" out returnTypeAttributeSection); -//#line 928 "VBNET.ATG" +#line 928 "VBNET.ATG" if (returnTypeAttributeSection != null) { returnTypeAttributeSection.AttributeTarget = "return"; attributes.Add(returnTypeAttributeSection); @@ -1680,11 +1680,11 @@ out returnTypeAttributeSection); } TypeName( -//#line 934 "VBNET.ATG" +#line 934 "VBNET.ATG" out type); } -//#line 936 "VBNET.ATG" +#line 936 "VBNET.ATG" if(type == null) { type = new TypeReference("System.Object", true); } @@ -1692,23 +1692,23 @@ out type); if (la.kind == 134 || la.kind == 136) { if (la.kind == 136) { ImplementsClause( -//#line 942 "VBNET.ATG" +#line 942 "VBNET.ATG" out implementsClause); } else { HandlesClause( -//#line 944 "VBNET.ATG" +#line 944 "VBNET.ATG" out handlesClause); } } -//#line 947 "VBNET.ATG" +#line 947 "VBNET.ATG" Location endLocation = t.EndLocation; if ( -//#line 950 "VBNET.ATG" +#line 950 "VBNET.ATG" IsMustOverride(m)) { EndOfStmt(); -//#line 953 "VBNET.ATG" +#line 953 "VBNET.ATG" methodDeclaration = new MethodDeclaration { Name = name, Modifier = m.Modifier, TypeReference = type, Parameters = p, Attributes = attributes, @@ -1724,7 +1724,7 @@ IsMustOverride(m)) { } else if (la.kind == 1) { lexer.NextToken(); -//#line 968 "VBNET.ATG" +#line 968 "VBNET.ATG" methodDeclaration = new MethodDeclaration { Name = name, Modifier = m.Modifier, TypeReference = type, Parameters = p, Attributes = attributes, @@ -1739,12 +1739,12 @@ IsMustOverride(m)) { if (ParseMethodBodies) { Block( -//#line 981 "VBNET.ATG" +#line 981 "VBNET.ATG" out stmt); Expect(113); Expect(127); -//#line 983 "VBNET.ATG" +#line 983 "VBNET.ATG" } else { // don't parse method body lexer.SkipCurrentBlock(Tokens.Function); stmt = new BlockStatement(); @@ -1760,7 +1760,7 @@ out stmt); case 101: { lexer.NextToken(); -//#line 997 "VBNET.ATG" +#line 997 "VBNET.ATG" m.Check(Modifiers.VBExternalMethods); Location startPos = t.Location; CharsetModifier charsetModifer = CharsetModifier.None; @@ -1770,39 +1770,39 @@ out stmt); if (StartOf(15)) { Charset( -//#line 1004 "VBNET.ATG" +#line 1004 "VBNET.ATG" out charsetModifer); } if (la.kind == 210) { lexer.NextToken(); Identifier(); -//#line 1007 "VBNET.ATG" +#line 1007 "VBNET.ATG" name = t.val; Expect(149); Expect(3); -//#line 1008 "VBNET.ATG" +#line 1008 "VBNET.ATG" library = t.literalValue as string; if (la.kind == 59) { lexer.NextToken(); Expect(3); -//#line 1009 "VBNET.ATG" +#line 1009 "VBNET.ATG" alias = t.literalValue as string; } if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 1010 "VBNET.ATG" +#line 1010 "VBNET.ATG" p); } Expect(38); } EndOfStmt(); -//#line 1013 "VBNET.ATG" +#line 1013 "VBNET.ATG" DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, null, p, attributes, library, alias, charsetModifer); declareDeclaration.StartLocation = m.GetDeclarationLocation(startPos); declareDeclaration.EndLocation = t.EndLocation; @@ -1812,25 +1812,25 @@ p); lexer.NextToken(); Identifier(); -//#line 1020 "VBNET.ATG" +#line 1020 "VBNET.ATG" name = t.val; Expect(149); Expect(3); -//#line 1021 "VBNET.ATG" +#line 1021 "VBNET.ATG" library = t.literalValue as string; if (la.kind == 59) { lexer.NextToken(); Expect(3); -//#line 1022 "VBNET.ATG" +#line 1022 "VBNET.ATG" alias = t.literalValue as string; } if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 1023 "VBNET.ATG" +#line 1023 "VBNET.ATG" p); } Expect(38); @@ -1838,12 +1838,12 @@ p); if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 1024 "VBNET.ATG" +#line 1024 "VBNET.ATG" out type); } EndOfStmt(); -//#line 1027 "VBNET.ATG" +#line 1027 "VBNET.ATG" DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, type, p, attributes, library, alias, charsetModifer); declareDeclaration.StartLocation = m.GetDeclarationLocation(startPos); declareDeclaration.EndLocation = t.EndLocation; @@ -1855,7 +1855,7 @@ out type); case 119: { lexer.NextToken(); -//#line 1037 "VBNET.ATG" +#line 1037 "VBNET.ATG" m.Check(Modifiers.VBEvents); Location startPos = t.Location; EventDeclaration eventDeclaration; @@ -1864,19 +1864,19 @@ out type); Identifier(); -//#line 1043 "VBNET.ATG" +#line 1043 "VBNET.ATG" name= t.val; if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 1045 "VBNET.ATG" +#line 1045 "VBNET.ATG" out type); } else if (StartOf(16)) { if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 1047 "VBNET.ATG" +#line 1047 "VBNET.ATG" p); } Expect(38); @@ -1884,11 +1884,11 @@ p); } else SynErr(260); if (la.kind == 136) { ImplementsClause( -//#line 1049 "VBNET.ATG" +#line 1049 "VBNET.ATG" out implementsClause); } -//#line 1051 "VBNET.ATG" +#line 1051 "VBNET.ATG" eventDeclaration = new EventDeclaration { Name = name, TypeReference = type, Modifier = m.Modifier, Parameters = p, Attributes = attributes, InterfaceImplementations = implementsClause, @@ -1902,29 +1902,29 @@ out implementsClause); } case 2: case 58: case 62: case 64: case 65: case 66: case 67: case 70: case 87: case 104: case 107: case 116: case 121: case 126: case 133: case 139: case 143: case 146: case 147: case 170: case 176: case 178: case 184: case 203: case 212: case 213: case 223: case 224: case 230: { -//#line 1062 "VBNET.ATG" +#line 1062 "VBNET.ATG" m.Check(Modifiers.Fields); FieldDeclaration fd = new FieldDeclaration(attributes, null, m.Modifier); IdentifierForFieldDeclaration(); -//#line 1065 "VBNET.ATG" +#line 1065 "VBNET.ATG" string name = t.val; -//#line 1066 "VBNET.ATG" +#line 1066 "VBNET.ATG" fd.StartLocation = m.GetDeclarationLocation(t.Location); VariableDeclaratorPartAfterIdentifier( -//#line 1068 "VBNET.ATG" +#line 1068 "VBNET.ATG" variableDeclarators, name); while (la.kind == 22) { lexer.NextToken(); VariableDeclarator( -//#line 1069 "VBNET.ATG" +#line 1069 "VBNET.ATG" variableDeclarators); } EndOfStmt(); -//#line 1072 "VBNET.ATG" +#line 1072 "VBNET.ATG" fd.EndLocation = t.EndLocation; fd.Fields = variableDeclarators; AddChild(fd); @@ -1933,35 +1933,35 @@ variableDeclarators); } case 88: { -//#line 1077 "VBNET.ATG" +#line 1077 "VBNET.ATG" m.Check(Modifiers.Fields); lexer.NextToken(); -//#line 1078 "VBNET.ATG" +#line 1078 "VBNET.ATG" m.Add(Modifiers.Const, t.Location); -//#line 1080 "VBNET.ATG" +#line 1080 "VBNET.ATG" FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier); fd.StartLocation = m.GetDeclarationLocation(t.Location); List constantDeclarators = new List(); ConstantDeclarator( -//#line 1084 "VBNET.ATG" +#line 1084 "VBNET.ATG" constantDeclarators); while (la.kind == 22) { lexer.NextToken(); ConstantDeclarator( -//#line 1085 "VBNET.ATG" +#line 1085 "VBNET.ATG" constantDeclarators); } -//#line 1087 "VBNET.ATG" +#line 1087 "VBNET.ATG" fd.Fields = constantDeclarators; fd.EndLocation = t.Location; EndOfStmt(); -//#line 1092 "VBNET.ATG" +#line 1092 "VBNET.ATG" fd.EndLocation = t.EndLocation; AddChild(fd); @@ -1970,7 +1970,7 @@ constantDeclarators); case 186: { lexer.NextToken(); -//#line 1098 "VBNET.ATG" +#line 1098 "VBNET.ATG" m.Check(Modifiers.VBProperties); Location startPos = t.Location; List implementsClause = null; @@ -1979,13 +1979,13 @@ constantDeclarators); Identifier(); -//#line 1104 "VBNET.ATG" +#line 1104 "VBNET.ATG" string propertyName = t.val; if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 1105 "VBNET.ATG" +#line 1105 "VBNET.ATG" p); } Expect(38); @@ -1994,10 +1994,10 @@ p); lexer.NextToken(); while (la.kind == 40) { AttributeSection( -//#line 1108 "VBNET.ATG" +#line 1108 "VBNET.ATG" out returnTypeAttributeSection); -//#line 1110 "VBNET.ATG" +#line 1110 "VBNET.ATG" if (returnTypeAttributeSection != null) { returnTypeAttributeSection.AttributeTarget = "return"; attributes.Add(returnTypeAttributeSection); @@ -2005,13 +2005,13 @@ out returnTypeAttributeSection); } if ( -//#line 1117 "VBNET.ATG" +#line 1117 "VBNET.ATG" IsNewExpression()) { ObjectCreateExpression( -//#line 1117 "VBNET.ATG" +#line 1117 "VBNET.ATG" out initializer); -//#line 1119 "VBNET.ATG" +#line 1119 "VBNET.ATG" if (initializer is ObjectCreateExpression) { type = ((ObjectCreateExpression)initializer).CreateType.Clone(); } else { @@ -2020,27 +2020,27 @@ out initializer); } else if (StartOf(8)) { TypeName( -//#line 1126 "VBNET.ATG" +#line 1126 "VBNET.ATG" out type); } else SynErr(261); } if (la.kind == 20) { lexer.NextToken(); Expr( -//#line 1129 "VBNET.ATG" +#line 1129 "VBNET.ATG" out initializer); } if (la.kind == 136) { ImplementsClause( -//#line 1130 "VBNET.ATG" +#line 1130 "VBNET.ATG" out implementsClause); } EndOfStmt(); if ( -//#line 1134 "VBNET.ATG" +#line 1134 "VBNET.ATG" IsMustOverride(m) || IsAutomaticProperty()) { -//#line 1136 "VBNET.ATG" +#line 1136 "VBNET.ATG" PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes); pDecl.StartLocation = m.GetDeclarationLocation(startPos); pDecl.EndLocation = t.Location; @@ -2053,7 +2053,7 @@ IsMustOverride(m) || IsAutomaticProperty()) { } else if (StartOf(17)) { -//#line 1148 "VBNET.ATG" +#line 1148 "VBNET.ATG" PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes); pDecl.StartLocation = m.GetDeclarationLocation(startPos); pDecl.EndLocation = t.Location; @@ -2065,13 +2065,13 @@ IsMustOverride(m) || IsAutomaticProperty()) { PropertySetRegion setRegion; AccessorDecls( -//#line 1158 "VBNET.ATG" +#line 1158 "VBNET.ATG" out getRegion, out setRegion); Expect(113); Expect(186); EndOfStmt(); -//#line 1162 "VBNET.ATG" +#line 1162 "VBNET.ATG" pDecl.GetRegion = getRegion; pDecl.SetRegion = setRegion; pDecl.BodyEnd = t.Location; // t = EndOfStmt; not "Property" @@ -2083,11 +2083,11 @@ out getRegion, out setRegion); case 98: { lexer.NextToken(); -//#line 1169 "VBNET.ATG" +#line 1169 "VBNET.ATG" Location startPos = t.Location; Expect(119); -//#line 1171 "VBNET.ATG" +#line 1171 "VBNET.ATG" m.Check(Modifiers.VBCustomEvents); EventAddRemoveRegion eventAccessorDeclaration; EventAddRegion addHandlerAccessorDeclaration = null; @@ -2097,24 +2097,24 @@ out getRegion, out setRegion); Identifier(); -//#line 1178 "VBNET.ATG" +#line 1178 "VBNET.ATG" string customEventName = t.val; Expect(63); TypeName( -//#line 1179 "VBNET.ATG" +#line 1179 "VBNET.ATG" out type); if (la.kind == 136) { ImplementsClause( -//#line 1180 "VBNET.ATG" +#line 1180 "VBNET.ATG" out implementsClause); } EndOfStmt(); while (StartOf(18)) { EventAccessorDeclaration( -//#line 1183 "VBNET.ATG" +#line 1183 "VBNET.ATG" out eventAccessorDeclaration); -//#line 1185 "VBNET.ATG" +#line 1185 "VBNET.ATG" if(eventAccessorDeclaration is EventAddRegion) { addHandlerAccessorDeclaration = (EventAddRegion)eventAccessorDeclaration; @@ -2133,7 +2133,7 @@ out eventAccessorDeclaration); Expect(119); EndOfStmt(); -//#line 1201 "VBNET.ATG" +#line 1201 "VBNET.ATG" if(addHandlerAccessorDeclaration == null) { Error("Need to provide AddHandler accessor."); @@ -2164,24 +2164,24 @@ out eventAccessorDeclaration); } case 161: case 172: case 232: { -//#line 1227 "VBNET.ATG" +#line 1227 "VBNET.ATG" ConversionType opConversionType = ConversionType.None; if (la.kind == 161 || la.kind == 232) { if (la.kind == 232) { lexer.NextToken(); -//#line 1228 "VBNET.ATG" +#line 1228 "VBNET.ATG" opConversionType = ConversionType.Implicit; } else { lexer.NextToken(); -//#line 1229 "VBNET.ATG" +#line 1229 "VBNET.ATG" opConversionType = ConversionType.Explicit; } } Expect(172); -//#line 1232 "VBNET.ATG" +#line 1232 "VBNET.ATG" m.Check(Modifiers.VBOperators); Location startPos = t.Location; TypeReference returnType = NullTypeReference.Instance; @@ -2192,63 +2192,64 @@ out eventAccessorDeclaration); List parameters = new List(); OverloadableOperator( -//#line 1241 "VBNET.ATG" +#line 1241 "VBNET.ATG" out operatorType); Expect(37); FormalParameter( -//#line 1243 "VBNET.ATG" +#line 1243 "VBNET.ATG" out param); -//#line 1244 "VBNET.ATG" +#line 1244 "VBNET.ATG" if (param != null) parameters.Add(param); if (la.kind == 22) { lexer.NextToken(); FormalParameter( -//#line 1246 "VBNET.ATG" +#line 1246 "VBNET.ATG" out param); -//#line 1247 "VBNET.ATG" +#line 1247 "VBNET.ATG" if (param != null) parameters.Add(param); } Expect(38); -//#line 1250 "VBNET.ATG" +#line 1250 "VBNET.ATG" Location endPos = t.EndLocation; if (la.kind == 63) { lexer.NextToken(); while (la.kind == 40) { AttributeSection( -//#line 1251 "VBNET.ATG" +#line 1251 "VBNET.ATG" out section); -//#line 1252 "VBNET.ATG" +#line 1252 "VBNET.ATG" if (section != null) { section.AttributeTarget = "return"; attributes.Add(section); } } TypeName( -//#line 1256 "VBNET.ATG" +#line 1256 "VBNET.ATG" out returnType); -//#line 1256 "VBNET.ATG" +#line 1256 "VBNET.ATG" endPos = t.EndLocation; } Expect(1); Block( -//#line 1258 "VBNET.ATG" +#line 1258 "VBNET.ATG" out stmt); Expect(113); Expect(172); EndOfStmt(); -//#line 1260 "VBNET.ATG" +#line 1260 "VBNET.ATG" OperatorDeclaration operatorDeclaration = new OperatorDeclaration { Modifier = m.Modifier, Attributes = attributes, Parameters = parameters, TypeReference = returnType, OverloadableOperator = operatorType, + Name = GetReflectionNameForOperator(operatorType, opConversionType), ConversionType = opConversionType, Body = (BlockStatement)stmt, StartLocation = m.GetDeclarationLocation(startPos), @@ -2265,25 +2266,25 @@ out stmt); } void EnumMemberDecl( -//#line 774 "VBNET.ATG" +#line 774 "VBNET.ATG" out FieldDeclaration f) { -//#line 776 "VBNET.ATG" +#line 776 "VBNET.ATG" Expression expr = null;List attributes = new List(); AttributeSection section = null; VariableDeclaration varDecl = null; while (la.kind == 40) { AttributeSection( -//#line 780 "VBNET.ATG" +#line 780 "VBNET.ATG" out section); -//#line 780 "VBNET.ATG" +#line 780 "VBNET.ATG" attributes.Add(section); } Identifier(); -//#line 783 "VBNET.ATG" +#line 783 "VBNET.ATG" f = new FieldDeclaration(attributes); varDecl = new VariableDeclaration(t.val); f.Fields.Add(varDecl); @@ -2292,21 +2293,21 @@ out section); if (la.kind == 20) { lexer.NextToken(); Expr( -//#line 788 "VBNET.ATG" +#line 788 "VBNET.ATG" out expr); -//#line 788 "VBNET.ATG" +#line 788 "VBNET.ATG" varDecl.Initializer = expr; } -//#line 789 "VBNET.ATG" +#line 789 "VBNET.ATG" f.EndLocation = varDecl.EndLocation = t.EndLocation; EndOfStmt(); } void InterfaceMemberDecl() { -//#line 665 "VBNET.ATG" +#line 665 "VBNET.ATG" TypeReference type =null; List p = new List(); List templates = new List(); @@ -2318,33 +2319,33 @@ out expr); if (StartOf(19)) { while (la.kind == 40) { AttributeSection( -//#line 673 "VBNET.ATG" +#line 673 "VBNET.ATG" out section); -//#line 673 "VBNET.ATG" +#line 673 "VBNET.ATG" attributes.Add(section); } while (StartOf(10)) { MemberModifier( -//#line 676 "VBNET.ATG" +#line 676 "VBNET.ATG" mod); } if (la.kind == 119) { lexer.NextToken(); -//#line 680 "VBNET.ATG" +#line 680 "VBNET.ATG" mod.Check(Modifiers.VBInterfaceEvents); Location startLocation = t.Location; Identifier(); -//#line 683 "VBNET.ATG" +#line 683 "VBNET.ATG" name = t.val; if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 684 "VBNET.ATG" +#line 684 "VBNET.ATG" p); } Expect(38); @@ -2352,12 +2353,12 @@ p); if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 685 "VBNET.ATG" +#line 685 "VBNET.ATG" out type); } EndOfStmt(); -//#line 688 "VBNET.ATG" +#line 688 "VBNET.ATG" EventDeclaration ed = new EventDeclaration { Name = name, TypeReference = type, Modifier = mod.Modifier, Parameters = p, Attributes = attributes, @@ -2368,29 +2369,29 @@ out type); } else if (la.kind == 210) { lexer.NextToken(); -//#line 698 "VBNET.ATG" +#line 698 "VBNET.ATG" Location startLocation = t.Location; mod.Check(Modifiers.VBInterfaceMethods); Identifier(); -//#line 701 "VBNET.ATG" +#line 701 "VBNET.ATG" name = t.val; TypeParameterList( -//#line 702 "VBNET.ATG" +#line 702 "VBNET.ATG" templates); if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 703 "VBNET.ATG" +#line 703 "VBNET.ATG" p); } Expect(38); } EndOfStmt(); -//#line 706 "VBNET.ATG" +#line 706 "VBNET.ATG" MethodDeclaration md = new MethodDeclaration { Name = name, Modifier = mod.Modifier, @@ -2406,22 +2407,22 @@ p); } else if (la.kind == 127) { lexer.NextToken(); -//#line 721 "VBNET.ATG" +#line 721 "VBNET.ATG" mod.Check(Modifiers.VBInterfaceMethods); Location startLocation = t.Location; Identifier(); -//#line 724 "VBNET.ATG" +#line 724 "VBNET.ATG" name = t.val; TypeParameterList( -//#line 725 "VBNET.ATG" +#line 725 "VBNET.ATG" templates); if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 726 "VBNET.ATG" +#line 726 "VBNET.ATG" p); } Expect(38); @@ -2430,15 +2431,15 @@ p); lexer.NextToken(); while (la.kind == 40) { AttributeSection( -//#line 727 "VBNET.ATG" +#line 727 "VBNET.ATG" out returnTypeAttributeSection); } TypeName( -//#line 727 "VBNET.ATG" +#line 727 "VBNET.ATG" out type); } -//#line 729 "VBNET.ATG" +#line 729 "VBNET.ATG" if(type == null) { type = new TypeReference("System.Object", true); } @@ -2459,19 +2460,19 @@ out type); } else if (la.kind == 186) { lexer.NextToken(); -//#line 749 "VBNET.ATG" +#line 749 "VBNET.ATG" Location startLocation = t.Location; mod.Check(Modifiers.VBInterfaceProperties); Identifier(); -//#line 752 "VBNET.ATG" +#line 752 "VBNET.ATG" name = t.val; if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 753 "VBNET.ATG" +#line 753 "VBNET.ATG" p); } Expect(38); @@ -2479,18 +2480,18 @@ p); if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 754 "VBNET.ATG" +#line 754 "VBNET.ATG" out type); } -//#line 756 "VBNET.ATG" +#line 756 "VBNET.ATG" if(type == null) { type = new TypeReference("System.Object", true); } EndOfStmt(); -//#line 762 "VBNET.ATG" +#line 762 "VBNET.ATG" PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes); pd.Parameters = p; pd.EndLocation = t.EndLocation; @@ -2500,34 +2501,34 @@ out type); } else SynErr(264); } else if (StartOf(20)) { NonModuleDeclaration( -//#line 770 "VBNET.ATG" +#line 770 "VBNET.ATG" mod, attributes); } else SynErr(265); } void Expr( -//#line 1661 "VBNET.ATG" +#line 1664 "VBNET.ATG" out Expression expr) { -//#line 1662 "VBNET.ATG" +#line 1665 "VBNET.ATG" expr = null; Location startLocation = la.Location; if ( -//#line 1665 "VBNET.ATG" +#line 1668 "VBNET.ATG" IsQueryExpression() ) { QueryExpr( -//#line 1666 "VBNET.ATG" +#line 1669 "VBNET.ATG" out expr); } else if (la.kind == 127 || la.kind == 210) { LambdaExpr( -//#line 1667 "VBNET.ATG" +#line 1670 "VBNET.ATG" out expr); } else if (StartOf(21)) { DisjunctionExpr( -//#line 1668 "VBNET.ATG" +#line 1671 "VBNET.ATG" out expr); } else SynErr(266); -//#line 1671 "VBNET.ATG" +#line 1674 "VBNET.ATG" if (expr != null) { expr.StartLocation = startLocation; expr.EndLocation = t.EndLocation; @@ -2536,87 +2537,87 @@ out expr); } void ImplementsClause( -//#line 1634 "VBNET.ATG" +#line 1637 "VBNET.ATG" out List baseInterfaces) { -//#line 1636 "VBNET.ATG" +#line 1639 "VBNET.ATG" baseInterfaces = new List(); TypeReference type = null; string memberName = null; Expect(136); NonArrayTypeName( -//#line 1641 "VBNET.ATG" +#line 1644 "VBNET.ATG" out type, false); -//#line 1642 "VBNET.ATG" +#line 1645 "VBNET.ATG" if (type != null) memberName = TypeReference.StripLastIdentifierFromType(ref type); -//#line 1643 "VBNET.ATG" +#line 1646 "VBNET.ATG" baseInterfaces.Add(new InterfaceImplementation(type, memberName)); while (la.kind == 22) { lexer.NextToken(); NonArrayTypeName( -//#line 1645 "VBNET.ATG" +#line 1648 "VBNET.ATG" out type, false); -//#line 1646 "VBNET.ATG" +#line 1649 "VBNET.ATG" if (type != null) memberName = TypeReference.StripLastIdentifierFromType(ref type); -//#line 1647 "VBNET.ATG" +#line 1650 "VBNET.ATG" baseInterfaces.Add(new InterfaceImplementation(type, memberName)); } } void HandlesClause( -//#line 1592 "VBNET.ATG" +#line 1595 "VBNET.ATG" out List handlesClause) { -//#line 1594 "VBNET.ATG" +#line 1597 "VBNET.ATG" handlesClause = new List(); string name; Expect(134); EventMemberSpecifier( -//#line 1597 "VBNET.ATG" +#line 1600 "VBNET.ATG" out name); -//#line 1597 "VBNET.ATG" +#line 1600 "VBNET.ATG" if (name != null) handlesClause.Add(name); while (la.kind == 22) { lexer.NextToken(); EventMemberSpecifier( -//#line 1598 "VBNET.ATG" +#line 1601 "VBNET.ATG" out name); -//#line 1598 "VBNET.ATG" +#line 1601 "VBNET.ATG" if (name != null) handlesClause.Add(name); } } void Block( -//#line 2987 "VBNET.ATG" +#line 2990 "VBNET.ATG" out Statement stmt) { -//#line 2990 "VBNET.ATG" +#line 2993 "VBNET.ATG" BlockStatement blockStmt = new BlockStatement(); /* in snippet parsing mode, t might be null */ if (t != null) blockStmt.StartLocation = t.EndLocation; BlockStart(blockStmt); while (StartOf(22) || -//#line 2996 "VBNET.ATG" +#line 2999 "VBNET.ATG" IsEndStmtAhead()) { if ( -//#line 2996 "VBNET.ATG" +#line 2999 "VBNET.ATG" IsEndStmtAhead()) { -//#line 2997 "VBNET.ATG" +#line 3000 "VBNET.ATG" Token first = la; Expect(113); EndOfStmt(); -//#line 3000 "VBNET.ATG" +#line 3003 "VBNET.ATG" AddChild(new EndStatement() { StartLocation = first.Location, EndLocation = first.EndLocation } @@ -2628,7 +2629,7 @@ IsEndStmtAhead()) { } } -//#line 3009 "VBNET.ATG" +#line 3012 "VBNET.ATG" stmt = blockStmt; if (t != null) blockStmt.EndLocation = t.EndLocation; BlockEnd(); @@ -2636,26 +2637,26 @@ IsEndStmtAhead()) { } void Charset( -//#line 1584 "VBNET.ATG" +#line 1587 "VBNET.ATG" out CharsetModifier charsetModifier) { -//#line 1585 "VBNET.ATG" +#line 1588 "VBNET.ATG" charsetModifier = CharsetModifier.None; if (la.kind == 127 || la.kind == 210) { } else if (la.kind == 62) { lexer.NextToken(); -//#line 1586 "VBNET.ATG" +#line 1589 "VBNET.ATG" charsetModifier = CharsetModifier.Ansi; } else if (la.kind == 66) { lexer.NextToken(); -//#line 1587 "VBNET.ATG" +#line 1590 "VBNET.ATG" charsetModifier = CharsetModifier.Auto; } else if (la.kind == 223) { lexer.NextToken(); -//#line 1588 "VBNET.ATG" +#line 1591 "VBNET.ATG" charsetModifier = CharsetModifier.Unicode; } else SynErr(267); } @@ -2783,10 +2784,10 @@ out CharsetModifier charsetModifier) { } void VariableDeclaratorPartAfterIdentifier( -//#line 1463 "VBNET.ATG" +#line 1466 "VBNET.ATG" List fieldDeclaration, string name) { -//#line 1465 "VBNET.ATG" +#line 1468 "VBNET.ATG" Expression expr = null; TypeReference type = null; ArrayList rank = null; @@ -2794,28 +2795,28 @@ List fieldDeclaration, string name) { Location startLocation = t.Location; if ( -//#line 1471 "VBNET.ATG" +#line 1474 "VBNET.ATG" IsSize() && !IsDims()) { ArrayInitializationModifier( -//#line 1471 "VBNET.ATG" +#line 1474 "VBNET.ATG" out dimension); } if ( -//#line 1472 "VBNET.ATG" +#line 1475 "VBNET.ATG" IsDims()) { ArrayNameModifier( -//#line 1472 "VBNET.ATG" +#line 1475 "VBNET.ATG" out rank); } if ( -//#line 1474 "VBNET.ATG" +#line 1477 "VBNET.ATG" IsObjectCreation()) { Expect(63); ObjectCreateExpression( -//#line 1474 "VBNET.ATG" +#line 1477 "VBNET.ATG" out expr); -//#line 1476 "VBNET.ATG" +#line 1479 "VBNET.ATG" if (expr is ObjectCreateExpression) { type = ((ObjectCreateExpression)expr).CreateType.Clone(); } else { @@ -2826,10 +2827,10 @@ out expr); if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 1483 "VBNET.ATG" +#line 1486 "VBNET.ATG" out type); -//#line 1485 "VBNET.ATG" +#line 1488 "VBNET.ATG" if (type != null) { for (int i = fieldDeclaration.Count - 1; i >= 0; i--) { VariableDeclaration vd = fieldDeclaration[i]; @@ -2842,7 +2843,7 @@ out type); } -//#line 1497 "VBNET.ATG" +#line 1500 "VBNET.ATG" if (type == null && (dimension != null || rank != null)) { type = new TypeReference(""); } @@ -2869,12 +2870,12 @@ out type); if (la.kind == 20) { lexer.NextToken(); Expr( -//#line 1520 "VBNET.ATG" +#line 1523 "VBNET.ATG" out expr); } } else SynErr(269); -//#line 1523 "VBNET.ATG" +#line 1526 "VBNET.ATG" VariableDeclaration varDecl = new VariableDeclaration(name, expr, type); varDecl.StartLocation = startLocation; varDecl.EndLocation = t.Location; @@ -2883,22 +2884,22 @@ out expr); } void VariableDeclarator( -//#line 1457 "VBNET.ATG" +#line 1460 "VBNET.ATG" List fieldDeclaration) { Identifier(); -//#line 1459 "VBNET.ATG" +#line 1462 "VBNET.ATG" string name = t.val; VariableDeclaratorPartAfterIdentifier( -//#line 1460 "VBNET.ATG" +#line 1463 "VBNET.ATG" fieldDeclaration, name); } void ConstantDeclarator( -//#line 1438 "VBNET.ATG" +#line 1441 "VBNET.ATG" List constantDeclaration) { -//#line 1440 "VBNET.ATG" +#line 1443 "VBNET.ATG" Expression expr = null; TypeReference type = null; string name = String.Empty; @@ -2906,20 +2907,20 @@ List constantDeclaration) { Identifier(); -//#line 1445 "VBNET.ATG" +#line 1448 "VBNET.ATG" name = t.val; location = t.Location; if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 1446 "VBNET.ATG" +#line 1449 "VBNET.ATG" out type); } Expect(20); Expr( -//#line 1447 "VBNET.ATG" +#line 1450 "VBNET.ATG" out expr); -//#line 1449 "VBNET.ATG" +#line 1452 "VBNET.ATG" VariableDeclaration f = new VariableDeclaration(name, expr); f.TypeReference = type; f.StartLocation = location; @@ -2928,10 +2929,10 @@ out expr); } void ObjectCreateExpression( -//#line 2123 "VBNET.ATG" +#line 2126 "VBNET.ATG" out Expression oce) { -//#line 2125 "VBNET.ATG" +#line 2128 "VBNET.ATG" TypeReference type = null; CollectionInitializerExpression initializer = null; List arguments = null; @@ -2943,39 +2944,39 @@ out Expression oce) { Expect(162); if (StartOf(8)) { NonArrayTypeName( -//#line 2134 "VBNET.ATG" +#line 2137 "VBNET.ATG" out type, false); if (la.kind == 37) { lexer.NextToken(); NormalOrReDimArgumentList( -//#line 2135 "VBNET.ATG" +#line 2138 "VBNET.ATG" out arguments, out canBeNormal, out canBeReDim); Expect(38); if (la.kind == 35 || -//#line 2136 "VBNET.ATG" +#line 2139 "VBNET.ATG" la.kind == Tokens.OpenParenthesis) { if ( -//#line 2136 "VBNET.ATG" +#line 2139 "VBNET.ATG" la.kind == Tokens.OpenParenthesis) { ArrayTypeModifiers( -//#line 2137 "VBNET.ATG" +#line 2140 "VBNET.ATG" out dimensions); CollectionInitializer( -//#line 2138 "VBNET.ATG" +#line 2141 "VBNET.ATG" out initializer); } else { CollectionInitializer( -//#line 2139 "VBNET.ATG" +#line 2142 "VBNET.ATG" out initializer); } } -//#line 2141 "VBNET.ATG" +#line 2144 "VBNET.ATG" if (canBeReDim && !canBeNormal && initializer == null) initializer = new CollectionInitializerExpression(); } } -//#line 2145 "VBNET.ATG" +#line 2148 "VBNET.ATG" if (initializer == null) { oce = new ObjectCreateExpression(type, arguments); } else { @@ -2990,53 +2991,53 @@ out initializer); if (la.kind == 126 || la.kind == 233) { if (la.kind == 233) { -//#line 2160 "VBNET.ATG" +#line 2163 "VBNET.ATG" MemberInitializerExpression memberInitializer = null; Expression anonymousMember = null; lexer.NextToken(); -//#line 2165 "VBNET.ATG" +#line 2168 "VBNET.ATG" CollectionInitializerExpression memberInitializers = new CollectionInitializerExpression(); memberInitializers.StartLocation = la.Location; Expect(35); if (la.kind == 26 || la.kind == 147) { MemberInitializer( -//#line 2170 "VBNET.ATG" +#line 2173 "VBNET.ATG" out memberInitializer); -//#line 2171 "VBNET.ATG" +#line 2174 "VBNET.ATG" memberInitializers.CreateExpressions.Add(memberInitializer); } else if (StartOf(24)) { Expr( -//#line 2172 "VBNET.ATG" +#line 2175 "VBNET.ATG" out anonymousMember); -//#line 2173 "VBNET.ATG" +#line 2176 "VBNET.ATG" memberInitializers.CreateExpressions.Add(anonymousMember); } else SynErr(270); while (la.kind == 22) { lexer.NextToken(); if (la.kind == 26 || la.kind == 147) { MemberInitializer( -//#line 2177 "VBNET.ATG" +#line 2180 "VBNET.ATG" out memberInitializer); -//#line 2178 "VBNET.ATG" +#line 2181 "VBNET.ATG" memberInitializers.CreateExpressions.Add(memberInitializer); } else if (StartOf(24)) { Expr( -//#line 2179 "VBNET.ATG" +#line 2182 "VBNET.ATG" out anonymousMember); -//#line 2180 "VBNET.ATG" +#line 2183 "VBNET.ATG" memberInitializers.CreateExpressions.Add(anonymousMember); } else SynErr(271); } Expect(36); -//#line 2185 "VBNET.ATG" +#line 2188 "VBNET.ATG" memberInitializers.EndLocation = t.Location; if(oce is ObjectCreateExpression) { @@ -3046,17 +3047,17 @@ out anonymousMember); } else { lexer.NextToken(); CollectionInitializer( -//#line 2195 "VBNET.ATG" +#line 2198 "VBNET.ATG" out initializer); -//#line 2197 "VBNET.ATG" +#line 2200 "VBNET.ATG" if(oce is ObjectCreateExpression) ((ObjectCreateExpression)oce).ObjectInitializer = initializer; } } -//#line 2203 "VBNET.ATG" +#line 2206 "VBNET.ATG" if (oce != null) { oce.StartLocation = startLocation; oce.EndLocation = t.EndLocation; @@ -3065,10 +3066,10 @@ out initializer); } void AccessorDecls( -//#line 1372 "VBNET.ATG" +#line 1375 "VBNET.ATG" out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { -//#line 1374 "VBNET.ATG" +#line 1377 "VBNET.ATG" List attributes = new List(); AttributeSection section; getBlock = null; @@ -3076,60 +3077,60 @@ out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { while (la.kind == 40) { AttributeSection( -//#line 1379 "VBNET.ATG" +#line 1382 "VBNET.ATG" out section); -//#line 1379 "VBNET.ATG" +#line 1382 "VBNET.ATG" attributes.Add(section); } if (StartOf(25)) { GetAccessorDecl( -//#line 1381 "VBNET.ATG" +#line 1384 "VBNET.ATG" out getBlock, attributes); if (StartOf(26)) { -//#line 1383 "VBNET.ATG" +#line 1386 "VBNET.ATG" attributes = new List(); while (la.kind == 40) { AttributeSection( -//#line 1384 "VBNET.ATG" +#line 1387 "VBNET.ATG" out section); -//#line 1384 "VBNET.ATG" +#line 1387 "VBNET.ATG" attributes.Add(section); } SetAccessorDecl( -//#line 1385 "VBNET.ATG" +#line 1388 "VBNET.ATG" out setBlock, attributes); } } else if (StartOf(27)) { SetAccessorDecl( -//#line 1388 "VBNET.ATG" +#line 1391 "VBNET.ATG" out setBlock, attributes); if (StartOf(28)) { -//#line 1390 "VBNET.ATG" +#line 1393 "VBNET.ATG" attributes = new List(); while (la.kind == 40) { AttributeSection( -//#line 1391 "VBNET.ATG" +#line 1394 "VBNET.ATG" out section); -//#line 1391 "VBNET.ATG" +#line 1394 "VBNET.ATG" attributes.Add(section); } GetAccessorDecl( -//#line 1392 "VBNET.ATG" +#line 1395 "VBNET.ATG" out getBlock, attributes); } } else SynErr(272); } void EventAccessorDeclaration( -//#line 1335 "VBNET.ATG" +#line 1338 "VBNET.ATG" out EventAddRemoveRegion eventAccessorDeclaration) { -//#line 1337 "VBNET.ATG" +#line 1340 "VBNET.ATG" Statement stmt = null; List p = new List(); AttributeSection section; @@ -3138,10 +3139,10 @@ out EventAddRemoveRegion eventAccessorDeclaration) { while (la.kind == 40) { AttributeSection( -//#line 1343 "VBNET.ATG" +#line 1346 "VBNET.ATG" out section); -//#line 1343 "VBNET.ATG" +#line 1346 "VBNET.ATG" attributes.Add(section); } if (la.kind == 56) { @@ -3150,20 +3151,20 @@ out section); lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 1345 "VBNET.ATG" +#line 1348 "VBNET.ATG" p); } Expect(38); } Expect(1); Block( -//#line 1346 "VBNET.ATG" +#line 1349 "VBNET.ATG" out stmt); Expect(113); Expect(56); EndOfStmt(); -//#line 1348 "VBNET.ATG" +#line 1351 "VBNET.ATG" eventAccessorDeclaration = new EventAddRegion(attributes); eventAccessorDeclaration.Block = (BlockStatement)stmt; eventAccessorDeclaration.Parameters = p; @@ -3174,20 +3175,20 @@ out stmt); lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 1353 "VBNET.ATG" +#line 1356 "VBNET.ATG" p); } Expect(38); } Expect(1); Block( -//#line 1354 "VBNET.ATG" +#line 1357 "VBNET.ATG" out stmt); Expect(113); Expect(193); EndOfStmt(); -//#line 1356 "VBNET.ATG" +#line 1359 "VBNET.ATG" eventAccessorDeclaration = new EventRemoveRegion(attributes); eventAccessorDeclaration.Block = (BlockStatement)stmt; eventAccessorDeclaration.Parameters = p; @@ -3198,20 +3199,20 @@ out stmt); lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 1361 "VBNET.ATG" +#line 1364 "VBNET.ATG" p); } Expect(38); } Expect(1); Block( -//#line 1362 "VBNET.ATG" +#line 1365 "VBNET.ATG" out stmt); Expect(113); Expect(189); EndOfStmt(); -//#line 1364 "VBNET.ATG" +#line 1367 "VBNET.ATG" eventAccessorDeclaration = new EventRaiseRegion(attributes); eventAccessorDeclaration.Block = (BlockStatement)stmt; eventAccessorDeclaration.Parameters = p; @@ -3220,163 +3221,170 @@ out stmt); } void OverloadableOperator( -//#line 1277 "VBNET.ATG" +#line 1278 "VBNET.ATG" out OverloadableOperatorType operatorType) { -//#line 1278 "VBNET.ATG" +#line 1279 "VBNET.ATG" operatorType = OverloadableOperatorType.None; switch (la.kind) { case 31: { lexer.NextToken(); -//#line 1280 "VBNET.ATG" +#line 1281 "VBNET.ATG" operatorType = OverloadableOperatorType.Add; break; } case 30: { lexer.NextToken(); -//#line 1282 "VBNET.ATG" +#line 1283 "VBNET.ATG" operatorType = OverloadableOperatorType.Subtract; break; } case 34: { lexer.NextToken(); -//#line 1284 "VBNET.ATG" +#line 1285 "VBNET.ATG" operatorType = OverloadableOperatorType.Multiply; break; } case 24: { lexer.NextToken(); -//#line 1286 "VBNET.ATG" +#line 1287 "VBNET.ATG" operatorType = OverloadableOperatorType.Divide; break; } case 25: { lexer.NextToken(); -//#line 1288 "VBNET.ATG" +#line 1289 "VBNET.ATG" operatorType = OverloadableOperatorType.DivideInteger; break; } case 23: { lexer.NextToken(); -//#line 1290 "VBNET.ATG" +#line 1291 "VBNET.ATG" operatorType = OverloadableOperatorType.Concat; break; } case 150: { lexer.NextToken(); -//#line 1292 "VBNET.ATG" +#line 1293 "VBNET.ATG" operatorType = OverloadableOperatorType.Like; break; } case 154: { lexer.NextToken(); -//#line 1294 "VBNET.ATG" +#line 1295 "VBNET.ATG" operatorType = OverloadableOperatorType.Modulus; break; } case 60: { lexer.NextToken(); -//#line 1296 "VBNET.ATG" +#line 1297 "VBNET.ATG" operatorType = OverloadableOperatorType.BitwiseAnd; break; } case 175: { lexer.NextToken(); -//#line 1298 "VBNET.ATG" +#line 1299 "VBNET.ATG" operatorType = OverloadableOperatorType.BitwiseOr; break; } case 236: { lexer.NextToken(); -//#line 1300 "VBNET.ATG" +#line 1301 "VBNET.ATG" operatorType = OverloadableOperatorType.ExclusiveOr; break; } + case 164: { + lexer.NextToken(); + +#line 1303 "VBNET.ATG" + operatorType = OverloadableOperatorType.BitNot; + break; + } case 32: { lexer.NextToken(); -//#line 1302 "VBNET.ATG" +#line 1305 "VBNET.ATG" operatorType = OverloadableOperatorType.Power; break; } case 44: { lexer.NextToken(); -//#line 1304 "VBNET.ATG" +#line 1307 "VBNET.ATG" operatorType = OverloadableOperatorType.ShiftLeft; break; } case 45: { lexer.NextToken(); -//#line 1306 "VBNET.ATG" +#line 1309 "VBNET.ATG" operatorType = OverloadableOperatorType.ShiftRight; break; } case 20: { lexer.NextToken(); -//#line 1308 "VBNET.ATG" +#line 1311 "VBNET.ATG" operatorType = OverloadableOperatorType.Equality; break; } case 41: { lexer.NextToken(); -//#line 1310 "VBNET.ATG" +#line 1313 "VBNET.ATG" operatorType = OverloadableOperatorType.InEquality; break; } case 40: { lexer.NextToken(); -//#line 1312 "VBNET.ATG" +#line 1315 "VBNET.ATG" operatorType = OverloadableOperatorType.LessThan; break; } case 43: { lexer.NextToken(); -//#line 1314 "VBNET.ATG" +#line 1317 "VBNET.ATG" operatorType = OverloadableOperatorType.LessThanOrEqual; break; } case 39: { lexer.NextToken(); -//#line 1316 "VBNET.ATG" +#line 1319 "VBNET.ATG" operatorType = OverloadableOperatorType.GreaterThan; break; } case 42: { lexer.NextToken(); -//#line 1318 "VBNET.ATG" +#line 1321 "VBNET.ATG" operatorType = OverloadableOperatorType.GreaterThanOrEqual; break; } case 94: { lexer.NextToken(); -//#line 1320 "VBNET.ATG" +#line 1323 "VBNET.ATG" operatorType = OverloadableOperatorType.CType; break; } case 2: case 58: case 62: case 64: case 65: case 66: case 67: case 70: case 87: case 98: case 104: case 107: case 116: case 121: case 126: case 133: case 139: case 143: case 146: case 147: case 170: case 176: case 178: case 184: case 203: case 212: case 213: case 223: case 224: case 230: { Identifier(); -//#line 1324 "VBNET.ATG" +#line 1327 "VBNET.ATG" string opName = t.val; if (string.Equals(opName, "istrue", StringComparison.InvariantCultureIgnoreCase)) { operatorType = OverloadableOperatorType.IsTrue; @@ -3393,10 +3401,10 @@ out OverloadableOperatorType operatorType) { } void FormalParameter( -//#line 2948 "VBNET.ATG" +#line 2951 "VBNET.ATG" out ParameterDeclarationExpression p) { -//#line 2950 "VBNET.ATG" +#line 2953 "VBNET.ATG" AttributeSection section; List attributes = new List(); TypeReference type = null; @@ -3408,36 +3416,36 @@ out ParameterDeclarationExpression p) { while (la.kind == 40) { AttributeSection( -//#line 2960 "VBNET.ATG" +#line 2963 "VBNET.ATG" out section); -//#line 2960 "VBNET.ATG" +#line 2963 "VBNET.ATG" attributes.Add(section); } while (StartOf(29)) { ParameterModifier( -//#line 2961 "VBNET.ATG" +#line 2964 "VBNET.ATG" mod); } Identifier(); -//#line 2962 "VBNET.ATG" +#line 2965 "VBNET.ATG" string parameterName = t.val; if ( -//#line 2963 "VBNET.ATG" +#line 2966 "VBNET.ATG" IsDims()) { ArrayTypeModifiers( -//#line 2963 "VBNET.ATG" +#line 2966 "VBNET.ATG" out arrayModifiers); } if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 2964 "VBNET.ATG" +#line 2967 "VBNET.ATG" out type); } -//#line 2966 "VBNET.ATG" +#line 2969 "VBNET.ATG" if(type != null) { if (arrayModifiers != null) { if (type.RankSpecifier != null) { @@ -3451,11 +3459,11 @@ out type); if (la.kind == 20) { lexer.NextToken(); Expr( -//#line 2976 "VBNET.ATG" +#line 2979 "VBNET.ATG" out expr); } -//#line 2978 "VBNET.ATG" +#line 2981 "VBNET.ATG" mod.Check(); p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr); p.Attributes = attributes; @@ -3465,67 +3473,67 @@ out expr); } void GetAccessorDecl( -//#line 1398 "VBNET.ATG" +#line 1401 "VBNET.ATG" out PropertyGetRegion getBlock, List attributes) { -//#line 1399 "VBNET.ATG" +#line 1402 "VBNET.ATG" Statement stmt = null; Modifiers m; PropertyAccessorAccessModifier( -//#line 1401 "VBNET.ATG" +#line 1404 "VBNET.ATG" out m); Expect(128); -//#line 1403 "VBNET.ATG" +#line 1406 "VBNET.ATG" Location startLocation = t.Location; Expect(1); Block( -//#line 1405 "VBNET.ATG" +#line 1408 "VBNET.ATG" out stmt); -//#line 1406 "VBNET.ATG" +#line 1409 "VBNET.ATG" getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes); Expect(113); Expect(128); -//#line 1408 "VBNET.ATG" +#line 1411 "VBNET.ATG" getBlock.Modifier = m; -//#line 1409 "VBNET.ATG" +#line 1412 "VBNET.ATG" getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; EndOfStmt(); } void SetAccessorDecl( -//#line 1414 "VBNET.ATG" +#line 1417 "VBNET.ATG" out PropertySetRegion setBlock, List attributes) { -//#line 1416 "VBNET.ATG" +#line 1419 "VBNET.ATG" Statement stmt = null; List p = new List(); Modifiers m; PropertyAccessorAccessModifier( -//#line 1421 "VBNET.ATG" +#line 1424 "VBNET.ATG" out m); Expect(198); -//#line 1423 "VBNET.ATG" +#line 1426 "VBNET.ATG" Location startLocation = t.Location; if (la.kind == 37) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 1424 "VBNET.ATG" +#line 1427 "VBNET.ATG" p); } Expect(38); } Expect(1); Block( -//#line 1426 "VBNET.ATG" +#line 1429 "VBNET.ATG" out stmt); -//#line 1428 "VBNET.ATG" +#line 1431 "VBNET.ATG" setBlock = new PropertySetRegion((BlockStatement)stmt, attributes); setBlock.Modifier = m; setBlock.Parameters = p; @@ -3533,116 +3541,116 @@ out stmt); Expect(113); Expect(198); -//#line 1433 "VBNET.ATG" +#line 1436 "VBNET.ATG" setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; EndOfStmt(); } void PropertyAccessorAccessModifier( -//#line 3742 "VBNET.ATG" +#line 3745 "VBNET.ATG" out Modifiers m) { -//#line 3743 "VBNET.ATG" +#line 3746 "VBNET.ATG" m = Modifiers.None; while (StartOf(30)) { if (la.kind == 188) { lexer.NextToken(); -//#line 3745 "VBNET.ATG" +#line 3748 "VBNET.ATG" m |= Modifiers.Public; } else if (la.kind == 187) { lexer.NextToken(); -//#line 3746 "VBNET.ATG" +#line 3749 "VBNET.ATG" m |= Modifiers.Protected; } else if (la.kind == 125) { lexer.NextToken(); -//#line 3747 "VBNET.ATG" +#line 3750 "VBNET.ATG" m |= Modifiers.Internal; } else { lexer.NextToken(); -//#line 3748 "VBNET.ATG" +#line 3751 "VBNET.ATG" m |= Modifiers.Private; } } } void ArrayInitializationModifier( -//#line 1531 "VBNET.ATG" +#line 1534 "VBNET.ATG" out List arrayModifiers) { -//#line 1533 "VBNET.ATG" +#line 1536 "VBNET.ATG" arrayModifiers = null; Expect(37); InitializationRankList( -//#line 1535 "VBNET.ATG" +#line 1538 "VBNET.ATG" out arrayModifiers); Expect(38); } void ArrayNameModifier( -//#line 2775 "VBNET.ATG" +#line 2778 "VBNET.ATG" out ArrayList arrayModifiers) { -//#line 2777 "VBNET.ATG" +#line 2780 "VBNET.ATG" arrayModifiers = null; ArrayTypeModifiers( -//#line 2779 "VBNET.ATG" +#line 2782 "VBNET.ATG" out arrayModifiers); } void InitializationRankList( -//#line 1539 "VBNET.ATG" +#line 1542 "VBNET.ATG" out List rank) { -//#line 1541 "VBNET.ATG" +#line 1544 "VBNET.ATG" rank = new List(); Expression expr = null; Expr( -//#line 1544 "VBNET.ATG" +#line 1547 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); -//#line 1545 "VBNET.ATG" +#line 1548 "VBNET.ATG" EnsureIsZero(expr); Expr( -//#line 1546 "VBNET.ATG" +#line 1549 "VBNET.ATG" out expr); } -//#line 1548 "VBNET.ATG" +#line 1551 "VBNET.ATG" if (expr != null) { rank.Add(expr); } while (la.kind == 22) { lexer.NextToken(); Expr( -//#line 1550 "VBNET.ATG" +#line 1553 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); -//#line 1551 "VBNET.ATG" +#line 1554 "VBNET.ATG" EnsureIsZero(expr); Expr( -//#line 1552 "VBNET.ATG" +#line 1555 "VBNET.ATG" out expr); } -//#line 1554 "VBNET.ATG" +#line 1557 "VBNET.ATG" if (expr != null) { rank.Add(expr); } } } void CollectionInitializer( -//#line 1559 "VBNET.ATG" +#line 1562 "VBNET.ATG" out CollectionInitializerExpression outExpr) { -//#line 1561 "VBNET.ATG" +#line 1564 "VBNET.ATG" Expression expr = null; CollectionInitializerExpression initializer = new CollectionInitializerExpression(); Location startLocation = la.Location; @@ -3650,27 +3658,27 @@ out CollectionInitializerExpression outExpr) { Expect(35); if (StartOf(24)) { Expr( -//#line 1567 "VBNET.ATG" +#line 1570 "VBNET.ATG" out expr); -//#line 1569 "VBNET.ATG" +#line 1572 "VBNET.ATG" if (expr != null) { initializer.CreateExpressions.Add(expr); } while ( -//#line 1572 "VBNET.ATG" +#line 1575 "VBNET.ATG" NotFinalComma()) { Expect(22); Expr( -//#line 1572 "VBNET.ATG" +#line 1575 "VBNET.ATG" out expr); -//#line 1573 "VBNET.ATG" +#line 1576 "VBNET.ATG" if (expr != null) { initializer.CreateExpressions.Add(expr); } } } Expect(36); -//#line 1578 "VBNET.ATG" +#line 1581 "VBNET.ATG" outExpr = initializer; outExpr.StartLocation = startLocation; outExpr.EndLocation = t.EndLocation; @@ -3678,10 +3686,10 @@ out expr); } void EventMemberSpecifier( -//#line 1651 "VBNET.ATG" +#line 1654 "VBNET.ATG" out string name) { -//#line 1652 "VBNET.ATG" +#line 1655 "VBNET.ATG" string eventName; if (StartOf(4)) { Identifier(); @@ -3691,182 +3699,182 @@ out string name) { lexer.NextToken(); } else SynErr(275); -//#line 1655 "VBNET.ATG" +#line 1658 "VBNET.ATG" name = t.val; Expect(26); IdentifierOrKeyword( -//#line 1657 "VBNET.ATG" +#line 1660 "VBNET.ATG" out eventName); -//#line 1658 "VBNET.ATG" +#line 1661 "VBNET.ATG" name = name + "." + eventName; } void IdentifierOrKeyword( -//#line 3675 "VBNET.ATG" +#line 3678 "VBNET.ATG" out string name) { lexer.NextToken(); -//#line 3677 "VBNET.ATG" +#line 3680 "VBNET.ATG" name = t.val; } void QueryExpr( -//#line 2296 "VBNET.ATG" +#line 2299 "VBNET.ATG" out Expression expr) { -//#line 2298 "VBNET.ATG" +#line 2301 "VBNET.ATG" QueryExpressionVB qexpr = new QueryExpressionVB(); qexpr.StartLocation = la.Location; expr = qexpr; FromOrAggregateQueryOperator( -//#line 2302 "VBNET.ATG" +#line 2305 "VBNET.ATG" qexpr.Clauses); while (StartOf(31)) { QueryOperator( -//#line 2303 "VBNET.ATG" +#line 2306 "VBNET.ATG" qexpr.Clauses); } -//#line 2305 "VBNET.ATG" +#line 2308 "VBNET.ATG" qexpr.EndLocation = t.EndLocation; } void LambdaExpr( -//#line 2210 "VBNET.ATG" +#line 2213 "VBNET.ATG" out Expression expr) { -//#line 2212 "VBNET.ATG" +#line 2215 "VBNET.ATG" LambdaExpression lambda = null; if (la.kind == 210) { SubLambdaExpression( -//#line 2214 "VBNET.ATG" +#line 2217 "VBNET.ATG" out lambda); } else if (la.kind == 127) { FunctionLambdaExpression( -//#line 2215 "VBNET.ATG" +#line 2218 "VBNET.ATG" out lambda); } else SynErr(276); -//#line 2216 "VBNET.ATG" +#line 2219 "VBNET.ATG" expr = lambda; } void DisjunctionExpr( -//#line 1960 "VBNET.ATG" +#line 1963 "VBNET.ATG" out Expression outExpr) { -//#line 1962 "VBNET.ATG" +#line 1965 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; Location startLocation = la.Location; ConjunctionExpr( -//#line 1966 "VBNET.ATG" +#line 1969 "VBNET.ATG" out outExpr); while (la.kind == 175 || la.kind == 177 || la.kind == 236) { if (la.kind == 175) { lexer.NextToken(); -//#line 1969 "VBNET.ATG" +#line 1972 "VBNET.ATG" op = BinaryOperatorType.BitwiseOr; } else if (la.kind == 177) { lexer.NextToken(); -//#line 1970 "VBNET.ATG" +#line 1973 "VBNET.ATG" op = BinaryOperatorType.LogicalOr; } else { lexer.NextToken(); -//#line 1971 "VBNET.ATG" +#line 1974 "VBNET.ATG" op = BinaryOperatorType.ExclusiveOr; } ConjunctionExpr( -//#line 1973 "VBNET.ATG" +#line 1976 "VBNET.ATG" out expr); -//#line 1973 "VBNET.ATG" +#line 1976 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void AssignmentOperator( -//#line 1678 "VBNET.ATG" +#line 1681 "VBNET.ATG" out AssignmentOperatorType op) { -//#line 1679 "VBNET.ATG" +#line 1682 "VBNET.ATG" op = AssignmentOperatorType.None; switch (la.kind) { case 20: { lexer.NextToken(); -//#line 1680 "VBNET.ATG" +#line 1683 "VBNET.ATG" op = AssignmentOperatorType.Assign; break; } case 54: { lexer.NextToken(); -//#line 1681 "VBNET.ATG" +#line 1684 "VBNET.ATG" op = AssignmentOperatorType.ConcatString; break; } case 46: { lexer.NextToken(); -//#line 1682 "VBNET.ATG" +#line 1685 "VBNET.ATG" op = AssignmentOperatorType.Add; break; } case 48: { lexer.NextToken(); -//#line 1683 "VBNET.ATG" +#line 1686 "VBNET.ATG" op = AssignmentOperatorType.Subtract; break; } case 49: { lexer.NextToken(); -//#line 1684 "VBNET.ATG" +#line 1687 "VBNET.ATG" op = AssignmentOperatorType.Multiply; break; } case 50: { lexer.NextToken(); -//#line 1685 "VBNET.ATG" +#line 1688 "VBNET.ATG" op = AssignmentOperatorType.Divide; break; } case 51: { lexer.NextToken(); -//#line 1686 "VBNET.ATG" +#line 1689 "VBNET.ATG" op = AssignmentOperatorType.DivideInteger; break; } case 47: { lexer.NextToken(); -//#line 1687 "VBNET.ATG" +#line 1690 "VBNET.ATG" op = AssignmentOperatorType.Power; break; } case 52: { lexer.NextToken(); -//#line 1688 "VBNET.ATG" +#line 1691 "VBNET.ATG" op = AssignmentOperatorType.ShiftLeft; break; } case 53: { lexer.NextToken(); -//#line 1689 "VBNET.ATG" +#line 1692 "VBNET.ATG" op = AssignmentOperatorType.ShiftRight; break; } @@ -3875,13 +3883,13 @@ out AssignmentOperatorType op) { } void SimpleExpr( -//#line 1693 "VBNET.ATG" +#line 1696 "VBNET.ATG" out Expression pexpr) { -//#line 1694 "VBNET.ATG" +#line 1697 "VBNET.ATG" string name; Location startLocation = la.Location; SimpleNonInvocationExpression( -//#line 1697 "VBNET.ATG" +#line 1700 "VBNET.ATG" out pexpr); while (StartOf(32)) { if (la.kind == 26) { @@ -3889,73 +3897,73 @@ out pexpr); if (la.kind == 10) { lexer.NextToken(); IdentifierOrKeyword( -//#line 1700 "VBNET.ATG" +#line 1703 "VBNET.ATG" out name); Expect(11); -//#line 1701 "VBNET.ATG" +#line 1704 "VBNET.ATG" pexpr = new XmlMemberAccessExpression(pexpr, XmlAxisType.Element, name, true); } else if (StartOf(33)) { IdentifierOrKeyword( -//#line 1702 "VBNET.ATG" +#line 1705 "VBNET.ATG" out name); -//#line 1703 "VBNET.ATG" +#line 1706 "VBNET.ATG" pexpr = new MemberReferenceExpression(pexpr, name) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else SynErr(278); if ( -//#line 1705 "VBNET.ATG" +#line 1708 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { lexer.NextToken(); Expect(169); TypeArgumentList( -//#line 1706 "VBNET.ATG" +#line 1709 "VBNET.ATG" ((MemberReferenceExpression)pexpr).TypeArguments); Expect(38); } } else if (la.kind == 29) { lexer.NextToken(); IdentifierOrKeyword( -//#line 1708 "VBNET.ATG" +#line 1711 "VBNET.ATG" out name); -//#line 1708 "VBNET.ATG" +#line 1711 "VBNET.ATG" pexpr = new BinaryOperatorExpression(pexpr, BinaryOperatorType.DictionaryAccess, new PrimitiveExpression(name, name) { StartLocation = t.Location, EndLocation = t.EndLocation }); } else if (la.kind == 27 || la.kind == 28) { -//#line 1709 "VBNET.ATG" +#line 1712 "VBNET.ATG" XmlAxisType type = XmlAxisType.Attribute; bool isXmlName = false; if (la.kind == 28) { lexer.NextToken(); } else if (la.kind == 27) { lexer.NextToken(); -//#line 1710 "VBNET.ATG" +#line 1713 "VBNET.ATG" type = XmlAxisType.Descendents; } else SynErr(279); if (la.kind == 10) { lexer.NextToken(); -//#line 1710 "VBNET.ATG" +#line 1713 "VBNET.ATG" isXmlName = true; } IdentifierOrKeyword( -//#line 1710 "VBNET.ATG" +#line 1713 "VBNET.ATG" out name); if (la.kind == 11) { lexer.NextToken(); } -//#line 1711 "VBNET.ATG" +#line 1714 "VBNET.ATG" pexpr = new XmlMemberAccessExpression(pexpr, type, name, isXmlName); } else { InvocationExpression( -//#line 1712 "VBNET.ATG" +#line 1715 "VBNET.ATG" ref pexpr); } } -//#line 1716 "VBNET.ATG" +#line 1719 "VBNET.ATG" if (pexpr != null) { pexpr.StartLocation = startLocation; pexpr.EndLocation = t.EndLocation; @@ -3964,10 +3972,10 @@ ref pexpr); } void SimpleNonInvocationExpression( -//#line 1723 "VBNET.ATG" +#line 1726 "VBNET.ATG" out Expression pexpr) { -//#line 1725 "VBNET.ATG" +#line 1728 "VBNET.ATG" Expression expr; CollectionInitializerExpression cie; TypeReference type = null; @@ -3980,98 +3988,98 @@ out Expression pexpr) { case 3: { lexer.NextToken(); -//#line 1735 "VBNET.ATG" +#line 1738 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 4: { lexer.NextToken(); -//#line 1736 "VBNET.ATG" +#line 1739 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 7: { lexer.NextToken(); -//#line 1737 "VBNET.ATG" +#line 1740 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 6: { lexer.NextToken(); -//#line 1738 "VBNET.ATG" +#line 1741 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 5: { lexer.NextToken(); -//#line 1739 "VBNET.ATG" +#line 1742 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 9: { lexer.NextToken(); -//#line 1740 "VBNET.ATG" +#line 1743 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 8: { lexer.NextToken(); -//#line 1741 "VBNET.ATG" +#line 1744 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 217: { lexer.NextToken(); -//#line 1743 "VBNET.ATG" +#line 1746 "VBNET.ATG" pexpr = new PrimitiveExpression(true, "true"); break; } case 122: { lexer.NextToken(); -//#line 1744 "VBNET.ATG" +#line 1747 "VBNET.ATG" pexpr = new PrimitiveExpression(false, "false"); break; } case 165: { lexer.NextToken(); -//#line 1745 "VBNET.ATG" +#line 1748 "VBNET.ATG" pexpr = new PrimitiveExpression(null, "null"); break; } case 37: { lexer.NextToken(); Expr( -//#line 1746 "VBNET.ATG" +#line 1749 "VBNET.ATG" out expr); Expect(38); -//#line 1746 "VBNET.ATG" +#line 1749 "VBNET.ATG" pexpr = new ParenthesizedExpression(expr); break; } case 2: case 58: case 62: case 64: case 65: case 66: case 67: case 70: case 87: case 98: case 104: case 107: case 116: case 121: case 126: case 133: case 139: case 143: case 146: case 147: case 170: case 176: case 178: case 184: case 203: case 212: case 213: case 223: case 224: case 230: { Identifier(); -//#line 1748 "VBNET.ATG" +#line 1751 "VBNET.ATG" pexpr = new IdentifierExpression(t.val); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; if ( -//#line 1751 "VBNET.ATG" +#line 1754 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { lexer.NextToken(); Expect(169); TypeArgumentList( -//#line 1752 "VBNET.ATG" +#line 1755 "VBNET.ATG" ((IdentifierExpression)pexpr).TypeArguments); Expect(38); } @@ -4079,51 +4087,51 @@ la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { } case 68: case 71: case 82: case 99: case 100: case 109: case 141: case 151: case 168: case 196: case 201: case 202: case 208: case 221: case 222: case 225: { -//#line 1754 "VBNET.ATG" +#line 1757 "VBNET.ATG" string val = String.Empty; if (StartOf(12)) { PrimitiveTypeName( -//#line 1755 "VBNET.ATG" +#line 1758 "VBNET.ATG" out val); } else if (la.kind == 168) { lexer.NextToken(); -//#line 1755 "VBNET.ATG" +#line 1758 "VBNET.ATG" val = "System.Object"; } else SynErr(280); -//#line 1756 "VBNET.ATG" +#line 1759 "VBNET.ATG" pexpr = new TypeReferenceExpression(new TypeReference(val, true)); break; } case 153: { lexer.NextToken(); -//#line 1757 "VBNET.ATG" +#line 1760 "VBNET.ATG" pexpr = new ThisReferenceExpression(); break; } case 158: case 159: { -//#line 1758 "VBNET.ATG" +#line 1761 "VBNET.ATG" Expression retExpr = null; if (la.kind == 158) { lexer.NextToken(); -//#line 1759 "VBNET.ATG" +#line 1762 "VBNET.ATG" retExpr = new BaseReferenceExpression() { StartLocation = t.Location, EndLocation = t.EndLocation }; } else if (la.kind == 159) { lexer.NextToken(); -//#line 1760 "VBNET.ATG" +#line 1763 "VBNET.ATG" retExpr = new ClassReferenceExpression() { StartLocation = t.Location, EndLocation = t.EndLocation }; } else SynErr(281); Expect(26); IdentifierOrKeyword( -//#line 1762 "VBNET.ATG" +#line 1765 "VBNET.ATG" out name); -//#line 1762 "VBNET.ATG" +#line 1765 "VBNET.ATG" pexpr = new MemberReferenceExpression(retExpr, name) { StartLocation = startLocation, EndLocation = t.EndLocation }; break; } @@ -4132,86 +4140,86 @@ out name); Expect(26); Identifier(); -//#line 1764 "VBNET.ATG" +#line 1767 "VBNET.ATG" type = new TypeReference(t.val ?? ""); -//#line 1766 "VBNET.ATG" +#line 1769 "VBNET.ATG" type.IsGlobal = true; -//#line 1767 "VBNET.ATG" +#line 1770 "VBNET.ATG" pexpr = new TypeReferenceExpression(type); break; } case 162: { ObjectCreateExpression( -//#line 1768 "VBNET.ATG" +#line 1771 "VBNET.ATG" out expr); -//#line 1768 "VBNET.ATG" +#line 1771 "VBNET.ATG" pexpr = expr; break; } case 35: { CollectionInitializer( -//#line 1769 "VBNET.ATG" +#line 1772 "VBNET.ATG" out cie); -//#line 1769 "VBNET.ATG" +#line 1772 "VBNET.ATG" pexpr = cie; break; } case 94: case 106: case 219: { -//#line 1771 "VBNET.ATG" +#line 1774 "VBNET.ATG" CastType castType = CastType.Cast; if (la.kind == 106) { lexer.NextToken(); } else if (la.kind == 94) { lexer.NextToken(); -//#line 1773 "VBNET.ATG" +#line 1776 "VBNET.ATG" castType = CastType.Conversion; } else if (la.kind == 219) { lexer.NextToken(); -//#line 1774 "VBNET.ATG" +#line 1777 "VBNET.ATG" castType = CastType.TryCast; } else SynErr(282); Expect(37); Expr( -//#line 1776 "VBNET.ATG" +#line 1779 "VBNET.ATG" out expr); Expect(22); TypeName( -//#line 1776 "VBNET.ATG" +#line 1779 "VBNET.ATG" out type); Expect(38); -//#line 1777 "VBNET.ATG" +#line 1780 "VBNET.ATG" pexpr = new CastExpression(type, expr, castType); break; } case 76: case 77: case 78: case 79: case 80: case 81: case 83: case 85: case 86: case 90: case 91: case 92: case 93: case 95: case 96: case 97: { CastTarget( -//#line 1778 "VBNET.ATG" +#line 1781 "VBNET.ATG" out type); Expect(37); Expr( -//#line 1778 "VBNET.ATG" +#line 1781 "VBNET.ATG" out expr); Expect(38); -//#line 1778 "VBNET.ATG" +#line 1781 "VBNET.ATG" pexpr = new CastExpression(type, expr, CastType.PrimitiveConversion); break; } case 57: { lexer.NextToken(); Expr( -//#line 1779 "VBNET.ATG" +#line 1782 "VBNET.ATG" out expr); -//#line 1779 "VBNET.ATG" +#line 1782 "VBNET.ATG" pexpr = new AddressOfExpression(expr); break; } @@ -4219,37 +4227,37 @@ out expr); lexer.NextToken(); Expect(37); GetTypeTypeName( -//#line 1780 "VBNET.ATG" +#line 1783 "VBNET.ATG" out type); Expect(38); -//#line 1780 "VBNET.ATG" +#line 1783 "VBNET.ATG" pexpr = new TypeOfExpression(type); break; } case 220: { lexer.NextToken(); SimpleExpr( -//#line 1781 "VBNET.ATG" +#line 1784 "VBNET.ATG" out expr); Expect(144); TypeName( -//#line 1781 "VBNET.ATG" +#line 1784 "VBNET.ATG" out type); -//#line 1781 "VBNET.ATG" +#line 1784 "VBNET.ATG" pexpr = new TypeOfIsExpression(expr, type); break; } case 135: { ConditionalExpression( -//#line 1782 "VBNET.ATG" +#line 1785 "VBNET.ATG" out pexpr); break; } case 10: case 16: case 17: case 18: case 19: { XmlLiteralExpression( -//#line 1783 "VBNET.ATG" +#line 1786 "VBNET.ATG" out pexpr); break; } @@ -4260,62 +4268,62 @@ out pexpr); if (la.kind == 10) { lexer.NextToken(); IdentifierOrKeyword( -//#line 1789 "VBNET.ATG" +#line 1792 "VBNET.ATG" out name); Expect(11); -//#line 1790 "VBNET.ATG" +#line 1793 "VBNET.ATG" pexpr = new XmlMemberAccessExpression(null, XmlAxisType.Element, name, true) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else if (StartOf(33)) { IdentifierOrKeyword( -//#line 1791 "VBNET.ATG" +#line 1794 "VBNET.ATG" out name); -//#line 1792 "VBNET.ATG" +#line 1795 "VBNET.ATG" pexpr = new MemberReferenceExpression(null, name) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else SynErr(283); } else if (la.kind == 29) { lexer.NextToken(); IdentifierOrKeyword( -//#line 1794 "VBNET.ATG" +#line 1797 "VBNET.ATG" out name); -//#line 1794 "VBNET.ATG" +#line 1797 "VBNET.ATG" pexpr = new BinaryOperatorExpression(null, BinaryOperatorType.DictionaryAccess, new PrimitiveExpression(name, name) { StartLocation = t.Location, EndLocation = t.EndLocation }); } else { -//#line 1795 "VBNET.ATG" +#line 1798 "VBNET.ATG" XmlAxisType axisType = XmlAxisType.Element; bool isXmlIdentifier = false; if (la.kind == 27) { lexer.NextToken(); -//#line 1796 "VBNET.ATG" +#line 1799 "VBNET.ATG" axisType = XmlAxisType.Descendents; } else if (la.kind == 28) { lexer.NextToken(); -//#line 1796 "VBNET.ATG" +#line 1799 "VBNET.ATG" axisType = XmlAxisType.Attribute; } else SynErr(284); if (la.kind == 10) { lexer.NextToken(); -//#line 1797 "VBNET.ATG" +#line 1800 "VBNET.ATG" isXmlIdentifier = true; } IdentifierOrKeyword( -//#line 1797 "VBNET.ATG" +#line 1800 "VBNET.ATG" out name); if (la.kind == 11) { lexer.NextToken(); } -//#line 1798 "VBNET.ATG" +#line 1801 "VBNET.ATG" pexpr = new XmlMemberAccessExpression(null, axisType, name, isXmlIdentifier); } } else SynErr(285); -//#line 1803 "VBNET.ATG" +#line 1806 "VBNET.ATG" if (pexpr != null) { pexpr.StartLocation = startLocation; pexpr.EndLocation = t.EndLocation; @@ -4324,161 +4332,161 @@ out name); } void TypeArgumentList( -//#line 2811 "VBNET.ATG" +#line 2814 "VBNET.ATG" List typeArguments) { -//#line 2813 "VBNET.ATG" +#line 2816 "VBNET.ATG" TypeReference typeref; TypeName( -//#line 2815 "VBNET.ATG" +#line 2818 "VBNET.ATG" out typeref); -//#line 2815 "VBNET.ATG" +#line 2818 "VBNET.ATG" if (typeref != null) typeArguments.Add(typeref); while (la.kind == 22) { lexer.NextToken(); TypeName( -//#line 2818 "VBNET.ATG" +#line 2821 "VBNET.ATG" out typeref); -//#line 2818 "VBNET.ATG" +#line 2821 "VBNET.ATG" if (typeref != null) typeArguments.Add(typeref); } } void InvocationExpression( -//#line 1924 "VBNET.ATG" +#line 1927 "VBNET.ATG" ref Expression pexpr) { -//#line 1925 "VBNET.ATG" +#line 1928 "VBNET.ATG" List parameters = null; Expect(37); -//#line 1927 "VBNET.ATG" +#line 1930 "VBNET.ATG" Location start = t.Location; ArgumentList( -//#line 1928 "VBNET.ATG" +#line 1931 "VBNET.ATG" out parameters); Expect(38); -//#line 1931 "VBNET.ATG" +#line 1934 "VBNET.ATG" pexpr = new InvocationExpression(pexpr, parameters); -//#line 1933 "VBNET.ATG" +#line 1936 "VBNET.ATG" pexpr.StartLocation = start; pexpr.EndLocation = t.Location; } void PrimitiveTypeName( -//#line 3682 "VBNET.ATG" +#line 3685 "VBNET.ATG" out string type) { -//#line 3683 "VBNET.ATG" +#line 3686 "VBNET.ATG" type = String.Empty; switch (la.kind) { case 68: { lexer.NextToken(); -//#line 3684 "VBNET.ATG" +#line 3687 "VBNET.ATG" type = "System.Boolean"; break; } case 99: { lexer.NextToken(); -//#line 3685 "VBNET.ATG" +#line 3688 "VBNET.ATG" type = "System.DateTime"; break; } case 82: { lexer.NextToken(); -//#line 3686 "VBNET.ATG" +#line 3689 "VBNET.ATG" type = "System.Char"; break; } case 208: { lexer.NextToken(); -//#line 3687 "VBNET.ATG" +#line 3690 "VBNET.ATG" type = "System.String"; break; } case 100: { lexer.NextToken(); -//#line 3688 "VBNET.ATG" +#line 3691 "VBNET.ATG" type = "System.Decimal"; break; } case 71: { lexer.NextToken(); -//#line 3689 "VBNET.ATG" +#line 3692 "VBNET.ATG" type = "System.Byte"; break; } case 201: { lexer.NextToken(); -//#line 3690 "VBNET.ATG" +#line 3693 "VBNET.ATG" type = "System.Int16"; break; } case 141: { lexer.NextToken(); -//#line 3691 "VBNET.ATG" +#line 3694 "VBNET.ATG" type = "System.Int32"; break; } case 151: { lexer.NextToken(); -//#line 3692 "VBNET.ATG" +#line 3695 "VBNET.ATG" type = "System.Int64"; break; } case 202: { lexer.NextToken(); -//#line 3693 "VBNET.ATG" +#line 3696 "VBNET.ATG" type = "System.Single"; break; } case 109: { lexer.NextToken(); -//#line 3694 "VBNET.ATG" +#line 3697 "VBNET.ATG" type = "System.Double"; break; } case 221: { lexer.NextToken(); -//#line 3695 "VBNET.ATG" +#line 3698 "VBNET.ATG" type = "System.UInt32"; break; } case 222: { lexer.NextToken(); -//#line 3696 "VBNET.ATG" +#line 3699 "VBNET.ATG" type = "System.UInt64"; break; } case 225: { lexer.NextToken(); -//#line 3697 "VBNET.ATG" +#line 3700 "VBNET.ATG" type = "System.UInt16"; break; } case 196: { lexer.NextToken(); -//#line 3698 "VBNET.ATG" +#line 3701 "VBNET.ATG" type = "System.SByte"; break; } @@ -4487,122 +4495,122 @@ out string type) { } void CastTarget( -//#line 1938 "VBNET.ATG" +#line 1941 "VBNET.ATG" out TypeReference type) { -//#line 1940 "VBNET.ATG" +#line 1943 "VBNET.ATG" type = null; switch (la.kind) { case 76: { lexer.NextToken(); -//#line 1942 "VBNET.ATG" +#line 1945 "VBNET.ATG" type = new TypeReference("System.Boolean", true); break; } case 77: { lexer.NextToken(); -//#line 1943 "VBNET.ATG" +#line 1946 "VBNET.ATG" type = new TypeReference("System.Byte", true); break; } case 90: { lexer.NextToken(); -//#line 1944 "VBNET.ATG" +#line 1947 "VBNET.ATG" type = new TypeReference("System.SByte", true); break; } case 78: { lexer.NextToken(); -//#line 1945 "VBNET.ATG" +#line 1948 "VBNET.ATG" type = new TypeReference("System.Char", true); break; } case 79: { lexer.NextToken(); -//#line 1946 "VBNET.ATG" +#line 1949 "VBNET.ATG" type = new TypeReference("System.DateTime", true); break; } case 81: { lexer.NextToken(); -//#line 1947 "VBNET.ATG" +#line 1950 "VBNET.ATG" type = new TypeReference("System.Decimal", true); break; } case 80: { lexer.NextToken(); -//#line 1948 "VBNET.ATG" +#line 1951 "VBNET.ATG" type = new TypeReference("System.Double", true); break; } case 91: { lexer.NextToken(); -//#line 1949 "VBNET.ATG" +#line 1952 "VBNET.ATG" type = new TypeReference("System.Int16", true); break; } case 83: { lexer.NextToken(); -//#line 1950 "VBNET.ATG" +#line 1953 "VBNET.ATG" type = new TypeReference("System.Int32", true); break; } case 85: { lexer.NextToken(); -//#line 1951 "VBNET.ATG" +#line 1954 "VBNET.ATG" type = new TypeReference("System.Int64", true); break; } case 97: { lexer.NextToken(); -//#line 1952 "VBNET.ATG" +#line 1955 "VBNET.ATG" type = new TypeReference("System.UInt16", true); break; } case 95: { lexer.NextToken(); -//#line 1953 "VBNET.ATG" +#line 1956 "VBNET.ATG" type = new TypeReference("System.UInt32", true); break; } case 96: { lexer.NextToken(); -//#line 1954 "VBNET.ATG" +#line 1957 "VBNET.ATG" type = new TypeReference("System.UInt64", true); break; } case 86: { lexer.NextToken(); -//#line 1955 "VBNET.ATG" +#line 1958 "VBNET.ATG" type = new TypeReference("System.Object", true); break; } case 92: { lexer.NextToken(); -//#line 1956 "VBNET.ATG" +#line 1959 "VBNET.ATG" type = new TypeReference("System.Single", true); break; } case 93: { lexer.NextToken(); -//#line 1957 "VBNET.ATG" +#line 1960 "VBNET.ATG" type = new TypeReference("System.String", true); break; } @@ -4611,19 +4619,19 @@ out TypeReference type) { } void GetTypeTypeName( -//#line 2710 "VBNET.ATG" +#line 2713 "VBNET.ATG" out TypeReference typeref) { -//#line 2711 "VBNET.ATG" +#line 2714 "VBNET.ATG" ArrayList rank = null; NonArrayTypeName( -//#line 2713 "VBNET.ATG" +#line 2716 "VBNET.ATG" out typeref, true); ArrayTypeModifiers( -//#line 2714 "VBNET.ATG" +#line 2717 "VBNET.ATG" out rank); -//#line 2715 "VBNET.ATG" +#line 2718 "VBNET.ATG" if (rank != null && typeref != null) { typeref.RankSpecifier = (int[])rank.ToArray(typeof(int)); } @@ -4631,10 +4639,10 @@ out rank); } void ConditionalExpression( -//#line 1890 "VBNET.ATG" +#line 1893 "VBNET.ATG" out Expression expr) { -//#line 1892 "VBNET.ATG" +#line 1895 "VBNET.ATG" ConditionalExpression conditionalExpression = new ConditionalExpression(); BinaryOperatorExpression binaryOperatorExpression = new BinaryOperatorExpression(); conditionalExpression.StartLocation = binaryOperatorExpression.StartLocation = la.Location; @@ -4646,21 +4654,21 @@ out Expression expr) { Expect(135); Expect(37); Expr( -//#line 1901 "VBNET.ATG" +#line 1904 "VBNET.ATG" out condition); Expect(22); Expr( -//#line 1901 "VBNET.ATG" +#line 1904 "VBNET.ATG" out trueExpr); if (la.kind == 22) { lexer.NextToken(); Expr( -//#line 1901 "VBNET.ATG" +#line 1904 "VBNET.ATG" out falseExpr); } Expect(38); -//#line 1903 "VBNET.ATG" +#line 1906 "VBNET.ATG" if(falseExpr != null) { conditionalExpression.Condition = condition; @@ -4683,50 +4691,50 @@ out falseExpr); } void XmlLiteralExpression( -//#line 1810 "VBNET.ATG" +#line 1813 "VBNET.ATG" out Expression pexpr) { -//#line 1812 "VBNET.ATG" +#line 1815 "VBNET.ATG" List exprs = new List(); XmlExpression currentExpression = null; if (StartOf(36)) { XmlContentExpression( -//#line 1817 "VBNET.ATG" +#line 1820 "VBNET.ATG" exprs); while (StartOf(36)) { XmlContentExpression( -//#line 1817 "VBNET.ATG" +#line 1820 "VBNET.ATG" exprs); } if (la.kind == 10) { XmlElement( -//#line 1817 "VBNET.ATG" +#line 1820 "VBNET.ATG" out currentExpression); -//#line 1817 "VBNET.ATG" +#line 1820 "VBNET.ATG" exprs.Add(currentExpression); while (StartOf(36)) { XmlContentExpression( -//#line 1817 "VBNET.ATG" +#line 1820 "VBNET.ATG" exprs); } } } else if (la.kind == 10) { XmlElement( -//#line 1819 "VBNET.ATG" +#line 1822 "VBNET.ATG" out currentExpression); -//#line 1819 "VBNET.ATG" +#line 1822 "VBNET.ATG" exprs.Add(currentExpression); while (StartOf(36)) { XmlContentExpression( -//#line 1819 "VBNET.ATG" +#line 1822 "VBNET.ATG" exprs); } } else SynErr(288); -//#line 1822 "VBNET.ATG" +#line 1825 "VBNET.ATG" if (exprs.Count > 1) { pexpr = new XmlDocumentExpression() { Expressions = exprs }; } else { @@ -4736,34 +4744,34 @@ exprs); } void XmlContentExpression( -//#line 1830 "VBNET.ATG" +#line 1833 "VBNET.ATG" List exprs) { -//#line 1831 "VBNET.ATG" +#line 1834 "VBNET.ATG" XmlContentExpression expr = null; if (la.kind == 16) { lexer.NextToken(); -//#line 1833 "VBNET.ATG" +#line 1836 "VBNET.ATG" expr = new XmlContentExpression(t.val, XmlContentType.Text); } else if (la.kind == 18) { lexer.NextToken(); -//#line 1834 "VBNET.ATG" +#line 1837 "VBNET.ATG" expr = new XmlContentExpression(t.val, XmlContentType.CData); } else if (la.kind == 17) { lexer.NextToken(); -//#line 1835 "VBNET.ATG" +#line 1838 "VBNET.ATG" expr = new XmlContentExpression(t.val, XmlContentType.Comment); } else if (la.kind == 19) { lexer.NextToken(); -//#line 1836 "VBNET.ATG" +#line 1839 "VBNET.ATG" expr = new XmlContentExpression(t.val, XmlContentType.ProcessingInstruction); } else SynErr(289); -//#line 1839 "VBNET.ATG" +#line 1842 "VBNET.ATG" expr.StartLocation = t.Location; expr.EndLocation = t.EndLocation; exprs.Add(expr); @@ -4771,54 +4779,54 @@ List exprs) { } void XmlElement( -//#line 1865 "VBNET.ATG" +#line 1868 "VBNET.ATG" out XmlExpression expr) { -//#line 1866 "VBNET.ATG" +#line 1869 "VBNET.ATG" XmlElementExpression el = new XmlElementExpression(); Expect(10); -//#line 1869 "VBNET.ATG" +#line 1872 "VBNET.ATG" el.StartLocation = t.Location; if (la.kind == 12) { lexer.NextToken(); -//#line 1870 "VBNET.ATG" +#line 1873 "VBNET.ATG" Expression innerExpression; Expr( -//#line 1870 "VBNET.ATG" +#line 1873 "VBNET.ATG" out innerExpression); Expect(13); -//#line 1871 "VBNET.ATG" +#line 1874 "VBNET.ATG" el.NameExpression = new XmlEmbeddedExpression() { InlineVBExpression = innerExpression }; } else if (StartOf(4)) { Identifier(); -//#line 1872 "VBNET.ATG" +#line 1875 "VBNET.ATG" el.XmlName = t.val; } else SynErr(290); while (StartOf(37)) { XmlAttribute( -//#line 1872 "VBNET.ATG" +#line 1875 "VBNET.ATG" el.Attributes); } if (la.kind == 14) { lexer.NextToken(); -//#line 1873 "VBNET.ATG" +#line 1876 "VBNET.ATG" el.EndLocation = t.EndLocation; } else if (la.kind == 11) { lexer.NextToken(); while (StartOf(38)) { -//#line 1873 "VBNET.ATG" +#line 1876 "VBNET.ATG" XmlExpression child; XmlNestedContent( -//#line 1873 "VBNET.ATG" +#line 1876 "VBNET.ATG" out child); -//#line 1873 "VBNET.ATG" +#line 1876 "VBNET.ATG" el.Children.Add(child); } Expect(15); @@ -4827,73 +4835,73 @@ out child); } Expect(11); -//#line 1873 "VBNET.ATG" +#line 1876 "VBNET.ATG" el.EndLocation = t.EndLocation; } else SynErr(291); -//#line 1875 "VBNET.ATG" +#line 1878 "VBNET.ATG" expr = el; } void XmlNestedContent( -//#line 1845 "VBNET.ATG" +#line 1848 "VBNET.ATG" out XmlExpression expr) { -//#line 1846 "VBNET.ATG" +#line 1849 "VBNET.ATG" XmlExpression tmpExpr = null; Location start = la.Location; switch (la.kind) { case 16: { lexer.NextToken(); -//#line 1849 "VBNET.ATG" +#line 1852 "VBNET.ATG" tmpExpr = new XmlContentExpression(t.val, XmlContentType.Text); break; } case 18: { lexer.NextToken(); -//#line 1850 "VBNET.ATG" +#line 1853 "VBNET.ATG" tmpExpr = new XmlContentExpression(t.val, XmlContentType.CData); break; } case 17: { lexer.NextToken(); -//#line 1851 "VBNET.ATG" +#line 1854 "VBNET.ATG" tmpExpr = new XmlContentExpression(t.val, XmlContentType.Comment); break; } case 19: { lexer.NextToken(); -//#line 1852 "VBNET.ATG" +#line 1855 "VBNET.ATG" tmpExpr = new XmlContentExpression(t.val, XmlContentType.ProcessingInstruction); break; } case 12: { lexer.NextToken(); -//#line 1853 "VBNET.ATG" +#line 1856 "VBNET.ATG" Expression innerExpression; Expr( -//#line 1853 "VBNET.ATG" +#line 1856 "VBNET.ATG" out innerExpression); Expect(13); -//#line 1853 "VBNET.ATG" +#line 1856 "VBNET.ATG" tmpExpr = new XmlEmbeddedExpression() { InlineVBExpression = innerExpression }; break; } case 10: { XmlElement( -//#line 1854 "VBNET.ATG" +#line 1857 "VBNET.ATG" out tmpExpr); break; } default: SynErr(292); break; } -//#line 1857 "VBNET.ATG" +#line 1860 "VBNET.ATG" if (tmpExpr.StartLocation.IsEmpty) tmpExpr.StartLocation = start; if (tmpExpr.EndLocation.IsEmpty) @@ -4903,401 +4911,401 @@ out tmpExpr); } void XmlAttribute( -//#line 1878 "VBNET.ATG" +#line 1881 "VBNET.ATG" List attrs) { -//#line 1879 "VBNET.ATG" +#line 1882 "VBNET.ATG" Location start = la.Location; if (StartOf(4)) { Identifier(); -//#line 1881 "VBNET.ATG" +#line 1884 "VBNET.ATG" string name = t.val; Expect(20); -//#line 1882 "VBNET.ATG" +#line 1885 "VBNET.ATG" string literalValue = null; Expression expressionValue = null; bool useDoubleQuotes = false; if (la.kind == 3) { lexer.NextToken(); -//#line 1883 "VBNET.ATG" +#line 1886 "VBNET.ATG" literalValue = t.literalValue.ToString(); useDoubleQuotes = t.val[0] == '"'; } else if (la.kind == 12) { lexer.NextToken(); Expr( -//#line 1883 "VBNET.ATG" +#line 1886 "VBNET.ATG" out expressionValue); Expect(13); } else SynErr(293); -//#line 1884 "VBNET.ATG" +#line 1887 "VBNET.ATG" attrs.Add(new XmlAttributeExpression() { Name = name, ExpressionValue = expressionValue, LiteralValue = literalValue, UseDoubleQuotes = useDoubleQuotes, StartLocation = start, EndLocation = t.EndLocation }); } else if (la.kind == 12) { lexer.NextToken(); -//#line 1886 "VBNET.ATG" +#line 1889 "VBNET.ATG" Expression innerExpression; Expr( -//#line 1886 "VBNET.ATG" +#line 1889 "VBNET.ATG" out innerExpression); Expect(13); -//#line 1887 "VBNET.ATG" +#line 1890 "VBNET.ATG" attrs.Add(new XmlEmbeddedExpression() { InlineVBExpression = innerExpression, StartLocation = start, EndLocation = t.EndLocation }); } else SynErr(294); } void ArgumentList( -//#line 2639 "VBNET.ATG" +#line 2642 "VBNET.ATG" out List arguments) { -//#line 2641 "VBNET.ATG" +#line 2644 "VBNET.ATG" arguments = new List(); Expression expr = null; if (StartOf(24)) { Argument( -//#line 2644 "VBNET.ATG" +#line 2647 "VBNET.ATG" out expr); } while (la.kind == 22) { lexer.NextToken(); -//#line 2645 "VBNET.ATG" +#line 2648 "VBNET.ATG" arguments.Add(expr ?? Expression.Null); expr = null; if (StartOf(24)) { Argument( -//#line 2646 "VBNET.ATG" +#line 2649 "VBNET.ATG" out expr); } -//#line 2647 "VBNET.ATG" +#line 2650 "VBNET.ATG" if (expr == null) expr = Expression.Null; } -//#line 2649 "VBNET.ATG" +#line 2652 "VBNET.ATG" if (expr != null) arguments.Add(expr); } void ConjunctionExpr( -//#line 1977 "VBNET.ATG" +#line 1980 "VBNET.ATG" out Expression outExpr) { -//#line 1979 "VBNET.ATG" +#line 1982 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; Location startLocation = la.Location; NotExpr( -//#line 1983 "VBNET.ATG" +#line 1986 "VBNET.ATG" out outExpr); while (la.kind == 60 || la.kind == 61) { if (la.kind == 60) { lexer.NextToken(); -//#line 1986 "VBNET.ATG" +#line 1989 "VBNET.ATG" op = BinaryOperatorType.BitwiseAnd; } else { lexer.NextToken(); -//#line 1987 "VBNET.ATG" +#line 1990 "VBNET.ATG" op = BinaryOperatorType.LogicalAnd; } NotExpr( -//#line 1989 "VBNET.ATG" +#line 1992 "VBNET.ATG" out expr); -//#line 1989 "VBNET.ATG" +#line 1992 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void NotExpr( -//#line 1993 "VBNET.ATG" +#line 1996 "VBNET.ATG" out Expression outExpr) { -//#line 1994 "VBNET.ATG" +#line 1997 "VBNET.ATG" UnaryOperatorType uop = UnaryOperatorType.None; while (la.kind == 164) { lexer.NextToken(); -//#line 1995 "VBNET.ATG" +#line 1998 "VBNET.ATG" uop = UnaryOperatorType.Not; } ComparisonExpr( -//#line 1996 "VBNET.ATG" +#line 1999 "VBNET.ATG" out outExpr); -//#line 1997 "VBNET.ATG" +#line 2000 "VBNET.ATG" if (uop != UnaryOperatorType.None) outExpr = new UnaryOperatorExpression(outExpr, uop); } void ComparisonExpr( -//#line 2002 "VBNET.ATG" +#line 2005 "VBNET.ATG" out Expression outExpr) { -//#line 2004 "VBNET.ATG" +#line 2007 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; Location startLocation = la.Location; ShiftExpr( -//#line 2008 "VBNET.ATG" +#line 2011 "VBNET.ATG" out outExpr); while (StartOf(40)) { switch (la.kind) { case 40: { lexer.NextToken(); -//#line 2011 "VBNET.ATG" +#line 2014 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 39: { lexer.NextToken(); -//#line 2012 "VBNET.ATG" +#line 2015 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 43: { lexer.NextToken(); -//#line 2013 "VBNET.ATG" +#line 2016 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 42: { lexer.NextToken(); -//#line 2014 "VBNET.ATG" +#line 2017 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 41: { lexer.NextToken(); -//#line 2015 "VBNET.ATG" +#line 2018 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } case 20: { lexer.NextToken(); -//#line 2016 "VBNET.ATG" +#line 2019 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 150: { lexer.NextToken(); -//#line 2017 "VBNET.ATG" +#line 2020 "VBNET.ATG" op = BinaryOperatorType.Like; break; } case 144: { lexer.NextToken(); -//#line 2018 "VBNET.ATG" +#line 2021 "VBNET.ATG" op = BinaryOperatorType.ReferenceEquality; break; } case 145: { lexer.NextToken(); -//#line 2019 "VBNET.ATG" +#line 2022 "VBNET.ATG" op = BinaryOperatorType.ReferenceInequality; break; } } if (StartOf(41)) { ShiftExpr( -//#line 2022 "VBNET.ATG" +#line 2025 "VBNET.ATG" out expr); -//#line 2022 "VBNET.ATG" +#line 2025 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else if (la.kind == 164) { -//#line 2023 "VBNET.ATG" +#line 2026 "VBNET.ATG" Location startLocation2 = la.Location; lexer.NextToken(); ShiftExpr( -//#line 2025 "VBNET.ATG" +#line 2028 "VBNET.ATG" out expr); -//#line 2025 "VBNET.ATG" +#line 2028 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, new UnaryOperatorExpression(expr, UnaryOperatorType.Not) { StartLocation = startLocation2, EndLocation = t.EndLocation }) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else SynErr(295); } } void ShiftExpr( -//#line 2030 "VBNET.ATG" +#line 2033 "VBNET.ATG" out Expression outExpr) { -//#line 2032 "VBNET.ATG" +#line 2035 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; Location startLocation = la.Location; ConcatenationExpr( -//#line 2036 "VBNET.ATG" +#line 2039 "VBNET.ATG" out outExpr); while (la.kind == 44 || la.kind == 45) { if (la.kind == 44) { lexer.NextToken(); -//#line 2039 "VBNET.ATG" +#line 2042 "VBNET.ATG" op = BinaryOperatorType.ShiftLeft; } else { lexer.NextToken(); -//#line 2040 "VBNET.ATG" +#line 2043 "VBNET.ATG" op = BinaryOperatorType.ShiftRight; } ConcatenationExpr( -//#line 2042 "VBNET.ATG" +#line 2045 "VBNET.ATG" out expr); -//#line 2042 "VBNET.ATG" +#line 2045 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void ConcatenationExpr( -//#line 2046 "VBNET.ATG" +#line 2049 "VBNET.ATG" out Expression outExpr) { -//#line 2047 "VBNET.ATG" +#line 2050 "VBNET.ATG" Expression expr; Location startLocation = la.Location; AdditiveExpr( -//#line 2049 "VBNET.ATG" +#line 2052 "VBNET.ATG" out outExpr); while (la.kind == 23) { lexer.NextToken(); AdditiveExpr( -//#line 2049 "VBNET.ATG" +#line 2052 "VBNET.ATG" out expr); -//#line 2049 "VBNET.ATG" +#line 2052 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Concat, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void AdditiveExpr( -//#line 2052 "VBNET.ATG" +#line 2055 "VBNET.ATG" out Expression outExpr) { -//#line 2054 "VBNET.ATG" +#line 2057 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; Location startLocation = la.Location; ModuloExpr( -//#line 2058 "VBNET.ATG" +#line 2061 "VBNET.ATG" out outExpr); while (la.kind == 30 || la.kind == 31) { if (la.kind == 31) { lexer.NextToken(); -//#line 2061 "VBNET.ATG" +#line 2064 "VBNET.ATG" op = BinaryOperatorType.Add; } else { lexer.NextToken(); -//#line 2062 "VBNET.ATG" +#line 2065 "VBNET.ATG" op = BinaryOperatorType.Subtract; } ModuloExpr( -//#line 2064 "VBNET.ATG" +#line 2067 "VBNET.ATG" out expr); -//#line 2064 "VBNET.ATG" +#line 2067 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void ModuloExpr( -//#line 2068 "VBNET.ATG" +#line 2071 "VBNET.ATG" out Expression outExpr) { -//#line 2069 "VBNET.ATG" +#line 2072 "VBNET.ATG" Expression expr; Location startLocation = la.Location; IntegerDivisionExpr( -//#line 2071 "VBNET.ATG" +#line 2074 "VBNET.ATG" out outExpr); while (la.kind == 154) { lexer.NextToken(); IntegerDivisionExpr( -//#line 2071 "VBNET.ATG" +#line 2074 "VBNET.ATG" out expr); -//#line 2071 "VBNET.ATG" +#line 2074 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Modulus, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void IntegerDivisionExpr( -//#line 2074 "VBNET.ATG" +#line 2077 "VBNET.ATG" out Expression outExpr) { -//#line 2075 "VBNET.ATG" +#line 2078 "VBNET.ATG" Expression expr; Location startLocation = la.Location; MultiplicativeExpr( -//#line 2077 "VBNET.ATG" +#line 2080 "VBNET.ATG" out outExpr); while (la.kind == 25) { lexer.NextToken(); MultiplicativeExpr( -//#line 2077 "VBNET.ATG" +#line 2080 "VBNET.ATG" out expr); -//#line 2077 "VBNET.ATG" +#line 2080 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.DivideInteger, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void MultiplicativeExpr( -//#line 2080 "VBNET.ATG" +#line 2083 "VBNET.ATG" out Expression outExpr) { -//#line 2082 "VBNET.ATG" +#line 2085 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; Location startLocation = la.Location; UnaryExpr( -//#line 2086 "VBNET.ATG" +#line 2089 "VBNET.ATG" out outExpr); while (la.kind == 24 || la.kind == 34) { if (la.kind == 34) { lexer.NextToken(); -//#line 2089 "VBNET.ATG" +#line 2092 "VBNET.ATG" op = BinaryOperatorType.Multiply; } else { lexer.NextToken(); -//#line 2090 "VBNET.ATG" +#line 2093 "VBNET.ATG" op = BinaryOperatorType.Divide; } UnaryExpr( -//#line 2092 "VBNET.ATG" +#line 2095 "VBNET.ATG" out expr); -//#line 2092 "VBNET.ATG" +#line 2095 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void UnaryExpr( -//#line 2096 "VBNET.ATG" +#line 2099 "VBNET.ATG" out Expression uExpr) { -//#line 2098 "VBNET.ATG" +#line 2101 "VBNET.ATG" Expression expr; UnaryOperatorType uop = UnaryOperatorType.None; Location startLocation = la.Location; @@ -5307,25 +5315,25 @@ out Expression uExpr) { if (la.kind == 31) { lexer.NextToken(); -//#line 2103 "VBNET.ATG" +#line 2106 "VBNET.ATG" uop = UnaryOperatorType.Plus; isUOp = true; } else if (la.kind == 30) { lexer.NextToken(); -//#line 2104 "VBNET.ATG" +#line 2107 "VBNET.ATG" uop = UnaryOperatorType.Minus; isUOp = true; } else { lexer.NextToken(); -//#line 2105 "VBNET.ATG" +#line 2108 "VBNET.ATG" uop = UnaryOperatorType.Dereference; isUOp = true; } } ExponentiationExpr( -//#line 2107 "VBNET.ATG" +#line 2110 "VBNET.ATG" out expr); -//#line 2109 "VBNET.ATG" +#line 2112 "VBNET.ATG" if (isUOp) { uExpr = new UnaryOperatorExpression(expr, uop) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else { @@ -5335,107 +5343,107 @@ out expr); } void ExponentiationExpr( -//#line 2117 "VBNET.ATG" +#line 2120 "VBNET.ATG" out Expression outExpr) { -//#line 2118 "VBNET.ATG" +#line 2121 "VBNET.ATG" Expression expr; Location startLocation = la.Location; SimpleExpr( -//#line 2120 "VBNET.ATG" +#line 2123 "VBNET.ATG" out outExpr); while (la.kind == 32) { lexer.NextToken(); SimpleExpr( -//#line 2120 "VBNET.ATG" +#line 2123 "VBNET.ATG" out expr); -//#line 2120 "VBNET.ATG" +#line 2123 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Power, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } } void NormalOrReDimArgumentList( -//#line 2653 "VBNET.ATG" +#line 2656 "VBNET.ATG" out List arguments, out bool canBeNormal, out bool canBeRedim) { -//#line 2655 "VBNET.ATG" +#line 2658 "VBNET.ATG" arguments = new List(); canBeNormal = true; canBeRedim = !IsNamedAssign(); Expression expr = null; if (StartOf(24)) { Argument( -//#line 2660 "VBNET.ATG" +#line 2663 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); -//#line 2661 "VBNET.ATG" +#line 2664 "VBNET.ATG" EnsureIsZero(expr); canBeNormal = false; Expr( -//#line 2662 "VBNET.ATG" +#line 2665 "VBNET.ATG" out expr); } } while (la.kind == 22) { lexer.NextToken(); -//#line 2665 "VBNET.ATG" +#line 2668 "VBNET.ATG" if (expr == null) canBeRedim = false; -//#line 2666 "VBNET.ATG" +#line 2669 "VBNET.ATG" arguments.Add(expr ?? Expression.Null); expr = null; -//#line 2667 "VBNET.ATG" +#line 2670 "VBNET.ATG" canBeRedim &= !IsNamedAssign(); if (StartOf(24)) { Argument( -//#line 2668 "VBNET.ATG" +#line 2671 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); -//#line 2669 "VBNET.ATG" +#line 2672 "VBNET.ATG" EnsureIsZero(expr); canBeNormal = false; Expr( -//#line 2670 "VBNET.ATG" +#line 2673 "VBNET.ATG" out expr); } } -//#line 2672 "VBNET.ATG" +#line 2675 "VBNET.ATG" if (expr == null) { canBeRedim = false; expr = Expression.Null; } } -//#line 2674 "VBNET.ATG" +#line 2677 "VBNET.ATG" if (expr != null) arguments.Add(expr); else canBeRedim = false; } void ArrayTypeModifiers( -//#line 2784 "VBNET.ATG" +#line 2787 "VBNET.ATG" out ArrayList arrayModifiers) { -//#line 2786 "VBNET.ATG" +#line 2789 "VBNET.ATG" arrayModifiers = new ArrayList(); int i = 0; while ( -//#line 2789 "VBNET.ATG" +#line 2792 "VBNET.ATG" IsDims()) { Expect(37); if (la.kind == 22 || la.kind == 38) { RankList( -//#line 2791 "VBNET.ATG" +#line 2794 "VBNET.ATG" out i); } -//#line 2793 "VBNET.ATG" +#line 2796 "VBNET.ATG" arrayModifiers.Add(i); Expect(38); } -//#line 2798 "VBNET.ATG" +#line 2801 "VBNET.ATG" if(arrayModifiers.Count == 0) { arrayModifiers = null; } @@ -5443,10 +5451,10 @@ out i); } void MemberInitializer( -//#line 2620 "VBNET.ATG" +#line 2623 "VBNET.ATG" out MemberInitializerExpression memberInitializer) { -//#line 2622 "VBNET.ATG" +#line 2625 "VBNET.ATG" memberInitializer = new MemberInitializerExpression(); memberInitializer.StartLocation = la.Location; Expression initExpr = null; @@ -5456,19 +5464,19 @@ out MemberInitializerExpression memberInitializer) { if (la.kind == 147) { lexer.NextToken(); -//#line 2628 "VBNET.ATG" +#line 2631 "VBNET.ATG" isKey = true; } Expect(26); IdentifierOrKeyword( -//#line 2629 "VBNET.ATG" +#line 2632 "VBNET.ATG" out name); Expect(20); Expr( -//#line 2629 "VBNET.ATG" +#line 2632 "VBNET.ATG" out initExpr); -//#line 2631 "VBNET.ATG" +#line 2634 "VBNET.ATG" memberInitializer.Name = name; memberInitializer.Expression = initExpr; memberInitializer.IsKey = isKey; @@ -5477,10 +5485,10 @@ out initExpr); } void SubLambdaExpression( -//#line 2219 "VBNET.ATG" +#line 2222 "VBNET.ATG" out LambdaExpression lambda) { -//#line 2221 "VBNET.ATG" +#line 2224 "VBNET.ATG" lambda = new LambdaExpression(); lambda.ReturnType = new TypeReference("System.Void", true); Expression inner = null; @@ -5492,7 +5500,7 @@ out LambdaExpression lambda) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 2228 "VBNET.ATG" +#line 2231 "VBNET.ATG" lambda.Parameters); } Expect(38); @@ -5500,20 +5508,20 @@ lambda.Parameters); if (StartOf(42)) { if (StartOf(24)) { Expr( -//#line 2231 "VBNET.ATG" +#line 2234 "VBNET.ATG" out inner); -//#line 2233 "VBNET.ATG" +#line 2236 "VBNET.ATG" lambda.ExpressionBody = inner; lambda.EndLocation = t.EndLocation; // la.Location? lambda.ExtendedEndLocation = la.Location; } else { EmbeddedStatement( -//#line 2238 "VBNET.ATG" +#line 2241 "VBNET.ATG" out statement); -//#line 2240 "VBNET.ATG" +#line 2243 "VBNET.ATG" lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; lambda.ExtendedEndLocation = la.Location; @@ -5522,12 +5530,12 @@ out statement); } else if (la.kind == 1) { lexer.NextToken(); Block( -//#line 2247 "VBNET.ATG" +#line 2250 "VBNET.ATG" out statement); Expect(113); Expect(210); -//#line 2250 "VBNET.ATG" +#line 2253 "VBNET.ATG" lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; lambda.ExtendedEndLocation = la.Location; @@ -5536,10 +5544,10 @@ out statement); } void FunctionLambdaExpression( -//#line 2257 "VBNET.ATG" +#line 2260 "VBNET.ATG" out LambdaExpression lambda) { -//#line 2259 "VBNET.ATG" +#line 2262 "VBNET.ATG" lambda = new LambdaExpression(); TypeReference typeRef = null; Expression inner = null; @@ -5551,7 +5559,7 @@ out LambdaExpression lambda) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -//#line 2266 "VBNET.ATG" +#line 2269 "VBNET.ATG" lambda.Parameters); } Expect(38); @@ -5559,29 +5567,29 @@ lambda.Parameters); if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 2267 "VBNET.ATG" +#line 2270 "VBNET.ATG" out typeRef); -//#line 2267 "VBNET.ATG" +#line 2270 "VBNET.ATG" lambda.ReturnType = typeRef; } if (StartOf(42)) { if (StartOf(24)) { Expr( -//#line 2270 "VBNET.ATG" +#line 2273 "VBNET.ATG" out inner); -//#line 2272 "VBNET.ATG" +#line 2275 "VBNET.ATG" lambda.ExpressionBody = inner; lambda.EndLocation = t.EndLocation; lambda.ExtendedEndLocation = la.Location; } else { EmbeddedStatement( -//#line 2277 "VBNET.ATG" +#line 2280 "VBNET.ATG" out statement); -//#line 2279 "VBNET.ATG" +#line 2282 "VBNET.ATG" lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; lambda.ExtendedEndLocation = la.Location; @@ -5590,12 +5598,12 @@ out statement); } else if (la.kind == 1) { lexer.NextToken(); Block( -//#line 2286 "VBNET.ATG" +#line 2289 "VBNET.ATG" out statement); Expect(113); Expect(127); -//#line 2289 "VBNET.ATG" +#line 2292 "VBNET.ATG" lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; lambda.ExtendedEndLocation = la.Location; @@ -5604,10 +5612,10 @@ out statement); } void EmbeddedStatement( -//#line 3070 "VBNET.ATG" +#line 3073 "VBNET.ATG" out Statement statement) { -//#line 3072 "VBNET.ATG" +#line 3075 "VBNET.ATG" Statement embeddedStatement = null; statement = null; Expression expr = null; @@ -5618,224 +5626,224 @@ out Statement statement) { if (la.kind == 120) { lexer.NextToken(); -//#line 3080 "VBNET.ATG" +#line 3083 "VBNET.ATG" ExitType exitType = ExitType.None; switch (la.kind) { case 210: { lexer.NextToken(); -//#line 3082 "VBNET.ATG" +#line 3085 "VBNET.ATG" exitType = ExitType.Sub; break; } case 127: { lexer.NextToken(); -//#line 3084 "VBNET.ATG" +#line 3087 "VBNET.ATG" exitType = ExitType.Function; break; } case 186: { lexer.NextToken(); -//#line 3086 "VBNET.ATG" +#line 3089 "VBNET.ATG" exitType = ExitType.Property; break; } case 108: { lexer.NextToken(); -//#line 3088 "VBNET.ATG" +#line 3091 "VBNET.ATG" exitType = ExitType.Do; break; } case 124: { lexer.NextToken(); -//#line 3090 "VBNET.ATG" +#line 3093 "VBNET.ATG" exitType = ExitType.For; break; } case 218: { lexer.NextToken(); -//#line 3092 "VBNET.ATG" +#line 3095 "VBNET.ATG" exitType = ExitType.Try; break; } case 231: { lexer.NextToken(); -//#line 3094 "VBNET.ATG" +#line 3097 "VBNET.ATG" exitType = ExitType.While; break; } case 197: { lexer.NextToken(); -//#line 3096 "VBNET.ATG" +#line 3099 "VBNET.ATG" exitType = ExitType.Select; break; } default: SynErr(298); break; } -//#line 3098 "VBNET.ATG" +#line 3101 "VBNET.ATG" statement = new ExitStatement(exitType); } else if (la.kind == 218) { TryStatement( -//#line 3099 "VBNET.ATG" +#line 3102 "VBNET.ATG" out statement); } else if (la.kind == 89) { lexer.NextToken(); -//#line 3100 "VBNET.ATG" +#line 3103 "VBNET.ATG" ContinueType continueType = ContinueType.None; if (la.kind == 108 || la.kind == 124 || la.kind == 231) { if (la.kind == 108) { lexer.NextToken(); -//#line 3100 "VBNET.ATG" +#line 3103 "VBNET.ATG" continueType = ContinueType.Do; } else if (la.kind == 124) { lexer.NextToken(); -//#line 3100 "VBNET.ATG" +#line 3103 "VBNET.ATG" continueType = ContinueType.For; } else { lexer.NextToken(); -//#line 3100 "VBNET.ATG" +#line 3103 "VBNET.ATG" continueType = ContinueType.While; } } -//#line 3100 "VBNET.ATG" +#line 3103 "VBNET.ATG" statement = new ContinueStatement(continueType); } else if (la.kind == 215) { lexer.NextToken(); if (StartOf(24)) { Expr( -//#line 3102 "VBNET.ATG" +#line 3105 "VBNET.ATG" out expr); } -//#line 3102 "VBNET.ATG" +#line 3105 "VBNET.ATG" statement = new ThrowStatement(expr); } else if (la.kind == 195) { lexer.NextToken(); if (StartOf(24)) { Expr( -//#line 3104 "VBNET.ATG" +#line 3107 "VBNET.ATG" out expr); } -//#line 3104 "VBNET.ATG" +#line 3107 "VBNET.ATG" statement = new ReturnStatement(expr); } else if (la.kind == 211) { lexer.NextToken(); Expr( -//#line 3106 "VBNET.ATG" +#line 3109 "VBNET.ATG" out expr); EndOfStmt(); Block( -//#line 3106 "VBNET.ATG" +#line 3109 "VBNET.ATG" out embeddedStatement); Expect(113); Expect(211); -//#line 3107 "VBNET.ATG" +#line 3110 "VBNET.ATG" statement = new LockStatement(expr, embeddedStatement); } else if (la.kind == 189) { lexer.NextToken(); Identifier(); -//#line 3109 "VBNET.ATG" +#line 3112 "VBNET.ATG" name = t.val; if (la.kind == 37) { lexer.NextToken(); if (StartOf(43)) { ArgumentList( -//#line 3110 "VBNET.ATG" +#line 3113 "VBNET.ATG" out p); } Expect(38); } -//#line 3112 "VBNET.ATG" +#line 3115 "VBNET.ATG" statement = new RaiseEventStatement(name, p); } else if (la.kind == 233) { WithStatement( -//#line 3115 "VBNET.ATG" +#line 3118 "VBNET.ATG" out statement); } else if (la.kind == 56) { lexer.NextToken(); -//#line 3117 "VBNET.ATG" +#line 3120 "VBNET.ATG" Expression handlerExpr = null; Expr( -//#line 3118 "VBNET.ATG" +#line 3121 "VBNET.ATG" out expr); Expect(22); Expr( -//#line 3118 "VBNET.ATG" +#line 3121 "VBNET.ATG" out handlerExpr); -//#line 3120 "VBNET.ATG" +#line 3123 "VBNET.ATG" statement = new AddHandlerStatement(expr, handlerExpr); } else if (la.kind == 193) { lexer.NextToken(); -//#line 3123 "VBNET.ATG" +#line 3126 "VBNET.ATG" Expression handlerExpr = null; Expr( -//#line 3124 "VBNET.ATG" +#line 3127 "VBNET.ATG" out expr); Expect(22); Expr( -//#line 3124 "VBNET.ATG" +#line 3127 "VBNET.ATG" out handlerExpr); -//#line 3126 "VBNET.ATG" +#line 3129 "VBNET.ATG" statement = new RemoveHandlerStatement(expr, handlerExpr); } else if (la.kind == 231) { lexer.NextToken(); Expr( -//#line 3129 "VBNET.ATG" +#line 3132 "VBNET.ATG" out expr); EndOfStmt(); Block( -//#line 3130 "VBNET.ATG" +#line 3133 "VBNET.ATG" out embeddedStatement); Expect(113); Expect(231); -//#line 3132 "VBNET.ATG" +#line 3135 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start); } else if (la.kind == 108) { lexer.NextToken(); -//#line 3137 "VBNET.ATG" +#line 3140 "VBNET.ATG" ConditionType conditionType = ConditionType.None; if (la.kind == 224 || la.kind == 231) { WhileOrUntil( -//#line 3140 "VBNET.ATG" +#line 3143 "VBNET.ATG" out conditionType); Expr( -//#line 3140 "VBNET.ATG" +#line 3143 "VBNET.ATG" out expr); EndOfStmt(); Block( -//#line 3141 "VBNET.ATG" +#line 3144 "VBNET.ATG" out embeddedStatement); Expect(152); -//#line 3144 "VBNET.ATG" +#line 3147 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, conditionType == ConditionType.While ? ConditionType.DoWhile : conditionType, @@ -5844,26 +5852,26 @@ out embeddedStatement); } else if (la.kind == 1 || la.kind == 21) { EndOfStmt(); Block( -//#line 3151 "VBNET.ATG" +#line 3154 "VBNET.ATG" out embeddedStatement); Expect(152); if (la.kind == 224 || la.kind == 231) { WhileOrUntil( -//#line 3152 "VBNET.ATG" +#line 3155 "VBNET.ATG" out conditionType); Expr( -//#line 3152 "VBNET.ATG" +#line 3155 "VBNET.ATG" out expr); } -//#line 3154 "VBNET.ATG" +#line 3157 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End); } else SynErr(299); } else if (la.kind == 124) { lexer.NextToken(); -//#line 3159 "VBNET.ATG" +#line 3162 "VBNET.ATG" Expression group = null; TypeReference typeReference; string typeName; @@ -5871,24 +5879,24 @@ out expr); if (la.kind == 110) { lexer.NextToken(); LoopControlVariable( -//#line 3165 "VBNET.ATG" +#line 3168 "VBNET.ATG" out typeReference, out typeName); Expect(138); Expr( -//#line 3166 "VBNET.ATG" +#line 3169 "VBNET.ATG" out group); EndOfStmt(); Block( -//#line 3167 "VBNET.ATG" +#line 3170 "VBNET.ATG" out embeddedStatement); Expect(163); if (StartOf(24)) { Expr( -//#line 3168 "VBNET.ATG" +#line 3171 "VBNET.ATG" out expr); } -//#line 3170 "VBNET.ATG" +#line 3173 "VBNET.ATG" statement = new ForeachStatement(typeReference, typeName, group, @@ -5900,7 +5908,7 @@ out expr); } else if (StartOf(44)) { -//#line 3181 "VBNET.ATG" +#line 3184 "VBNET.ATG" Expression start = null; Expression end = null; Expression step = null; @@ -5909,59 +5917,59 @@ out expr); List nextExpressions = null; if ( -//#line 3188 "VBNET.ATG" +#line 3191 "VBNET.ATG" IsLoopVariableDeclaration()) { LoopControlVariable( -//#line 3189 "VBNET.ATG" +#line 3192 "VBNET.ATG" out typeReference, out typeName); } else { -//#line 3191 "VBNET.ATG" +#line 3194 "VBNET.ATG" typeReference = null; typeName = null; SimpleExpr( -//#line 3192 "VBNET.ATG" +#line 3195 "VBNET.ATG" out variableExpr); } Expect(20); Expr( -//#line 3194 "VBNET.ATG" +#line 3197 "VBNET.ATG" out start); Expect(216); Expr( -//#line 3194 "VBNET.ATG" +#line 3197 "VBNET.ATG" out end); if (la.kind == 205) { lexer.NextToken(); Expr( -//#line 3194 "VBNET.ATG" +#line 3197 "VBNET.ATG" out step); } EndOfStmt(); Block( -//#line 3195 "VBNET.ATG" +#line 3198 "VBNET.ATG" out embeddedStatement); Expect(163); if (StartOf(24)) { Expr( -//#line 3198 "VBNET.ATG" +#line 3201 "VBNET.ATG" out nextExpr); -//#line 3200 "VBNET.ATG" +#line 3203 "VBNET.ATG" nextExpressions = new List(); nextExpressions.Add(nextExpr); while (la.kind == 22) { lexer.NextToken(); Expr( -//#line 3203 "VBNET.ATG" +#line 3206 "VBNET.ATG" out nextExpr); -//#line 3203 "VBNET.ATG" +#line 3206 "VBNET.ATG" nextExpressions.Add(nextExpr); } } -//#line 3206 "VBNET.ATG" +#line 3209 "VBNET.ATG" statement = new ForNextStatement { TypeReference = typeReference, VariableName = typeName, @@ -5977,27 +5985,27 @@ out nextExpr); } else if (la.kind == 118) { lexer.NextToken(); Expr( -//#line 3219 "VBNET.ATG" +#line 3222 "VBNET.ATG" out expr); -//#line 3219 "VBNET.ATG" +#line 3222 "VBNET.ATG" statement = new ErrorStatement(expr); } else if (la.kind == 191) { lexer.NextToken(); -//#line 3221 "VBNET.ATG" +#line 3224 "VBNET.ATG" bool isPreserve = false; if (la.kind == 184) { lexer.NextToken(); -//#line 3221 "VBNET.ATG" +#line 3224 "VBNET.ATG" isPreserve = true; } ReDimClause( -//#line 3222 "VBNET.ATG" +#line 3225 "VBNET.ATG" out expr); -//#line 3224 "VBNET.ATG" +#line 3227 "VBNET.ATG" ReDimStatement reDimStatement = new ReDimStatement(isPreserve); statement = reDimStatement; SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); @@ -6005,48 +6013,48 @@ out expr); while (la.kind == 22) { lexer.NextToken(); ReDimClause( -//#line 3228 "VBNET.ATG" +#line 3231 "VBNET.ATG" out expr); -//#line 3229 "VBNET.ATG" +#line 3232 "VBNET.ATG" SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); } } else if (la.kind == 117) { lexer.NextToken(); Expr( -//#line 3233 "VBNET.ATG" +#line 3236 "VBNET.ATG" out expr); -//#line 3235 "VBNET.ATG" +#line 3238 "VBNET.ATG" EraseStatement eraseStatement = new EraseStatement(); if (expr != null) { SafeAdd(eraseStatement, eraseStatement.Expressions, expr);} while (la.kind == 22) { lexer.NextToken(); Expr( -//#line 3238 "VBNET.ATG" +#line 3241 "VBNET.ATG" out expr); -//#line 3238 "VBNET.ATG" +#line 3241 "VBNET.ATG" if (expr != null) { SafeAdd(eraseStatement, eraseStatement.Expressions, expr); } } -//#line 3239 "VBNET.ATG" +#line 3242 "VBNET.ATG" statement = eraseStatement; } else if (la.kind == 206) { lexer.NextToken(); -//#line 3241 "VBNET.ATG" +#line 3244 "VBNET.ATG" statement = new StopStatement(); } else if ( -//#line 3243 "VBNET.ATG" +#line 3246 "VBNET.ATG" la.kind == Tokens.If) { Expect(135); -//#line 3244 "VBNET.ATG" +#line 3247 "VBNET.ATG" Location ifStartLocation = t.Location; Expr( -//#line 3244 "VBNET.ATG" +#line 3247 "VBNET.ATG" out expr); if (la.kind == 214) { lexer.NextToken(); @@ -6054,46 +6062,46 @@ out expr); if (la.kind == 1 || la.kind == 21) { EndOfStmt(); Block( -//#line 3247 "VBNET.ATG" +#line 3250 "VBNET.ATG" out embeddedStatement); -//#line 3249 "VBNET.ATG" +#line 3252 "VBNET.ATG" IfElseStatement ifStatement = new IfElseStatement(expr, embeddedStatement); ifStatement.StartLocation = ifStartLocation; Location elseIfStart; while (la.kind == 112 || -//#line 3255 "VBNET.ATG" +#line 3258 "VBNET.ATG" IsElseIf()) { if ( -//#line 3255 "VBNET.ATG" +#line 3258 "VBNET.ATG" IsElseIf()) { Expect(111); -//#line 3255 "VBNET.ATG" +#line 3258 "VBNET.ATG" elseIfStart = t.Location; Expect(135); } else { lexer.NextToken(); -//#line 3256 "VBNET.ATG" +#line 3259 "VBNET.ATG" elseIfStart = t.Location; } -//#line 3258 "VBNET.ATG" +#line 3261 "VBNET.ATG" Expression condition = null; Statement block = null; Expr( -//#line 3259 "VBNET.ATG" +#line 3262 "VBNET.ATG" out condition); if (la.kind == 214) { lexer.NextToken(); } EndOfStmt(); Block( -//#line 3260 "VBNET.ATG" +#line 3263 "VBNET.ATG" out block); -//#line 3262 "VBNET.ATG" +#line 3265 "VBNET.ATG" ElseIfSection elseIfSection = new ElseIfSection(condition, block); elseIfSection.StartLocation = elseIfStart; elseIfSection.EndLocation = t.Location; @@ -6107,39 +6115,39 @@ out block); EndOfStmt(); } Block( -//#line 3271 "VBNET.ATG" +#line 3274 "VBNET.ATG" out embeddedStatement); -//#line 3273 "VBNET.ATG" +#line 3276 "VBNET.ATG" ifStatement.FalseStatement.Add(embeddedStatement); } Expect(113); Expect(135); -//#line 3277 "VBNET.ATG" +#line 3280 "VBNET.ATG" ifStatement.EndLocation = t.Location; statement = ifStatement; } else if (StartOf(45)) { -//#line 3282 "VBNET.ATG" +#line 3285 "VBNET.ATG" IfElseStatement ifStatement = new IfElseStatement(expr); ifStatement.StartLocation = ifStartLocation; SingleLineStatementList( -//#line 3285 "VBNET.ATG" +#line 3288 "VBNET.ATG" ifStatement.TrueStatement); if (la.kind == 111) { lexer.NextToken(); if (StartOf(45)) { SingleLineStatementList( -//#line 3288 "VBNET.ATG" +#line 3291 "VBNET.ATG" ifStatement.FalseStatement); } } -//#line 3290 "VBNET.ATG" +#line 3293 "VBNET.ATG" ifStatement.EndLocation = t.Location; statement = ifStatement; } else SynErr(301); } else if (la.kind == 197) { @@ -6148,82 +6156,82 @@ ifStatement.FalseStatement); lexer.NextToken(); } Expr( -//#line 3293 "VBNET.ATG" +#line 3296 "VBNET.ATG" out expr); EndOfStmt(); -//#line 3294 "VBNET.ATG" +#line 3297 "VBNET.ATG" List selectSections = new List(); Statement block = null; while (la.kind == 74) { -//#line 3298 "VBNET.ATG" +#line 3301 "VBNET.ATG" List caseClauses = null; Location caseLocation = la.Location; lexer.NextToken(); CaseClauses( -//#line 3299 "VBNET.ATG" +#line 3302 "VBNET.ATG" out caseClauses); if ( -//#line 3299 "VBNET.ATG" +#line 3302 "VBNET.ATG" IsNotStatementSeparator()) { lexer.NextToken(); } EndOfStmt(); -//#line 3301 "VBNET.ATG" +#line 3304 "VBNET.ATG" SwitchSection selectSection = new SwitchSection(caseClauses); selectSection.StartLocation = caseLocation; Block( -//#line 3304 "VBNET.ATG" +#line 3307 "VBNET.ATG" out block); -//#line 3306 "VBNET.ATG" +#line 3309 "VBNET.ATG" selectSection.Children = block.Children; selectSection.EndLocation = t.EndLocation; selectSections.Add(selectSection); } -//#line 3312 "VBNET.ATG" +#line 3315 "VBNET.ATG" statement = new SwitchStatement(expr, selectSections); Expect(113); Expect(197); } else if (la.kind == 171) { -//#line 3315 "VBNET.ATG" +#line 3318 "VBNET.ATG" OnErrorStatement onErrorStatement = null; OnErrorStatement( -//#line 3316 "VBNET.ATG" +#line 3319 "VBNET.ATG" out onErrorStatement); -//#line 3316 "VBNET.ATG" +#line 3319 "VBNET.ATG" statement = onErrorStatement; } else if (la.kind == 132) { -//#line 3317 "VBNET.ATG" +#line 3320 "VBNET.ATG" GotoStatement goToStatement = null; GotoStatement( -//#line 3318 "VBNET.ATG" +#line 3321 "VBNET.ATG" out goToStatement); -//#line 3318 "VBNET.ATG" +#line 3321 "VBNET.ATG" statement = goToStatement; } else if (la.kind == 194) { -//#line 3319 "VBNET.ATG" +#line 3322 "VBNET.ATG" ResumeStatement resumeStatement = null; ResumeStatement( -//#line 3320 "VBNET.ATG" +#line 3323 "VBNET.ATG" out resumeStatement); -//#line 3320 "VBNET.ATG" +#line 3323 "VBNET.ATG" statement = resumeStatement; } else if (StartOf(44)) { -//#line 3323 "VBNET.ATG" +#line 3326 "VBNET.ATG" Expression val = null; AssignmentOperatorType op; Location startLoc = la.Location; @@ -6232,28 +6240,28 @@ out resumeStatement); la.kind == Tokens.Not || la.kind == Tokens.Times; SimpleExpr( -//#line 3330 "VBNET.ATG" +#line 3333 "VBNET.ATG" out expr); if (StartOf(46)) { AssignmentOperator( -//#line 3332 "VBNET.ATG" +#line 3335 "VBNET.ATG" out op); Expr( -//#line 3332 "VBNET.ATG" +#line 3335 "VBNET.ATG" out val); -//#line 3334 "VBNET.ATG" +#line 3337 "VBNET.ATG" expr = new AssignmentExpression(expr, op, val); expr.StartLocation = startLoc; expr.EndLocation = t.EndLocation; } else if (StartOf(47)) { -//#line 3338 "VBNET.ATG" +#line 3341 "VBNET.ATG" if (mustBeAssignment) Error("error in assignment."); } else SynErr(302); -//#line 3341 "VBNET.ATG" +#line 3344 "VBNET.ATG" // a field reference expression that stands alone is a // invocation expression without parantheses and arguments if(expr is MemberReferenceExpression || expr is IdentifierExpression) { @@ -6267,58 +6275,58 @@ out val); } else if (la.kind == 73) { lexer.NextToken(); SimpleExpr( -//#line 3351 "VBNET.ATG" +#line 3354 "VBNET.ATG" out expr); -//#line 3351 "VBNET.ATG" +#line 3354 "VBNET.ATG" statement = new ExpressionStatement(expr); } else if (la.kind == 226) { lexer.NextToken(); -//#line 3353 "VBNET.ATG" +#line 3356 "VBNET.ATG" Statement block; if ( -//#line 3354 "VBNET.ATG" +#line 3357 "VBNET.ATG" Peek(1).kind == Tokens.As) { -//#line 3355 "VBNET.ATG" +#line 3358 "VBNET.ATG" LocalVariableDeclaration resourceAquisition = new LocalVariableDeclaration(Modifiers.None); VariableDeclarator( -//#line 3356 "VBNET.ATG" +#line 3359 "VBNET.ATG" resourceAquisition.Variables); while (la.kind == 22) { lexer.NextToken(); VariableDeclarator( -//#line 3358 "VBNET.ATG" +#line 3361 "VBNET.ATG" resourceAquisition.Variables); } Block( -//#line 3360 "VBNET.ATG" +#line 3363 "VBNET.ATG" out block); -//#line 3362 "VBNET.ATG" +#line 3365 "VBNET.ATG" statement = new UsingStatement(resourceAquisition, block); } else if (StartOf(24)) { Expr( -//#line 3364 "VBNET.ATG" +#line 3367 "VBNET.ATG" out expr); Block( -//#line 3365 "VBNET.ATG" +#line 3368 "VBNET.ATG" out block); -//#line 3366 "VBNET.ATG" +#line 3369 "VBNET.ATG" statement = new UsingStatement(new ExpressionStatement(expr), block); } else SynErr(303); Expect(113); Expect(226); } else if (StartOf(48)) { LocalDeclarationStatement( -//#line 3369 "VBNET.ATG" +#line 3372 "VBNET.ATG" out statement); } else SynErr(304); -//#line 3372 "VBNET.ATG" +#line 3375 "VBNET.ATG" if (statement != null) { statement.StartLocation = startLocation; statement.EndLocation = t.EndLocation; @@ -6327,35 +6335,35 @@ out statement); } void FromOrAggregateQueryOperator( -//#line 2309 "VBNET.ATG" +#line 2312 "VBNET.ATG" List middleClauses) { -//#line 2311 "VBNET.ATG" +#line 2314 "VBNET.ATG" QueryExpressionFromClause fromClause = null; QueryExpressionAggregateClause aggregateClause = null; if (la.kind == 126) { FromQueryOperator( -//#line 2314 "VBNET.ATG" +#line 2317 "VBNET.ATG" out fromClause); -//#line 2315 "VBNET.ATG" +#line 2318 "VBNET.ATG" middleClauses.Add(fromClause); } else if (la.kind == 58) { AggregateQueryOperator( -//#line 2316 "VBNET.ATG" +#line 2319 "VBNET.ATG" out aggregateClause); -//#line 2317 "VBNET.ATG" +#line 2320 "VBNET.ATG" middleClauses.Add(aggregateClause); } else SynErr(305); } void QueryOperator( -//#line 2320 "VBNET.ATG" +#line 2323 "VBNET.ATG" List middleClauses) { -//#line 2322 "VBNET.ATG" +#line 2325 "VBNET.ATG" QueryExpressionJoinVBClause joinClause = null; QueryExpressionGroupVBClause groupByClause = null; QueryExpressionPartitionVBClause partitionClause = null; @@ -6365,94 +6373,94 @@ List middleClauses) { if (la.kind == 126) { FromQueryOperator( -//#line 2329 "VBNET.ATG" +#line 2332 "VBNET.ATG" out fromClause); -//#line 2330 "VBNET.ATG" +#line 2333 "VBNET.ATG" middleClauses.Add(fromClause); } else if (la.kind == 58) { AggregateQueryOperator( -//#line 2331 "VBNET.ATG" +#line 2334 "VBNET.ATG" out aggregateClause); -//#line 2332 "VBNET.ATG" +#line 2335 "VBNET.ATG" middleClauses.Add(aggregateClause); } else if (la.kind == 197) { SelectQueryOperator( -//#line 2333 "VBNET.ATG" +#line 2336 "VBNET.ATG" middleClauses); } else if (la.kind == 107) { DistinctQueryOperator( -//#line 2334 "VBNET.ATG" +#line 2337 "VBNET.ATG" middleClauses); } else if (la.kind == 230) { WhereQueryOperator( -//#line 2335 "VBNET.ATG" +#line 2338 "VBNET.ATG" middleClauses); } else if (la.kind == 176) { OrderByQueryOperator( -//#line 2336 "VBNET.ATG" +#line 2339 "VBNET.ATG" middleClauses); } else if (la.kind == 203 || la.kind == 212) { PartitionQueryOperator( -//#line 2337 "VBNET.ATG" +#line 2340 "VBNET.ATG" out partitionClause); -//#line 2338 "VBNET.ATG" +#line 2341 "VBNET.ATG" middleClauses.Add(partitionClause); } else if (la.kind == 148) { LetQueryOperator( -//#line 2339 "VBNET.ATG" +#line 2342 "VBNET.ATG" middleClauses); } else if (la.kind == 146) { JoinQueryOperator( -//#line 2340 "VBNET.ATG" +#line 2343 "VBNET.ATG" out joinClause); -//#line 2341 "VBNET.ATG" +#line 2344 "VBNET.ATG" middleClauses.Add(joinClause); } else if ( -//#line 2342 "VBNET.ATG" +#line 2345 "VBNET.ATG" la.kind == Tokens.Group && Peek(1).kind == Tokens.Join) { GroupJoinQueryOperator( -//#line 2342 "VBNET.ATG" +#line 2345 "VBNET.ATG" out groupJoinClause); -//#line 2343 "VBNET.ATG" +#line 2346 "VBNET.ATG" middleClauses.Add(groupJoinClause); } else if (la.kind == 133) { GroupByQueryOperator( -//#line 2344 "VBNET.ATG" +#line 2347 "VBNET.ATG" out groupByClause); -//#line 2345 "VBNET.ATG" +#line 2348 "VBNET.ATG" middleClauses.Add(groupByClause); } else SynErr(306); } void FromQueryOperator( -//#line 2420 "VBNET.ATG" +#line 2423 "VBNET.ATG" out QueryExpressionFromClause fromClause) { -//#line 2422 "VBNET.ATG" +#line 2425 "VBNET.ATG" fromClause = new QueryExpressionFromClause(); fromClause.StartLocation = la.Location; Expect(126); CollectionRangeVariableDeclarationList( -//#line 2425 "VBNET.ATG" +#line 2428 "VBNET.ATG" fromClause.Sources); -//#line 2427 "VBNET.ATG" +#line 2430 "VBNET.ATG" fromClause.EndLocation = t.EndLocation; } void AggregateQueryOperator( -//#line 2489 "VBNET.ATG" +#line 2492 "VBNET.ATG" out QueryExpressionAggregateClause aggregateClause) { -//#line 2491 "VBNET.ATG" +#line 2494 "VBNET.ATG" aggregateClause = new QueryExpressionAggregateClause(); aggregateClause.IntoVariables = new List(); aggregateClause.StartLocation = la.Location; @@ -6460,77 +6468,77 @@ out QueryExpressionAggregateClause aggregateClause) { Expect(58); CollectionRangeVariableDeclaration( -//#line 2496 "VBNET.ATG" +#line 2499 "VBNET.ATG" out source); -//#line 2498 "VBNET.ATG" +#line 2501 "VBNET.ATG" aggregateClause.Source = source; while (StartOf(31)) { QueryOperator( -//#line 2501 "VBNET.ATG" +#line 2504 "VBNET.ATG" aggregateClause.MiddleClauses); } Expect(143); ExpressionRangeVariableDeclarationList( -//#line 2503 "VBNET.ATG" +#line 2506 "VBNET.ATG" aggregateClause.IntoVariables); -//#line 2505 "VBNET.ATG" +#line 2508 "VBNET.ATG" aggregateClause.EndLocation = t.EndLocation; } void SelectQueryOperator( -//#line 2431 "VBNET.ATG" +#line 2434 "VBNET.ATG" List middleClauses) { -//#line 2433 "VBNET.ATG" +#line 2436 "VBNET.ATG" QueryExpressionSelectVBClause selectClause = new QueryExpressionSelectVBClause(); selectClause.StartLocation = la.Location; Expect(197); ExpressionRangeVariableDeclarationList( -//#line 2436 "VBNET.ATG" +#line 2439 "VBNET.ATG" selectClause.Variables); -//#line 2438 "VBNET.ATG" +#line 2441 "VBNET.ATG" selectClause.EndLocation = t.Location; middleClauses.Add(selectClause); } void DistinctQueryOperator( -//#line 2443 "VBNET.ATG" +#line 2446 "VBNET.ATG" List middleClauses) { -//#line 2445 "VBNET.ATG" +#line 2448 "VBNET.ATG" QueryExpressionDistinctClause distinctClause = new QueryExpressionDistinctClause(); distinctClause.StartLocation = la.Location; Expect(107); -//#line 2450 "VBNET.ATG" +#line 2453 "VBNET.ATG" distinctClause.EndLocation = t.EndLocation; middleClauses.Add(distinctClause); } void WhereQueryOperator( -//#line 2455 "VBNET.ATG" +#line 2458 "VBNET.ATG" List middleClauses) { -//#line 2457 "VBNET.ATG" +#line 2460 "VBNET.ATG" QueryExpressionWhereClause whereClause = new QueryExpressionWhereClause(); whereClause.StartLocation = la.Location; Expression operand = null; Expect(230); Expr( -//#line 2461 "VBNET.ATG" +#line 2464 "VBNET.ATG" out operand); -//#line 2463 "VBNET.ATG" +#line 2466 "VBNET.ATG" whereClause.Condition = operand; whereClause.EndLocation = t.EndLocation; @@ -6539,10 +6547,10 @@ out operand); } void OrderByQueryOperator( -//#line 2348 "VBNET.ATG" +#line 2351 "VBNET.ATG" List middleClauses) { -//#line 2350 "VBNET.ATG" +#line 2353 "VBNET.ATG" QueryExpressionOrderClause orderClause = new QueryExpressionOrderClause(); orderClause.StartLocation = la.Location; List orderings = null; @@ -6550,10 +6558,10 @@ List middleClauses) { Expect(176); Expect(70); OrderExpressionList( -//#line 2354 "VBNET.ATG" +#line 2357 "VBNET.ATG" out orderings); -//#line 2356 "VBNET.ATG" +#line 2359 "VBNET.ATG" orderClause.Orderings = orderings; orderClause.EndLocation = t.EndLocation; middleClauses.Add(orderClause); @@ -6561,10 +6569,10 @@ out orderings); } void PartitionQueryOperator( -//#line 2470 "VBNET.ATG" +#line 2473 "VBNET.ATG" out QueryExpressionPartitionVBClause partitionClause) { -//#line 2472 "VBNET.ATG" +#line 2475 "VBNET.ATG" partitionClause = new QueryExpressionPartitionVBClause(); partitionClause.StartLocation = la.Location; Expression expr = null; @@ -6572,60 +6580,60 @@ out QueryExpressionPartitionVBClause partitionClause) { if (la.kind == 212) { lexer.NextToken(); -//#line 2477 "VBNET.ATG" +#line 2480 "VBNET.ATG" partitionClause.PartitionType = QueryExpressionPartitionType.Take; if (la.kind == 231) { lexer.NextToken(); -//#line 2478 "VBNET.ATG" +#line 2481 "VBNET.ATG" partitionClause.PartitionType = QueryExpressionPartitionType.TakeWhile; } } else if (la.kind == 203) { lexer.NextToken(); -//#line 2479 "VBNET.ATG" +#line 2482 "VBNET.ATG" partitionClause.PartitionType = QueryExpressionPartitionType.Skip; if (la.kind == 231) { lexer.NextToken(); -//#line 2480 "VBNET.ATG" +#line 2483 "VBNET.ATG" partitionClause.PartitionType = QueryExpressionPartitionType.SkipWhile; } } else SynErr(307); Expr( -//#line 2482 "VBNET.ATG" +#line 2485 "VBNET.ATG" out expr); -//#line 2484 "VBNET.ATG" +#line 2487 "VBNET.ATG" partitionClause.Expression = expr; partitionClause.EndLocation = t.EndLocation; } void LetQueryOperator( -//#line 2509 "VBNET.ATG" +#line 2512 "VBNET.ATG" List middleClauses) { -//#line 2511 "VBNET.ATG" +#line 2514 "VBNET.ATG" QueryExpressionLetVBClause letClause = new QueryExpressionLetVBClause(); letClause.StartLocation = la.Location; Expect(148); ExpressionRangeVariableDeclarationList( -//#line 2514 "VBNET.ATG" +#line 2517 "VBNET.ATG" letClause.Variables); -//#line 2516 "VBNET.ATG" +#line 2519 "VBNET.ATG" letClause.EndLocation = t.EndLocation; middleClauses.Add(letClause); } void JoinQueryOperator( -//#line 2553 "VBNET.ATG" +#line 2556 "VBNET.ATG" out QueryExpressionJoinVBClause joinClause) { -//#line 2555 "VBNET.ATG" +#line 2558 "VBNET.ATG" joinClause = new QueryExpressionJoinVBClause(); joinClause.StartLocation = la.Location; CollectionRangeVariable joinVariable = null; @@ -6635,203 +6643,203 @@ out QueryExpressionJoinVBClause joinClause) { Expect(146); CollectionRangeVariableDeclaration( -//#line 2562 "VBNET.ATG" +#line 2565 "VBNET.ATG" out joinVariable); -//#line 2563 "VBNET.ATG" +#line 2566 "VBNET.ATG" joinClause.JoinVariable = joinVariable; if (la.kind == 146) { JoinQueryOperator( -//#line 2565 "VBNET.ATG" +#line 2568 "VBNET.ATG" out subJoin); -//#line 2566 "VBNET.ATG" +#line 2569 "VBNET.ATG" joinClause.SubJoin = subJoin; } Expect(171); JoinCondition( -//#line 2569 "VBNET.ATG" +#line 2572 "VBNET.ATG" out condition); -//#line 2570 "VBNET.ATG" +#line 2573 "VBNET.ATG" SafeAdd(joinClause, joinClause.Conditions, condition); while (la.kind == 60) { lexer.NextToken(); JoinCondition( -//#line 2572 "VBNET.ATG" +#line 2575 "VBNET.ATG" out condition); -//#line 2573 "VBNET.ATG" +#line 2576 "VBNET.ATG" SafeAdd(joinClause, joinClause.Conditions, condition); } -//#line 2576 "VBNET.ATG" +#line 2579 "VBNET.ATG" joinClause.EndLocation = t.EndLocation; } void GroupJoinQueryOperator( -//#line 2406 "VBNET.ATG" +#line 2409 "VBNET.ATG" out QueryExpressionGroupJoinVBClause groupJoinClause) { -//#line 2408 "VBNET.ATG" +#line 2411 "VBNET.ATG" groupJoinClause = new QueryExpressionGroupJoinVBClause(); groupJoinClause.StartLocation = la.Location; QueryExpressionJoinVBClause joinClause = null; Expect(133); JoinQueryOperator( -//#line 2412 "VBNET.ATG" +#line 2415 "VBNET.ATG" out joinClause); Expect(143); ExpressionRangeVariableDeclarationList( -//#line 2413 "VBNET.ATG" +#line 2416 "VBNET.ATG" groupJoinClause.IntoVariables); -//#line 2415 "VBNET.ATG" +#line 2418 "VBNET.ATG" groupJoinClause.JoinClause = joinClause; groupJoinClause.EndLocation = t.EndLocation; } void GroupByQueryOperator( -//#line 2393 "VBNET.ATG" +#line 2396 "VBNET.ATG" out QueryExpressionGroupVBClause groupByClause) { -//#line 2395 "VBNET.ATG" +#line 2398 "VBNET.ATG" groupByClause = new QueryExpressionGroupVBClause(); groupByClause.StartLocation = la.Location; Expect(133); ExpressionRangeVariableDeclarationList( -//#line 2398 "VBNET.ATG" +#line 2401 "VBNET.ATG" groupByClause.GroupVariables); Expect(70); ExpressionRangeVariableDeclarationList( -//#line 2399 "VBNET.ATG" +#line 2402 "VBNET.ATG" groupByClause.ByVariables); Expect(143); ExpressionRangeVariableDeclarationList( -//#line 2400 "VBNET.ATG" +#line 2403 "VBNET.ATG" groupByClause.IntoVariables); -//#line 2402 "VBNET.ATG" +#line 2405 "VBNET.ATG" groupByClause.EndLocation = t.EndLocation; } void OrderExpressionList( -//#line 2362 "VBNET.ATG" +#line 2365 "VBNET.ATG" out List orderings) { -//#line 2364 "VBNET.ATG" +#line 2367 "VBNET.ATG" orderings = new List(); QueryExpressionOrdering ordering = null; OrderExpression( -//#line 2367 "VBNET.ATG" +#line 2370 "VBNET.ATG" out ordering); -//#line 2368 "VBNET.ATG" +#line 2371 "VBNET.ATG" orderings.Add(ordering); while (la.kind == 22) { lexer.NextToken(); OrderExpression( -//#line 2370 "VBNET.ATG" +#line 2373 "VBNET.ATG" out ordering); -//#line 2371 "VBNET.ATG" +#line 2374 "VBNET.ATG" orderings.Add(ordering); } } void OrderExpression( -//#line 2375 "VBNET.ATG" +#line 2378 "VBNET.ATG" out QueryExpressionOrdering ordering) { -//#line 2377 "VBNET.ATG" +#line 2380 "VBNET.ATG" ordering = new QueryExpressionOrdering(); ordering.StartLocation = la.Location; ordering.Direction = QueryExpressionOrderingDirection.None; Expression orderExpr = null; Expr( -//#line 2382 "VBNET.ATG" +#line 2385 "VBNET.ATG" out orderExpr); -//#line 2384 "VBNET.ATG" +#line 2387 "VBNET.ATG" ordering.Criteria = orderExpr; if (la.kind == 64 || la.kind == 104) { if (la.kind == 64) { lexer.NextToken(); -//#line 2387 "VBNET.ATG" +#line 2390 "VBNET.ATG" ordering.Direction = QueryExpressionOrderingDirection.Ascending; } else { lexer.NextToken(); -//#line 2388 "VBNET.ATG" +#line 2391 "VBNET.ATG" ordering.Direction = QueryExpressionOrderingDirection.Descending; } } -//#line 2390 "VBNET.ATG" +#line 2393 "VBNET.ATG" ordering.EndLocation = t.EndLocation; } void ExpressionRangeVariableDeclarationList( -//#line 2521 "VBNET.ATG" +#line 2524 "VBNET.ATG" List variables) { -//#line 2523 "VBNET.ATG" +#line 2526 "VBNET.ATG" ExpressionRangeVariable variable = null; ExpressionRangeVariableDeclaration( -//#line 2525 "VBNET.ATG" +#line 2528 "VBNET.ATG" out variable); -//#line 2526 "VBNET.ATG" +#line 2529 "VBNET.ATG" variables.Add(variable); while (la.kind == 22) { lexer.NextToken(); ExpressionRangeVariableDeclaration( -//#line 2527 "VBNET.ATG" +#line 2530 "VBNET.ATG" out variable); -//#line 2527 "VBNET.ATG" +#line 2530 "VBNET.ATG" variables.Add(variable); } } void CollectionRangeVariableDeclarationList( -//#line 2580 "VBNET.ATG" +#line 2583 "VBNET.ATG" List rangeVariables) { -//#line 2581 "VBNET.ATG" +#line 2584 "VBNET.ATG" CollectionRangeVariable variableDeclaration; CollectionRangeVariableDeclaration( -//#line 2583 "VBNET.ATG" +#line 2586 "VBNET.ATG" out variableDeclaration); -//#line 2584 "VBNET.ATG" +#line 2587 "VBNET.ATG" rangeVariables.Add(variableDeclaration); while (la.kind == 22) { lexer.NextToken(); CollectionRangeVariableDeclaration( -//#line 2585 "VBNET.ATG" +#line 2588 "VBNET.ATG" out variableDeclaration); -//#line 2585 "VBNET.ATG" +#line 2588 "VBNET.ATG" rangeVariables.Add(variableDeclaration); } } void CollectionRangeVariableDeclaration( -//#line 2588 "VBNET.ATG" +#line 2591 "VBNET.ATG" out CollectionRangeVariable rangeVariable) { -//#line 2590 "VBNET.ATG" +#line 2593 "VBNET.ATG" rangeVariable = new CollectionRangeVariable(); rangeVariable.StartLocation = la.Location; TypeReference typeName = null; @@ -6839,71 +6847,71 @@ out CollectionRangeVariable rangeVariable) { Identifier(); -//#line 2595 "VBNET.ATG" +#line 2598 "VBNET.ATG" rangeVariable.Identifier = t.val; if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 2596 "VBNET.ATG" +#line 2599 "VBNET.ATG" out typeName); -//#line 2596 "VBNET.ATG" +#line 2599 "VBNET.ATG" rangeVariable.Type = typeName; } Expect(138); Expr( -//#line 2597 "VBNET.ATG" +#line 2600 "VBNET.ATG" out inExpr); -//#line 2599 "VBNET.ATG" +#line 2602 "VBNET.ATG" rangeVariable.Expression = inExpr; rangeVariable.EndLocation = t.EndLocation; } void ExpressionRangeVariableDeclaration( -//#line 2530 "VBNET.ATG" +#line 2533 "VBNET.ATG" out ExpressionRangeVariable variable) { -//#line 2532 "VBNET.ATG" +#line 2535 "VBNET.ATG" variable = new ExpressionRangeVariable(); variable.StartLocation = la.Location; Expression rhs = null; TypeReference typeName = null; if ( -//#line 2538 "VBNET.ATG" +#line 2541 "VBNET.ATG" IsIdentifiedExpressionRange()) { Identifier(); -//#line 2539 "VBNET.ATG" +#line 2542 "VBNET.ATG" variable.Identifier = t.val; if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 2541 "VBNET.ATG" +#line 2544 "VBNET.ATG" out typeName); -//#line 2542 "VBNET.ATG" +#line 2545 "VBNET.ATG" variable.Type = typeName; } Expect(20); } Expr( -//#line 2546 "VBNET.ATG" +#line 2549 "VBNET.ATG" out rhs); -//#line 2548 "VBNET.ATG" +#line 2551 "VBNET.ATG" variable.Expression = rhs; variable.EndLocation = t.EndLocation; } void JoinCondition( -//#line 2604 "VBNET.ATG" +#line 2607 "VBNET.ATG" out QueryExpressionJoinConditionVB condition) { -//#line 2606 "VBNET.ATG" +#line 2609 "VBNET.ATG" condition = new QueryExpressionJoinConditionVB(); condition.StartLocation = la.Location; @@ -6911,14 +6919,14 @@ out QueryExpressionJoinConditionVB condition) { Expression rhs = null; Expr( -//#line 2612 "VBNET.ATG" +#line 2615 "VBNET.ATG" out lhs); Expect(116); Expr( -//#line 2612 "VBNET.ATG" +#line 2615 "VBNET.ATG" out rhs); -//#line 2614 "VBNET.ATG" +#line 2617 "VBNET.ATG" condition.LeftSide = lhs; condition.RightSide = rhs; condition.EndLocation = t.EndLocation; @@ -6926,69 +6934,69 @@ out rhs); } void Argument( -//#line 2678 "VBNET.ATG" +#line 2681 "VBNET.ATG" out Expression argumentexpr) { -//#line 2680 "VBNET.ATG" +#line 2683 "VBNET.ATG" Expression expr; argumentexpr = null; string name; Location startLocation = la.Location; if ( -//#line 2685 "VBNET.ATG" +#line 2688 "VBNET.ATG" IsNamedAssign()) { Identifier(); -//#line 2685 "VBNET.ATG" +#line 2688 "VBNET.ATG" name = t.val; Expect(55); Expr( -//#line 2685 "VBNET.ATG" +#line 2688 "VBNET.ATG" out expr); -//#line 2687 "VBNET.ATG" +#line 2690 "VBNET.ATG" argumentexpr = new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else if (StartOf(24)) { Expr( -//#line 2690 "VBNET.ATG" +#line 2693 "VBNET.ATG" out argumentexpr); } else SynErr(308); } void QualIdentAndTypeArguments( -//#line 2758 "VBNET.ATG" +#line 2761 "VBNET.ATG" out TypeReference typeref, bool canBeUnbound) { -//#line 2759 "VBNET.ATG" +#line 2762 "VBNET.ATG" string name; typeref = null; Qualident( -//#line 2761 "VBNET.ATG" +#line 2764 "VBNET.ATG" out name); -//#line 2762 "VBNET.ATG" +#line 2765 "VBNET.ATG" typeref = new TypeReference(name); if ( -//#line 2763 "VBNET.ATG" +#line 2766 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { lexer.NextToken(); Expect(169); if ( -//#line 2765 "VBNET.ATG" +#line 2768 "VBNET.ATG" canBeUnbound && (la.kind == Tokens.CloseParenthesis || la.kind == Tokens.Comma)) { -//#line 2766 "VBNET.ATG" +#line 2769 "VBNET.ATG" typeref.GenericTypes.Add(NullTypeReference.Instance); while (la.kind == 22) { lexer.NextToken(); -//#line 2767 "VBNET.ATG" +#line 2770 "VBNET.ATG" typeref.GenericTypes.Add(NullTypeReference.Instance); } } else if (StartOf(8)) { TypeArgumentList( -//#line 2768 "VBNET.ATG" +#line 2771 "VBNET.ATG" typeref.GenericTypes); } else SynErr(309); Expect(38); @@ -6996,24 +7004,24 @@ typeref.GenericTypes); } void RankList( -//#line 2805 "VBNET.ATG" +#line 2808 "VBNET.ATG" out int i) { -//#line 2806 "VBNET.ATG" +#line 2809 "VBNET.ATG" i = 0; while (la.kind == 22) { lexer.NextToken(); -//#line 2807 "VBNET.ATG" +#line 2810 "VBNET.ATG" ++i; } } void Attribute( -//#line 2846 "VBNET.ATG" +#line 2849 "VBNET.ATG" out ASTAttribute attribute) { -//#line 2848 "VBNET.ATG" +#line 2851 "VBNET.ATG" string name; List positional = new List(); List named = new List(); @@ -7024,43 +7032,43 @@ out ASTAttribute attribute) { Expect(26); } Qualident( -//#line 2854 "VBNET.ATG" +#line 2857 "VBNET.ATG" out name); if (la.kind == 37) { AttributeArguments( -//#line 2855 "VBNET.ATG" +#line 2858 "VBNET.ATG" positional, named); } -//#line 2857 "VBNET.ATG" +#line 2860 "VBNET.ATG" attribute = new ASTAttribute(name, positional, named) { StartLocation = startLocation, EndLocation = t.EndLocation }; } void AttributeArguments( -//#line 2862 "VBNET.ATG" +#line 2865 "VBNET.ATG" List positional, List named) { -//#line 2864 "VBNET.ATG" +#line 2867 "VBNET.ATG" bool nameFound = false; string name = ""; Expression expr; Expect(37); if ( -//#line 2870 "VBNET.ATG" +#line 2873 "VBNET.ATG" IsNotClosingParenthesis()) { -//#line 2871 "VBNET.ATG" +#line 2874 "VBNET.ATG" Location startLocation = la.Location; if ( -//#line 2873 "VBNET.ATG" +#line 2876 "VBNET.ATG" IsNamedAssign()) { -//#line 2873 "VBNET.ATG" +#line 2876 "VBNET.ATG" nameFound = true; IdentifierOrKeyword( -//#line 2874 "VBNET.ATG" +#line 2877 "VBNET.ATG" out name); if (la.kind == 55) { lexer.NextToken(); @@ -7069,10 +7077,10 @@ out name); } else SynErr(310); } Expr( -//#line 2876 "VBNET.ATG" +#line 2879 "VBNET.ATG" out expr); -//#line 2878 "VBNET.ATG" +#line 2881 "VBNET.ATG" if (expr != null) { if (string.IsNullOrEmpty(name)) { positional.Add(expr); } else { named.Add(new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }); name = ""; } @@ -7081,13 +7089,13 @@ out expr); while (la.kind == 22) { lexer.NextToken(); if ( -//#line 2886 "VBNET.ATG" +#line 2889 "VBNET.ATG" IsNamedAssign()) { -//#line 2886 "VBNET.ATG" +#line 2889 "VBNET.ATG" nameFound = true; IdentifierOrKeyword( -//#line 2887 "VBNET.ATG" +#line 2890 "VBNET.ATG" out name); if (la.kind == 55) { lexer.NextToken(); @@ -7096,14 +7104,14 @@ out name); } else SynErr(311); } else if (StartOf(24)) { -//#line 2889 "VBNET.ATG" +#line 2892 "VBNET.ATG" if (nameFound) Error("no positional argument after named argument"); } else SynErr(312); Expr( -//#line 2890 "VBNET.ATG" +#line 2893 "VBNET.ATG" out expr); -//#line 2890 "VBNET.ATG" +#line 2893 "VBNET.ATG" if (expr != null) { if(name == "") positional.Add(expr); else { named.Add(new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }); name = ""; } } @@ -7114,34 +7122,34 @@ out expr); } void ParameterModifier( -//#line 3701 "VBNET.ATG" +#line 3704 "VBNET.ATG" ParamModifierList m) { if (la.kind == 72) { lexer.NextToken(); -//#line 3702 "VBNET.ATG" +#line 3705 "VBNET.ATG" m.Add(ParameterModifiers.In); } else if (la.kind == 69) { lexer.NextToken(); -//#line 3703 "VBNET.ATG" +#line 3706 "VBNET.ATG" m.Add(ParameterModifiers.Ref); } else if (la.kind == 174) { lexer.NextToken(); -//#line 3704 "VBNET.ATG" +#line 3707 "VBNET.ATG" m.Add(ParameterModifiers.Optional); } else if (la.kind == 182) { lexer.NextToken(); -//#line 3705 "VBNET.ATG" +#line 3708 "VBNET.ATG" m.Add(ParameterModifiers.Params); } else SynErr(313); } void Statement() { -//#line 3017 "VBNET.ATG" +#line 3020 "VBNET.ATG" Statement stmt = null; Location startPos = la.Location; string label = String.Empty; @@ -7149,27 +7157,27 @@ ParamModifierList m) { if (la.kind == 1 || la.kind == 21) { } else if ( -//#line 3023 "VBNET.ATG" +#line 3026 "VBNET.ATG" IsLabel()) { LabelName( -//#line 3023 "VBNET.ATG" +#line 3026 "VBNET.ATG" out label); -//#line 3025 "VBNET.ATG" +#line 3028 "VBNET.ATG" AddChild(new LabelStatement(t.val)); Expect(21); Statement(); } else if (StartOf(49)) { EmbeddedStatement( -//#line 3028 "VBNET.ATG" +#line 3031 "VBNET.ATG" out stmt); -//#line 3028 "VBNET.ATG" +#line 3031 "VBNET.ATG" AddChild(stmt); } else SynErr(314); -//#line 3031 "VBNET.ATG" +#line 3034 "VBNET.ATG" if (stmt != null) { stmt.StartLocation = startPos; stmt.EndLocation = t.Location; @@ -7178,30 +7186,30 @@ out stmt); } void LabelName( -//#line 3471 "VBNET.ATG" +#line 3474 "VBNET.ATG" out string name) { -//#line 3473 "VBNET.ATG" +#line 3476 "VBNET.ATG" name = String.Empty; if (StartOf(4)) { Identifier(); -//#line 3475 "VBNET.ATG" +#line 3478 "VBNET.ATG" name = t.val; } else if (la.kind == 5) { lexer.NextToken(); -//#line 3476 "VBNET.ATG" +#line 3479 "VBNET.ATG" name = t.val; } else SynErr(315); } void LocalDeclarationStatement( -//#line 3039 "VBNET.ATG" +#line 3042 "VBNET.ATG" out Statement statement) { -//#line 3041 "VBNET.ATG" +#line 3044 "VBNET.ATG" ModifierList m = new ModifierList(); LocalVariableDeclaration localVariableDeclaration; bool dimfound = false; @@ -7210,22 +7218,22 @@ out Statement statement) { if (la.kind == 88) { lexer.NextToken(); -//#line 3047 "VBNET.ATG" +#line 3050 "VBNET.ATG" m.Add(Modifiers.Const, t.Location); } else if (la.kind == 204) { lexer.NextToken(); -//#line 3048 "VBNET.ATG" +#line 3051 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); } else { lexer.NextToken(); -//#line 3049 "VBNET.ATG" +#line 3052 "VBNET.ATG" dimfound = true; } } -//#line 3052 "VBNET.ATG" +#line 3055 "VBNET.ATG" if(dimfound && (m.Modifier & Modifiers.Const) != 0) { Error("Dim is not allowed on constants."); } @@ -7238,135 +7246,135 @@ out Statement statement) { localVariableDeclaration.StartLocation = t.Location; VariableDeclarator( -//#line 3063 "VBNET.ATG" +#line 3066 "VBNET.ATG" localVariableDeclaration.Variables); while (la.kind == 22) { lexer.NextToken(); VariableDeclarator( -//#line 3064 "VBNET.ATG" +#line 3067 "VBNET.ATG" localVariableDeclaration.Variables); } -//#line 3066 "VBNET.ATG" +#line 3069 "VBNET.ATG" statement = localVariableDeclaration; } void TryStatement( -//#line 3589 "VBNET.ATG" +#line 3592 "VBNET.ATG" out Statement tryStatement) { -//#line 3591 "VBNET.ATG" +#line 3594 "VBNET.ATG" Statement blockStmt = null, finallyStmt = null;List catchClauses = null; Expect(218); EndOfStmt(); Block( -//#line 3594 "VBNET.ATG" +#line 3597 "VBNET.ATG" out blockStmt); if (la.kind == 75 || la.kind == 113 || la.kind == 123) { CatchClauses( -//#line 3595 "VBNET.ATG" +#line 3598 "VBNET.ATG" out catchClauses); } if (la.kind == 123) { lexer.NextToken(); EndOfStmt(); Block( -//#line 3596 "VBNET.ATG" +#line 3599 "VBNET.ATG" out finallyStmt); } Expect(113); Expect(218); -//#line 3599 "VBNET.ATG" +#line 3602 "VBNET.ATG" tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt); } void WithStatement( -//#line 3569 "VBNET.ATG" +#line 3572 "VBNET.ATG" out Statement withStatement) { -//#line 3571 "VBNET.ATG" +#line 3574 "VBNET.ATG" Statement blockStmt = null; Expression expr = null; Expect(233); -//#line 3574 "VBNET.ATG" +#line 3577 "VBNET.ATG" Location start = t.Location; Expr( -//#line 3575 "VBNET.ATG" +#line 3578 "VBNET.ATG" out expr); EndOfStmt(); -//#line 3577 "VBNET.ATG" +#line 3580 "VBNET.ATG" withStatement = new WithStatement(expr); withStatement.StartLocation = start; Block( -//#line 3580 "VBNET.ATG" +#line 3583 "VBNET.ATG" out blockStmt); -//#line 3582 "VBNET.ATG" +#line 3585 "VBNET.ATG" ((WithStatement)withStatement).Body = (BlockStatement)blockStmt; Expect(113); Expect(233); -//#line 3585 "VBNET.ATG" +#line 3588 "VBNET.ATG" withStatement.EndLocation = t.Location; } void WhileOrUntil( -//#line 3562 "VBNET.ATG" +#line 3565 "VBNET.ATG" out ConditionType conditionType) { -//#line 3563 "VBNET.ATG" +#line 3566 "VBNET.ATG" conditionType = ConditionType.None; if (la.kind == 231) { lexer.NextToken(); -//#line 3564 "VBNET.ATG" +#line 3567 "VBNET.ATG" conditionType = ConditionType.While; } else if (la.kind == 224) { lexer.NextToken(); -//#line 3565 "VBNET.ATG" +#line 3568 "VBNET.ATG" conditionType = ConditionType.Until; } else SynErr(316); } void LoopControlVariable( -//#line 3393 "VBNET.ATG" +#line 3396 "VBNET.ATG" out TypeReference type, out string name) { -//#line 3394 "VBNET.ATG" +#line 3397 "VBNET.ATG" ArrayList arrayModifiers = null; type = null; Qualident( -//#line 3398 "VBNET.ATG" +#line 3401 "VBNET.ATG" out name); if ( -//#line 3399 "VBNET.ATG" +#line 3402 "VBNET.ATG" IsDims()) { ArrayTypeModifiers( -//#line 3399 "VBNET.ATG" +#line 3402 "VBNET.ATG" out arrayModifiers); } if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 3400 "VBNET.ATG" +#line 3403 "VBNET.ATG" out type); -//#line 3400 "VBNET.ATG" +#line 3403 "VBNET.ATG" if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } } -//#line 3402 "VBNET.ATG" +#line 3405 "VBNET.ATG" if (type != null) { if(type.RankSpecifier != null && arrayModifiers != null) { Error("array rank only allowed one time"); @@ -7378,34 +7386,34 @@ out type); } void ReDimClause( -//#line 3480 "VBNET.ATG" +#line 3483 "VBNET.ATG" out Expression expr) { SimpleNonInvocationExpression( -//#line 3482 "VBNET.ATG" +#line 3485 "VBNET.ATG" out expr); ReDimClauseInternal( -//#line 3483 "VBNET.ATG" +#line 3486 "VBNET.ATG" ref expr); } void SingleLineStatementList( -//#line 3379 "VBNET.ATG" +#line 3382 "VBNET.ATG" List list) { -//#line 3380 "VBNET.ATG" +#line 3383 "VBNET.ATG" Statement embeddedStatement = null; if (la.kind == 113) { lexer.NextToken(); -//#line 3382 "VBNET.ATG" +#line 3385 "VBNET.ATG" embeddedStatement = new EndStatement() { StartLocation = t.Location, EndLocation = t.EndLocation }; } else if (StartOf(49)) { EmbeddedStatement( -//#line 3383 "VBNET.ATG" +#line 3386 "VBNET.ATG" out embeddedStatement); } else SynErr(317); -//#line 3384 "VBNET.ATG" +#line 3387 "VBNET.ATG" if (embeddedStatement != null) list.Add(embeddedStatement); while (la.kind == 21) { lexer.NextToken(); @@ -7415,49 +7423,49 @@ out embeddedStatement); if (la.kind == 113) { lexer.NextToken(); -//#line 3386 "VBNET.ATG" +#line 3389 "VBNET.ATG" embeddedStatement = new EndStatement() { StartLocation = t.Location, EndLocation = t.EndLocation }; } else if (StartOf(49)) { EmbeddedStatement( -//#line 3387 "VBNET.ATG" +#line 3390 "VBNET.ATG" out embeddedStatement); } else SynErr(318); -//#line 3388 "VBNET.ATG" +#line 3391 "VBNET.ATG" if (embeddedStatement != null) list.Add(embeddedStatement); } } void CaseClauses( -//#line 3522 "VBNET.ATG" +#line 3525 "VBNET.ATG" out List caseClauses) { -//#line 3524 "VBNET.ATG" +#line 3527 "VBNET.ATG" caseClauses = new List(); CaseLabel caseClause = null; CaseClause( -//#line 3527 "VBNET.ATG" +#line 3530 "VBNET.ATG" out caseClause); -//#line 3527 "VBNET.ATG" +#line 3530 "VBNET.ATG" if (caseClause != null) { caseClauses.Add(caseClause); } while (la.kind == 22) { lexer.NextToken(); CaseClause( -//#line 3528 "VBNET.ATG" +#line 3531 "VBNET.ATG" out caseClause); -//#line 3528 "VBNET.ATG" +#line 3531 "VBNET.ATG" if (caseClause != null) { caseClauses.Add(caseClause); } } } void OnErrorStatement( -//#line 3413 "VBNET.ATG" +#line 3416 "VBNET.ATG" out OnErrorStatement stmt) { -//#line 3415 "VBNET.ATG" +#line 3418 "VBNET.ATG" stmt = null; Location startLocation = la.Location; GotoStatement goToStatement = null; @@ -7465,13 +7473,13 @@ out OnErrorStatement stmt) { Expect(171); Expect(118); if ( -//#line 3422 "VBNET.ATG" +#line 3425 "VBNET.ATG" IsNegativeLabelName()) { Expect(132); Expect(30); Expect(5); -//#line 3424 "VBNET.ATG" +#line 3427 "VBNET.ATG" long intLabel = Int64.Parse(t.val); if(intLabel != 1) { Error("invalid label in on error statement."); @@ -7480,10 +7488,10 @@ IsNegativeLabelName()) { } else if (la.kind == 132) { GotoStatement( -//#line 3430 "VBNET.ATG" +#line 3433 "VBNET.ATG" out goToStatement); -//#line 3432 "VBNET.ATG" +#line 3435 "VBNET.ATG" string val = goToStatement.Label; // if value is numeric, make sure that is 0 @@ -7500,12 +7508,12 @@ out goToStatement); lexer.NextToken(); Expect(163); -//#line 3446 "VBNET.ATG" +#line 3449 "VBNET.ATG" stmt = new OnErrorStatement(new ResumeStatement(true)); } else SynErr(319); -//#line 3450 "VBNET.ATG" +#line 3453 "VBNET.ATG" if (stmt != null) { stmt.StartLocation = startLocation; stmt.EndLocation = t.EndLocation; @@ -7514,17 +7522,17 @@ out goToStatement); } void GotoStatement( -//#line 3458 "VBNET.ATG" +#line 3461 "VBNET.ATG" out GotoStatement goToStatement) { -//#line 3459 "VBNET.ATG" +#line 3462 "VBNET.ATG" string label = String.Empty; Location startLocation = la.Location; Expect(132); LabelName( -//#line 3461 "VBNET.ATG" +#line 3464 "VBNET.ATG" out label); -//#line 3463 "VBNET.ATG" +#line 3466 "VBNET.ATG" goToStatement = new GotoStatement(label) { StartLocation = startLocation, EndLocation = t.EndLocation @@ -7533,57 +7541,57 @@ out label); } void ResumeStatement( -//#line 3511 "VBNET.ATG" +#line 3514 "VBNET.ATG" out ResumeStatement resumeStatement) { -//#line 3513 "VBNET.ATG" +#line 3516 "VBNET.ATG" resumeStatement = null; string label = String.Empty; if ( -//#line 3516 "VBNET.ATG" +#line 3519 "VBNET.ATG" IsResumeNext()) { Expect(194); Expect(163); -//#line 3517 "VBNET.ATG" +#line 3520 "VBNET.ATG" resumeStatement = new ResumeStatement(true); } else if (la.kind == 194) { lexer.NextToken(); if (StartOf(50)) { LabelName( -//#line 3518 "VBNET.ATG" +#line 3521 "VBNET.ATG" out label); } -//#line 3518 "VBNET.ATG" +#line 3521 "VBNET.ATG" resumeStatement = new ResumeStatement(label); } else SynErr(320); } void ReDimClauseInternal( -//#line 3486 "VBNET.ATG" +#line 3489 "VBNET.ATG" ref Expression expr) { -//#line 3487 "VBNET.ATG" +#line 3490 "VBNET.ATG" List arguments; bool canBeNormal; bool canBeRedim; string name; Location startLocation = la.Location; while (la.kind == 26 || -//#line 3490 "VBNET.ATG" +#line 3493 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { if (la.kind == 26) { lexer.NextToken(); IdentifierOrKeyword( -//#line 3489 "VBNET.ATG" +#line 3492 "VBNET.ATG" out name); -//#line 3489 "VBNET.ATG" +#line 3492 "VBNET.ATG" expr = new MemberReferenceExpression(expr, name) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else { InvocationExpression( -//#line 3491 "VBNET.ATG" +#line 3494 "VBNET.ATG" ref expr); -//#line 3493 "VBNET.ATG" +#line 3496 "VBNET.ATG" expr.StartLocation = startLocation; expr.EndLocation = t.EndLocation; @@ -7591,11 +7599,11 @@ ref expr); } Expect(37); NormalOrReDimArgumentList( -//#line 3498 "VBNET.ATG" +#line 3501 "VBNET.ATG" out arguments, out canBeNormal, out canBeRedim); Expect(38); -//#line 3500 "VBNET.ATG" +#line 3503 "VBNET.ATG" expr = new InvocationExpression(expr, arguments); if (canBeRedim == false || canBeNormal && (la.kind == Tokens.Dot || la.kind == Tokens.OpenParenthesis)) { if (this.Errors.Count == 0) { @@ -7607,10 +7615,10 @@ out arguments, out canBeNormal, out canBeRedim); } void CaseClause( -//#line 3532 "VBNET.ATG" +#line 3535 "VBNET.ATG" out CaseLabel caseClause) { -//#line 3534 "VBNET.ATG" +#line 3537 "VBNET.ATG" Expression expr = null; Expression sexpr = null; BinaryOperatorType op = BinaryOperatorType.None; @@ -7619,7 +7627,7 @@ out CaseLabel caseClause) { if (la.kind == 111) { lexer.NextToken(); -//#line 3540 "VBNET.ATG" +#line 3543 "VBNET.ATG" caseClause = new CaseLabel(); } else if (StartOf(51)) { if (la.kind == 144) { @@ -7629,76 +7637,76 @@ out CaseLabel caseClause) { case 40: { lexer.NextToken(); -//#line 3544 "VBNET.ATG" +#line 3547 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 39: { lexer.NextToken(); -//#line 3545 "VBNET.ATG" +#line 3548 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 43: { lexer.NextToken(); -//#line 3546 "VBNET.ATG" +#line 3549 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 42: { lexer.NextToken(); -//#line 3547 "VBNET.ATG" +#line 3550 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 20: { lexer.NextToken(); -//#line 3548 "VBNET.ATG" +#line 3551 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 41: { lexer.NextToken(); -//#line 3549 "VBNET.ATG" +#line 3552 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } default: SynErr(321); break; } Expr( -//#line 3551 "VBNET.ATG" +#line 3554 "VBNET.ATG" out expr); -//#line 3553 "VBNET.ATG" +#line 3556 "VBNET.ATG" caseClause = new CaseLabel(op, expr); } else if (StartOf(24)) { Expr( -//#line 3555 "VBNET.ATG" +#line 3558 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); Expr( -//#line 3555 "VBNET.ATG" +#line 3558 "VBNET.ATG" out sexpr); } -//#line 3557 "VBNET.ATG" +#line 3560 "VBNET.ATG" caseClause = new CaseLabel(expr, sexpr); } else SynErr(322); } void CatchClauses( -//#line 3604 "VBNET.ATG" +#line 3607 "VBNET.ATG" out List catchClauses) { -//#line 3606 "VBNET.ATG" +#line 3609 "VBNET.ATG" catchClauses = new List(); TypeReference type = null; Statement blockStmt = null; @@ -7710,27 +7718,27 @@ out List catchClauses) { if (StartOf(4)) { Identifier(); -//#line 3614 "VBNET.ATG" +#line 3617 "VBNET.ATG" name = t.val; if (la.kind == 63) { lexer.NextToken(); TypeName( -//#line 3614 "VBNET.ATG" +#line 3617 "VBNET.ATG" out type); } } if (la.kind == 229) { lexer.NextToken(); Expr( -//#line 3615 "VBNET.ATG" +#line 3618 "VBNET.ATG" out expr); } EndOfStmt(); Block( -//#line 3617 "VBNET.ATG" +#line 3620 "VBNET.ATG" out blockStmt); -//#line 3618 "VBNET.ATG" +#line 3621 "VBNET.ATG" catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); } } diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG index ed814fad0b..75548a906f 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG @@ -1263,6 +1263,7 @@ StructureMemberDecl attributes> Parameters = parameters, TypeReference = returnType, OverloadableOperator = operatorType, + Name = GetReflectionNameForOperator(operatorType, opConversionType), ConversionType = opConversionType, Body = (BlockStatement)stmt, StartLocation = m.GetDeclarationLocation(startPos), @@ -1299,6 +1300,8 @@ OverloadableOperator | "Xor" (. operatorType = OverloadableOperatorType.ExclusiveOr; .) | + "Not" (. operatorType = OverloadableOperatorType.BitNot; .) + | "^" (. operatorType = OverloadableOperatorType.Power; .) | "<<" (. operatorType = OverloadableOperatorType.ShiftLeft; .) diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs index 10f1c830e7..ca7aca494c 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs @@ -385,5 +385,74 @@ namespace ICSharpCode.NRefactory.Parser.VB item.Parent = parent; } } + + internal static string GetReflectionNameForOperator(OverloadableOperatorType op, ConversionType conversion) + { + switch (op) { + case OverloadableOperatorType.Add: + return "op_Addition"; + case OverloadableOperatorType.BitNot: + return "op_OnesComplement"; + case OverloadableOperatorType.BitwiseAnd: + return "op_BitwiseAnd"; + case OverloadableOperatorType.BitwiseOr: + return "op_BitwiseOr"; + case OverloadableOperatorType.Concat: + return "op_Concatenate"; + case OverloadableOperatorType.CType: + switch (conversion) { + case ConversionType.Implicit: + return "op_Implicit"; + case ConversionType.Explicit: + return "op_Explicit"; + default: + return "op_unknown"; + } + case OverloadableOperatorType.Divide: + return "op_Division"; + case OverloadableOperatorType.DivideInteger: + return "op_IntegerDivision"; + case OverloadableOperatorType.Equality: + return "op_Equality"; + case OverloadableOperatorType.ExclusiveOr: + return "op_ExclusiveOr"; + case OverloadableOperatorType.GreaterThan: + return "op_GreaterThan"; + case OverloadableOperatorType.GreaterThanOrEqual: + return "op_GreaterThanOrEqual"; + case OverloadableOperatorType.InEquality: + return "op_Inequality"; + case OverloadableOperatorType.IsFalse: + return "op_False"; + case OverloadableOperatorType.IsTrue: + return "op_True"; + case OverloadableOperatorType.LessThan: + return "op_LessThan"; + case OverloadableOperatorType.LessThanOrEqual: + return "op_LessThanOrEqual"; + case OverloadableOperatorType.Like: + return "op_Like"; + case OverloadableOperatorType.Modulus: + return "op_Modulus"; + case OverloadableOperatorType.Multiply: + return "op_Multiply"; + case OverloadableOperatorType.Not: + return "op_LogicalNot"; + case OverloadableOperatorType.Power: + return "op_Exponent"; + case OverloadableOperatorType.ShiftLeft: + return "op_LeftShift"; + case OverloadableOperatorType.ShiftRight: + return "op_RightShift"; + case OverloadableOperatorType.Subtract: + return "op_Subtraction"; + case OverloadableOperatorType.UnaryMinus: + return "op_UnaryNegation"; + case OverloadableOperatorType.UnaryPlus: + return "op_UnaryPlus"; + default: + return "op_unknown"; + } + } } } From 8a4aff214e2f076ed46c36b2fdc493fbf529e69f Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 11 May 2012 17:06:44 +0200 Subject: [PATCH 02/22] fix problems with inherited members in Windows Forms DesignerGenerator - http://community.sharpdevelop.net/forums/t/15800.aspx --- .../Src/DesignerGenerator/AbstractDesignerGenerator.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs index cda90f1c2e..9a9c4214f8 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs @@ -344,8 +344,11 @@ namespace ICSharpCode.FormsDesigner continue; if (expr.TargetType.BaseType != "System.ComponentModel.ISupportInitialize") continue; - CodeMemberField field = formClass.Members.OfType().First(f => this.formClass.ProjectContent.Language.NameComparer.Equals(fieldRef.FieldName, f.Name)); - IClass fieldType = this.formClass.ProjectContent.GetClass(field.Type.BaseType, 0); + IField field = this.formClass.DefaultReturnType.GetFields() + .First(f => this.formClass.ProjectContent.Language.NameComparer.Equals(fieldRef.FieldName, f.Name)); + if (field.ReturnType == null) + continue; + IClass fieldType = field.ReturnType.GetUnderlyingClass(); if (fieldType == null) continue; if (!fieldType.IsTypeInInheritanceTree(iSupportInitializeInterface)) From 852d4356f7ea9b99608102571d85e46dc7d6c66a Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 11 May 2012 21:48:57 +0200 Subject: [PATCH 03/22] improve implementation of unsupported code removal --- .../AbstractDesignerGenerator.cs | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs index 9a9c4214f8..6c60742d5b 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs @@ -317,7 +317,7 @@ namespace ICSharpCode.FormsDesigner /// code that is not supported in a previous version of .NET. (3.5 and below) /// Currently it fixes: /// - remove calls to ISupportInitialize.BeginInit/EndInit, if the interface is not implemented by the type in the target framework. - /// + /// /// When adding new workarounds make sure that the code does not remove too much code! void RemoveUnsupportedCode(CodeTypeDeclaration formClass, CodeMemberMethod initializeComponent) { @@ -339,16 +339,9 @@ namespace ICSharpCode.FormsDesigner CodeMethodInvokeExpression invocation = (CodeMethodInvokeExpression)stmt.Expression; CodeCastExpression expr = invocation.Method.TargetObject as CodeCastExpression; if (expr != null) { - CodeFieldReferenceExpression fieldRef = expr.Expression as CodeFieldReferenceExpression; - if (fieldRef == null || !(fieldRef.TargetObject is CodeThisReferenceExpression)) - continue; if (expr.TargetType.BaseType != "System.ComponentModel.ISupportInitialize") continue; - IField field = this.formClass.DefaultReturnType.GetFields() - .First(f => this.formClass.ProjectContent.Language.NameComparer.Equals(fieldRef.FieldName, f.Name)); - if (field.ReturnType == null) - continue; - IClass fieldType = field.ReturnType.GetUnderlyingClass(); + var fieldType = GetTypeOfControl(expr.Expression, initializeComponent, formClass); if (fieldType == null) continue; if (!fieldType.IsTypeInInheritanceTree(iSupportInitializeInterface)) @@ -361,6 +354,31 @@ namespace ICSharpCode.FormsDesigner } } + /// + /// Tries to find the type of the expression. + /// + IClass GetTypeOfControl(CodeExpression expression, CodeMemberMethod initializeComponentMethod, CodeTypeDeclaration formTypeDeclaration) + { + StringComparer comparer = formClass.ProjectContent.Language.NameComparer; + if (expression is CodeVariableReferenceExpression) { + string name = ((CodeVariableReferenceExpression)expression).VariableName; + var decl = initializeComponentMethod.Statements.OfType().Single(v => comparer.Equals(v.Name, name)); + return formClass.ProjectContent.GetClass(decl.Type.BaseType, 0); + } + if (expression is CodeFieldReferenceExpression && ((CodeFieldReferenceExpression)expression).TargetObject is CodeThisReferenceExpression) { + string name = ((CodeFieldReferenceExpression)expression).FieldName; + var decl = formTypeDeclaration.Members.OfType().FirstOrDefault(f => comparer.Equals(name, f.Name)); + if (decl != null) + return formClass.ProjectContent.GetClass(decl.Type.BaseType, 0); + var field = formClass.DefaultReturnType.GetFields() + .First(f => comparer.Equals(f.Name, name)); + if (field.ReturnType == null) + return null; + return field.ReturnType.GetUnderlyingClass(); + } + return null; + } + /// /// Compares the SharpDevelop.Dom field declaration oldField to /// the CodeDom field declaration newField. From 4819102e03a91777ac3ef7ca9a39744a9e9a541e Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 11 May 2012 17:08:30 +0200 Subject: [PATCH 04/22] if project name and project file name differ, it is not possible to rename the project, if the new name is the same as the project file name. - http://community.sharpdevelop.net/forums/t/15800.aspx --- .../Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs index 8e2ec81774..c0b879076d 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs @@ -192,6 +192,15 @@ namespace ICSharpCode.SharpDevelop.Project // } string newFileName = Path.Combine(project.Directory, newName + Path.GetExtension(project.FileName)); + // see issue #2 on http://community.sharpdevelop.net/forums/t/15800.aspx: + // The name of the project and the file name might differ. So if the FileName is + // already the same as the new project file name, just update the name in the solution. + if (FileUtility.IsEqualFileName(newFileName, project.FileName)) { + project.Name = newName; + ProjectService.SaveSolution(); + return; + } + if (!FileService.RenameFile(project.FileName, newFileName, false)) { return; } From e96d9b64f3e791fd28f3a9006a6c5dade55422ef Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 12 May 2012 11:15:51 +0200 Subject: [PATCH 05/22] set version number to 4.2.1 --- src/Main/GlobalAssemblyInfo.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/GlobalAssemblyInfo.template b/src/Main/GlobalAssemblyInfo.template index 1cf08dcdd2..230c73063e 100644 --- a/src/Main/GlobalAssemblyInfo.template +++ b/src/Main/GlobalAssemblyInfo.template @@ -28,7 +28,7 @@ internal static class RevisionClass { public const string Major = "4"; public const string Minor = "2"; - public const string Build = "0"; + public const string Build = "1"; public const string Revision = "$INSERTREVISION$"; public const string VersionName = null; From b2542bf18203e03e44b3ad64ee350fd4a4107fac Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 12 May 2012 13:47:32 +0200 Subject: [PATCH 06/22] Fixed bad assert (floating point imprecision) http://community.sharpdevelop.net/forums/t/15797.aspx --- .../AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs index e1ec32c7f2..58a8da3b29 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs @@ -899,7 +899,8 @@ namespace ICSharpCode.AvalonEdit.Rendering // number of pixels clipped from the first visual line(s) clippedPixelsOnTop = scrollOffset.Y - heightTree.GetVisualPosition(firstLineInView); - Debug.Assert(clippedPixelsOnTop >= 0); + // clippedPixelsOnTop should be >= 0, except for floating point inaccurracy. + Debug.Assert(clippedPixelsOnTop >= -ExtensionMethods.Epsilon); newVisualLines = new List(); From e8ca5763fa191d653facbfa05b9d898db353e683 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 12 May 2012 14:02:29 +0200 Subject: [PATCH 07/22] Fixed NotSupportedException when stepping into a decompiled generic method. (crash #3606) --- src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs | 7 ++++++- .../Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs b/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs index 36eaaf1d05..c718f17734 100644 --- a/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs +++ b/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Reflection; using System.Text; +using Debugger.MetaData; namespace Debugger { @@ -42,7 +43,11 @@ namespace Debugger MethodInfo mr = (MethodInfo)member; if (mr.IsGenericMethod) { b.Append("``"); - b.Append(mr.GetGenericArguments().Length); + // DebugMethodInfo does not implement GetGenericArguments + if (mr is DebugMethodInfo) + b.Append(((DebugMethodInfo)mr).GenericParameterCount); + else + b.Append(mr.GetGenericArguments().Length); } parameters = mr.GetParameters(); if (mr.Name == "op_Implicit" || mr.Name == "op_Explicit") { diff --git a/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs b/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs index 37a0fed063..2f8f659726 100644 --- a/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs +++ b/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs @@ -195,6 +195,13 @@ namespace Debugger.MetaData get { return this.MethodDefSig.GenericParameterCount > 0; } } + /// + /// Gets the number of generic parameters on this method. + /// + public int GenericParameterCount { + get { return this.MethodDefSig.GenericParameterCount; } + } + /// public override RuntimeMethodHandle MethodHandle { get { throw new NotSupportedException(); } From 67e61d9c02b520f9c7632e289c9491d4d523192f Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 12 May 2012 15:04:36 +0200 Subject: [PATCH 08/22] Don't crash when opening a file while an SVN operation is in progress. http://community.sharpdevelop.net/forums/t/15766.aspx --- .../Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/AddIns/VersionControl/SubversionAddIn/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs b/src/AddIns/VersionControl/SubversionAddIn/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs index 82fc0b3e7f..8aa35d033e 100644 --- a/src/AddIns/VersionControl/SubversionAddIn/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs +++ b/src/AddIns/VersionControl/SubversionAddIn/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs @@ -192,7 +192,12 @@ namespace ICSharpCode.Svn } } - return client.SingleStatus(fileName).TextStatus; + try { + return client.SingleStatus(fileName).TextStatus; + } catch (SvnClientException ex) { + LoggingService.Warn(ex); + return StatusKind.None; + } } } From 12fba5cb2ba5769c8e09a7bc8b57c206c99901b8 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 12 May 2012 16:43:59 +0200 Subject: [PATCH 09/22] Remove incorrect GetElementType() call. --- src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs b/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs index c718f17734..75162c8d2f 100644 --- a/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs +++ b/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs @@ -78,7 +78,7 @@ namespace Debugger return; } if (type.IsGenericType) { - AppendTypeNameWithArguments(b, type.GetElementType(), type.GetGenericArguments()); + AppendTypeNameWithArguments(b, type, type.GetGenericArguments()); } else if (type.HasElementType) { AppendTypeName(b, type.GetElementType()); if (type.IsArray) { From 6d8bf0047d8ff5a867c3b93537bc5d2340e997e5 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 12 May 2012 16:25:34 +0200 Subject: [PATCH 10/22] fix bug introduced by f0ab34006f318f583672d14e7b130c220d2d4f98 - http://community.sharpdevelop.net/forums/t/15792.aspx --- .../WpfDesign.AddIn/Src/WpfViewContent.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs index 7914efbefa..44952fcbca 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs @@ -60,6 +60,7 @@ namespace ICSharpCode.WpfDesign.AddIn protected override void LoadInternal(OpenedFile file, System.IO.Stream stream) { + wasChangedInDesigner = false; Debug.Assert(file == this.PrimaryFile); _stream = new MemoryStream(); @@ -108,10 +109,11 @@ namespace ICSharpCode.WpfDesign.AddIn } private MemoryStream _stream; + bool wasChangedInDesigner; protected override void SaveInternal(OpenedFile file, System.IO.Stream stream) { - if (IsDirty && designer.DesignContext != null) { + if (wasChangedInDesigner && designer.DesignContext != null) { XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.IndentChars = EditorControlService.GlobalOptions.IndentationString; @@ -120,12 +122,10 @@ namespace ICSharpCode.WpfDesign.AddIn designer.SaveDesigner(xmlWriter); } } else { - if (_stream.CanRead) { - _stream.Position = 0; - using (var reader = new StreamReader(_stream)) { - using (var writer = new StreamWriter(stream)) { - writer.Write(reader.ReadToEnd()); - } + _stream.Position = 0; + using (var reader = new StreamReader(new UnclosableStream(_stream))) { + using (var writer = new StreamWriter(stream)) { + writer.Write(reader.ReadToEnd()); } } } @@ -153,6 +153,7 @@ namespace ICSharpCode.WpfDesign.AddIn void OnUndoStackChanged(object sender, EventArgs e) { + wasChangedInDesigner = true; this.PrimaryFile.MakeDirty(); } From 57d8888947afdf93918aead5b2c55387fdb879fa Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Thu, 17 May 2012 21:28:14 +0100 Subject: [PATCH 11/22] Fix WCFMetadata project item for Service References being added multiple times when adding a service reference. --- .../ProjectWithServiceReferences.cs | 13 +++++++++--- .../ProjectWithServiceReferencesTests.cs | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/ProjectWithServiceReferences.cs b/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/ProjectWithServiceReferences.cs index 78dec9ce42..d28261fb3e 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/ProjectWithServiceReferences.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/ProjectWithServiceReferences.cs @@ -82,9 +82,16 @@ namespace ICSharpCode.SharpDevelop.Gui.Dialogs.ReferenceDialog.ServiceReference void AddServiceReferencesItemToProject() { - var projectItem = new ServiceReferencesProjectItem(project); - projectItem.Include = "Service References"; - AddProjectItemToProject(projectItem); + if (IsServiceReferencesItemMissingFromProject()) { + var projectItem = new ServiceReferencesProjectItem(project); + projectItem.Include = "Service References"; + AddProjectItemToProject(projectItem); + } + } + + bool IsServiceReferencesItemMissingFromProject() + { + return project.GetItemsOfType(ItemType.ServiceReferences).Count() == 0; } void AddServiceReferenceItemToProject(ServiceReferenceFileName fileName) diff --git a/src/Main/Base/Test/ServiceReferences/ProjectWithServiceReferencesTests.cs b/src/Main/Base/Test/ServiceReferences/ProjectWithServiceReferencesTests.cs index de3917af7c..13a7b3604f 100644 --- a/src/Main/Base/Test/ServiceReferences/ProjectWithServiceReferencesTests.cs +++ b/src/Main/Base/Test/ServiceReferences/ProjectWithServiceReferencesTests.cs @@ -63,6 +63,11 @@ namespace ICSharpCode.SharpDevelop.Tests.ServiceReferences return msbuildProject.GetItemsOfType(ItemType.ServiceReferences).SingleOrDefault() as ServiceReferencesProjectItem; } + int GetHowManyWCFMetadataItemsInMSBuildProject() + { + return msbuildProject.GetItemsOfType(ItemType.ServiceReferences).Count(); + } + ProjectItem GetFileProjectItemInMSBuildProject(string fileName) { return msbuildProject.Items.SingleOrDefault(item => item.FileName == fileName); @@ -175,6 +180,21 @@ namespace ICSharpCode.SharpDevelop.Tests.ServiceReferences Assert.AreEqual("Service References", item.Include); } + [Test] + public void AddServiceReferenceProxyFile_ProjectHasServiceReferences_WCFMetadataItemNotAddedToProjectForServiceReferencesRootFolder() + { + CreateProjectWithMSBuildProject(); + var proxyFileName = new ServiceReferenceFileName() { ServiceName = "Service1" }; + project.AddServiceReferenceProxyFile(proxyFileName); + proxyFileName = new ServiceReferenceFileName() { ServiceName = "Service2" }; + + project.AddServiceReferenceProxyFile(proxyFileName); + + int count = GetHowManyWCFMetadataItemsInMSBuildProject(); + + Assert.AreEqual(1, count); + } + [Test] public void AddServiceReferenceProxyFile_ProjectHasNoServiceReferences_WCFMetadataStorageItemAddedToProjectForServiceReferencesFolder() { From 415f4ae27435951718fff140a3766afe92eda1c2 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 12 May 2012 17:46:45 +0200 Subject: [PATCH 12/22] Replace spaces with tabs. --- .../SelectedElementRectangleExtension.cs | 20 +- .../Extensions/SizeDisplayExtension.cs | 68 ++--- .../Extensions/StackPanelPlacementSupport.cs | 282 +++++++++--------- 3 files changed, 185 insertions(+), 185 deletions(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SelectedElementRectangleExtension.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SelectedElementRectangleExtension.cs index aedc0809d3..8d6a4643b5 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SelectedElementRectangleExtension.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SelectedElementRectangleExtension.cs @@ -23,18 +23,18 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions public SelectedElementRectangleExtension() { Rectangle selectionRect = new Rectangle(); - selectionRect.SnapsToDevicePixels = true; - selectionRect.Stroke = new SolidColorBrush(Color.FromRgb(0x47, 0x47, 0x47)); - selectionRect.StrokeThickness = 1.5; - selectionRect.IsHitTestVisible = false; + selectionRect.SnapsToDevicePixels = true; + selectionRect.Stroke = new SolidColorBrush(Color.FromRgb(0x47, 0x47, 0x47)); + selectionRect.StrokeThickness = 1.5; + selectionRect.IsHitTestVisible = false; - RelativePlacement placement = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Stretch); - placement.XOffset = -1; - placement.YOffset = -1; - placement.WidthOffset = 2; - placement.HeightOffset = 2; + RelativePlacement placement = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Stretch); + placement.XOffset = -1; + placement.YOffset = -1; + placement.WidthOffset = 2; + placement.HeightOffset = 2; - this.AddAdorners(placement, selectionRect); + this.AddAdorners(placement, selectionRect); } } } diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs index 25c59064a0..4ebe80bfb7 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs @@ -17,40 +17,40 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions /// /// Display Height/Width on the primary selection /// - [ExtensionFor(typeof(UIElement))] - class SizeDisplayExtension : PrimarySelectionAdornerProvider - { - HeightDisplay _heightDisplay; - WidthDisplay _widthDisplay; - - public HeightDisplay HeightDisplay{ - get { return _heightDisplay; } - } - - public WidthDisplay WidthDisplay{ - get { return _widthDisplay; } - } - - protected override void OnInitialized() - { - base.OnInitialized(); - if (this.ExtendedItem != null) - { - RelativePlacement placementHeight = new RelativePlacement(HorizontalAlignment.Right, VerticalAlignment.Stretch); - placementHeight.XOffset = 10; - _heightDisplay = new HeightDisplay(); - _heightDisplay.DataContext = this.ExtendedItem.Component; + [ExtensionFor(typeof(UIElement))] + class SizeDisplayExtension : PrimarySelectionAdornerProvider + { + HeightDisplay _heightDisplay; + WidthDisplay _widthDisplay; + + public HeightDisplay HeightDisplay{ + get { return _heightDisplay; } + } + + public WidthDisplay WidthDisplay{ + get { return _widthDisplay; } + } + + protected override void OnInitialized() + { + base.OnInitialized(); + if (this.ExtendedItem != null) + { + RelativePlacement placementHeight = new RelativePlacement(HorizontalAlignment.Right, VerticalAlignment.Stretch); + placementHeight.XOffset = 10; + _heightDisplay = new HeightDisplay(); + _heightDisplay.DataContext = this.ExtendedItem.Component; - RelativePlacement placementWidth = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Bottom); - placementWidth.YOffset = 10; - _widthDisplay = new WidthDisplay(); - _widthDisplay.DataContext = this.ExtendedItem.Component; + RelativePlacement placementWidth = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Bottom); + placementWidth.YOffset = 10; + _widthDisplay = new WidthDisplay(); + _widthDisplay.DataContext = this.ExtendedItem.Component; - this.AddAdorners(placementHeight, _heightDisplay); - this.AddAdorners(placementWidth, _widthDisplay); - _heightDisplay.Visibility=Visibility.Hidden; - _widthDisplay.Visibility=Visibility.Hidden; - } - } - } + this.AddAdorners(placementHeight, _heightDisplay); + this.AddAdorners(placementWidth, _widthDisplay); + _heightDisplay.Visibility=Visibility.Hidden; + _widthDisplay.Visibility=Visibility.Hidden; + } + } + } } diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs index acd92c6e0a..786c65f0f8 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs @@ -18,156 +18,156 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions /// Provides for . /// [ExtensionFor(typeof (StackPanel), OverrideExtension = typeof (DefaultPlacementBehavior))] - public class StackPanelPlacementSupport : DefaultPlacementBehavior - { - private StackPanel _stackPanel; - private AdornerPanel _adornerPanel; - private Rectangle _rectangle = new Rectangle(); // Draws a rectangle to indicate the position of insertion. - private readonly List _rects = new List(); // Contains the Rect of all the children of StackPanel. - - - private bool _isItemGettingResized; // Indicates whether any children is getting resized. - private int _indexToInsert; // Postion where to insert the element. + public class StackPanelPlacementSupport : DefaultPlacementBehavior + { + private StackPanel _stackPanel; + private AdornerPanel _adornerPanel; + private Rectangle _rectangle = new Rectangle(); // Draws a rectangle to indicate the position of insertion. + private readonly List _rects = new List(); // Contains the Rect of all the children of StackPanel. + + + private bool _isItemGettingResized; // Indicates whether any children is getting resized. + private int _indexToInsert; // Postion where to insert the element. - protected override void OnInitialized() - { - base.OnInitialized(); - _stackPanel = this.ExtendedItem.View as StackPanel; - var children = this.ExtendedItem.ContentProperty.CollectionElements; - foreach (var child in children) { - Point p = child.View.TranslatePoint(new Point(0, 0), this.ExtendedItem.View); - _rects.Add(new Rect(p, child.View.RenderSize)); - } - } + protected override void OnInitialized() + { + base.OnInitialized(); + _stackPanel = this.ExtendedItem.View as StackPanel; + var children = this.ExtendedItem.ContentProperty.CollectionElements; + foreach (var child in children) { + Point p = child.View.TranslatePoint(new Point(0, 0), this.ExtendedItem.View); + _rects.Add(new Rect(p, child.View.RenderSize)); + } + } - public override void BeginPlacement(PlacementOperation operation) - { - base.BeginPlacement(operation); - if (_rects.Count > 0) - _rects.Clear(); - - /* Add Rect of all children to _rects */ - var children = this.ExtendedItem.ContentProperty.CollectionElements; - foreach (var child in children) { - Point p = child.View.TranslatePoint(new Point(0, 0), this.ExtendedItem.View); - _rects.Add(new Rect(p, child.View.RenderSize)); - } - if (_adornerPanel != null && this.ExtendedItem.Services.DesignPanel.Adorners.Contains(_adornerPanel)) - this.ExtendedItem.Services.DesignPanel.Adorners.Remove(_adornerPanel); - - /* Place the Rectangle */ - _adornerPanel = new AdornerPanel(); - _rectangle = new Rectangle(); - _adornerPanel.SetAdornedElement(this.ExtendedItem.View, this.ExtendedItem); - _adornerPanel.Children.Add(_rectangle); - this.ExtendedItem.Services.DesignPanel.Adorners.Add(_adornerPanel); - } + public override void BeginPlacement(PlacementOperation operation) + { + base.BeginPlacement(operation); + if (_rects.Count > 0) + _rects.Clear(); + + /* Add Rect of all children to _rects */ + var children = this.ExtendedItem.ContentProperty.CollectionElements; + foreach (var child in children) { + Point p = child.View.TranslatePoint(new Point(0, 0), this.ExtendedItem.View); + _rects.Add(new Rect(p, child.View.RenderSize)); + } + if (_adornerPanel != null && this.ExtendedItem.Services.DesignPanel.Adorners.Contains(_adornerPanel)) + this.ExtendedItem.Services.DesignPanel.Adorners.Remove(_adornerPanel); + + /* Place the Rectangle */ + _adornerPanel = new AdornerPanel(); + _rectangle = new Rectangle(); + _adornerPanel.SetAdornedElement(this.ExtendedItem.View, this.ExtendedItem); + _adornerPanel.Children.Add(_rectangle); + this.ExtendedItem.Services.DesignPanel.Adorners.Add(_adornerPanel); + } - public override void EndPlacement(PlacementOperation operation) - { - base.EndPlacement(operation); - if (_adornerPanel != null && this.ExtendedItem.Services.DesignPanel.Adorners.Contains(_adornerPanel)) - this.ExtendedItem.Services.DesignPanel.Adorners.Remove(_adornerPanel); - } + public override void EndPlacement(PlacementOperation operation) + { + base.EndPlacement(operation); + if (_adornerPanel != null && this.ExtendedItem.Services.DesignPanel.Adorners.Contains(_adornerPanel)) + this.ExtendedItem.Services.DesignPanel.Adorners.Remove(_adornerPanel); + } - public override void EnterContainer(PlacementOperation operation) - { - base.EnterContainer(operation); - foreach (var info in operation.PlacedItems) { - info.Item.Properties[FrameworkElement.MarginProperty].Reset(); - info.Item.Properties[FrameworkElement.HorizontalAlignmentProperty].Reset(); - info.Item.Properties[FrameworkElement.VerticalAlignmentProperty].Reset(); - } - _rectangle.Visibility = Visibility.Visible; - } + public override void EnterContainer(PlacementOperation operation) + { + base.EnterContainer(operation); + foreach (var info in operation.PlacedItems) { + info.Item.Properties[FrameworkElement.MarginProperty].Reset(); + info.Item.Properties[FrameworkElement.HorizontalAlignmentProperty].Reset(); + info.Item.Properties[FrameworkElement.VerticalAlignmentProperty].Reset(); + } + _rectangle.Visibility = Visibility.Visible; + } - public override void LeaveContainer(PlacementOperation operation) - { - base.LeaveContainer(operation); - /* Hide the rectangle in case switching to the other container - * otherwise it will show up intersecting with the container */ - _rectangle.Visibility = Visibility.Hidden; - } + public override void LeaveContainer(PlacementOperation operation) + { + base.LeaveContainer(operation); + /* Hide the rectangle in case switching to the other container + * otherwise it will show up intersecting with the container */ + _rectangle.Visibility = Visibility.Hidden; + } - public override void SetPosition(PlacementInformation info) - { - base.SetPosition(info); + public override void SetPosition(PlacementInformation info) + { + base.SetPosition(info); - var resizeExtensions = info.Item.Extensions.OfType(); - if (resizeExtensions != null && resizeExtensions.Count() != 0) { - var resizeExtension = resizeExtensions.First(); - _isItemGettingResized = resizeExtension.IsResizing; - } + var resizeExtensions = info.Item.Extensions.OfType(); + if (resizeExtensions != null && resizeExtensions.Count() != 0) { + var resizeExtension = resizeExtensions.First(); + _isItemGettingResized = resizeExtension.IsResizing; + } - if (_stackPanel != null && !_isItemGettingResized) { - if (_stackPanel.Orientation == Orientation.Vertical) { - var offset = FindHorizontalRectanglePlacementOffset(info.Bounds); - DrawHorizontalRectangle(offset); - } else { - var offset = FindVerticalRectanglePlacementOffset(info.Bounds); - DrawVerticalRectangle(offset); - } + if (_stackPanel != null && !_isItemGettingResized) { + if (_stackPanel.Orientation == Orientation.Vertical) { + var offset = FindHorizontalRectanglePlacementOffset(info.Bounds); + DrawHorizontalRectangle(offset); + } else { + var offset = FindVerticalRectanglePlacementOffset(info.Bounds); + DrawVerticalRectangle(offset); + } - ChangePostionTo(info.Item.View, _indexToInsert); - } - } + ChangePostionTo(info.Item.View, _indexToInsert); + } + } - private void ChangePostionTo(UIElement element, int index) - { - int elementIndex = 0; - if (_stackPanel.Children.Contains(element)) - elementIndex = _stackPanel.Children.IndexOf(element); - if (index > elementIndex) - index--; - _stackPanel.Children.Remove(element); - _stackPanel.Children.Insert(index, element); - } - - private double FindHorizontalRectanglePlacementOffset(Rect rect) - { - _rects.Sort((r1, r2) => r1.Top.CompareTo(r2.Top)); - var itemCenter = (rect.Top + rect.Bottom)/2; - for (int i = 0; i < _rects.Count; i++) { - var rectCenter = (_rects[i].Top + _rects[i].Bottom)/2; - if (rectCenter >= itemCenter) { - _indexToInsert = i; - return _rects[i].Top; - } - } - _indexToInsert = _rects.Count; - return _rects.Count > 0 ? _rects.Last().Bottom : 0; - } - - private double FindVerticalRectanglePlacementOffset(Rect rect) - { - _rects.Sort((r1, r2) => r1.Left.CompareTo(r2.Left)); - var itemCenter = (rect.Left + rect.Right)/2; - for (int i = 0; i < _rects.Count; i++) { - var rectCenter = (_rects[i].Left + _rects[i].Top)/2; - if (rectCenter >= itemCenter) { - _indexToInsert = i; - return _rects[i].Left; - } - } - _indexToInsert = _rects.Count; - return _rects.Count > 0 ? _rects.Last().Right : 0; - } - - private void DrawHorizontalRectangle(double offset) - { - _rectangle.Height = 2; - _rectangle.Fill = Brushes.Black; - var placement = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Top) {YOffset = offset}; - AdornerPanel.SetPlacement(_rectangle, placement); - } - - private void DrawVerticalRectangle(double offset) - { - _rectangle.Width = 2; - _rectangle.Fill = Brushes.Black; - var placement = new RelativePlacement(HorizontalAlignment.Left, VerticalAlignment.Stretch) {XOffset = offset}; - AdornerPanel.SetPlacement(_rectangle, placement); - } - } + private void ChangePostionTo(UIElement element, int index) + { + int elementIndex = 0; + if (_stackPanel.Children.Contains(element)) + elementIndex = _stackPanel.Children.IndexOf(element); + if (index > elementIndex) + index--; + _stackPanel.Children.Remove(element); + _stackPanel.Children.Insert(index, element); + } + + private double FindHorizontalRectanglePlacementOffset(Rect rect) + { + _rects.Sort((r1, r2) => r1.Top.CompareTo(r2.Top)); + var itemCenter = (rect.Top + rect.Bottom)/2; + for (int i = 0; i < _rects.Count; i++) { + var rectCenter = (_rects[i].Top + _rects[i].Bottom)/2; + if (rectCenter >= itemCenter) { + _indexToInsert = i; + return _rects[i].Top; + } + } + _indexToInsert = _rects.Count; + return _rects.Count > 0 ? _rects.Last().Bottom : 0; + } + + private double FindVerticalRectanglePlacementOffset(Rect rect) + { + _rects.Sort((r1, r2) => r1.Left.CompareTo(r2.Left)); + var itemCenter = (rect.Left + rect.Right)/2; + for (int i = 0; i < _rects.Count; i++) { + var rectCenter = (_rects[i].Left + _rects[i].Top)/2; + if (rectCenter >= itemCenter) { + _indexToInsert = i; + return _rects[i].Left; + } + } + _indexToInsert = _rects.Count; + return _rects.Count > 0 ? _rects.Last().Right : 0; + } + + private void DrawHorizontalRectangle(double offset) + { + _rectangle.Height = 2; + _rectangle.Fill = Brushes.Black; + var placement = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Top) {YOffset = offset}; + AdornerPanel.SetPlacement(_rectangle, placement); + } + + private void DrawVerticalRectangle(double offset) + { + _rectangle.Width = 2; + _rectangle.Fill = Brushes.Black; + var placement = new RelativePlacement(HorizontalAlignment.Left, VerticalAlignment.Stretch) {XOffset = offset}; + AdornerPanel.SetPlacement(_rectangle, placement); + } + } } From a2f42f266539ce70bf6f2e7e0b842638dd61a8d1 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 12 May 2012 17:52:39 +0200 Subject: [PATCH 13/22] Fixed StackPanelPlacementSupport.ChangePositionTo(). http://community.sharpdevelop.net/forums/t/13865.aspx --- .../Extensions/StackPanelPlacementSupport.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs index 786c65f0f8..88f5094d0d 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs @@ -109,19 +109,20 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions DrawVerticalRectangle(offset); } - ChangePostionTo(info.Item.View, _indexToInsert); + ChangePositionTo(info.Item, _indexToInsert); } } - private void ChangePostionTo(UIElement element, int index) + private void ChangePositionTo(DesignItem element, int index) { - int elementIndex = 0; - if (_stackPanel.Children.Contains(element)) - elementIndex = _stackPanel.Children.IndexOf(element); - if (index > elementIndex) + if (this.ExtendedItem.ContentProperty == null || !this.ExtendedItem.ContentProperty.IsCollection) + return; + var elements = this.ExtendedItem.ContentProperty.CollectionElements; + int elementIndex = elements.IndexOf(element); + if (elementIndex >= 0 && index > elementIndex) index--; - _stackPanel.Children.Remove(element); - _stackPanel.Children.Insert(index, element); + elements.Remove(element); + elements.Insert(index, element); } private double FindHorizontalRectanglePlacementOffset(Rect rect) From e9bfd6145fc6a5882aebb7c46c75892f1015a5d6 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 21 May 2012 17:26:40 +0200 Subject: [PATCH 14/22] fix Cannot load designer when using 'select case' - http://community.sharpdevelop.net/forums/p/15838/41446.aspx#41446 --- .../Src/Lexer/VBNet/ExpressionFinder.atg | 15 +- .../Src/Lexer/VBNet/ExpressionFinder.cs | 4 + .../Project/Src/Lexer/VBNet/Lexer.cs | 2 +- .../Project/Src/Lexer/VBNet/Parser.cs | 3215 +++++++++-------- .../Project/Src/Lexer/VBNet/PushParser.frame | 1 + .../Parser/Statements/SwitchStatementTests.cs | 14 + 6 files changed, 1654 insertions(+), 1597 deletions(-) diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg index 0f69a3e491..41512e9020 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg @@ -1137,10 +1137,19 @@ MultilineIfRemainder = SelectStatement = "Select" [ "Case" ] Expression StatementTerminator { - "Case" ( + // HACK: '<' is recognized as XML literal, if occurring at the start of an expression + // in the CaseClause however it can only be a less-than-sign and vbc does not allow XML literals. + // we use a simple xmlAllowed flag: + // the flag is only set to false immetiately before the expression is parsed and set to true once '<' + // is recognized as less-than-sign to allow normal behavior of the lexer in later expressions. + "Case" (. xmlAllowed = false; .) ( "Else" | - ( [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix | Expression ) - { "," ( [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix | Expression ) } + ( (. xmlAllowed = true; .) [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix + | (. xmlAllowed = true; .) Expression ) + { "," (. xmlAllowed = false; .) + ( (. xmlAllowed = true; .) [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix + | (. xmlAllowed = true; .) Expression ) + } ) StatementTerminatorAndBlock } diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs index 4182966fdb..da283225ce 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs @@ -121,6 +121,10 @@ namespace ICSharpCode.NRefactory.Parser.VB set { readXmlIdentifier = value; } } + public bool XmlAllowed { + get { return xmlAllowed; } + } + public bool NextTokenIsStartOfImportsOrAccessExpression { get { return nextTokenIsStartOfImportsOrAccessExpression; } } diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs index 68f5661460..cad5421a4f 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs @@ -317,7 +317,7 @@ namespace ICSharpCode.NRefactory.Parser.VB return new Token(Tokens.XmlEndInlineVB, new Location(x, y), new Location(Col, Line)); } #endregion - if (ch == '<' && (ef.NextTokenIsPotentialStartOfExpression || ef.NextTokenIsStartOfImportsOrAccessExpression)) { + if (ch == '<' && ef.XmlAllowed && (ef.NextTokenIsPotentialStartOfExpression || ef.NextTokenIsStartOfImportsOrAccessExpression)) { xmlModeStack.Push(new XmlModeInfo(ef.NextTokenIsStartOfImportsOrAccessExpression)); XmlModeInfo info = xmlModeStack.Peek(); int x = Col - 1; diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs index a77878718f..cdced2c739 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs @@ -28,7 +28,8 @@ partial class ExpressionFinder { case 6: case 88: case 266: - case 534: + case 365: + case 537: { BitArray a = new BitArray(239); return a; @@ -52,24 +53,24 @@ partial class ExpressionFinder { case 244: case 248: case 297: - case 401: - case 407: - case 478: - case 524: - case 531: - case 539: - case 569: - case 605: - case 654: - case 668: - case 741: + case 404: + case 410: + case 481: + case 527: + case 534: + case 542: + case 572: + case 608: + case 657: + case 671: + case 744: return set[6]; case 12: case 13: - case 570: - case 571: - case 616: - case 626: + case 573: + case 574: + case 619: + case 629: { BitArray a = new BitArray(239); a.Set(1, true); @@ -93,31 +94,31 @@ partial class ExpressionFinder { case 353: case 359: case 364: - case 374: - case 375: - case 398: - case 425: - case 530: - case 536: - case 542: - case 546: - case 554: - case 562: - case 572: - case 581: - case 598: - case 603: - case 611: - case 617: + case 377: + case 378: + case 401: + case 428: + case 533: + case 539: + case 545: + case 549: + case 557: + case 565: + case 575: + case 584: + case 601: + case 606: + case 614: case 620: - case 627: + case 623: case 630: - case 649: + case 633: case 652: - case 676: - case 684: - case 720: - case 740: + case 655: + case 679: + case 687: + case 723: + case 743: { BitArray a = new BitArray(239); a.Set(1, true); @@ -135,23 +136,23 @@ partial class ExpressionFinder { case 273: case 300: case 354: - case 399: - case 458: - case 579: - case 599: - case 618: - case 622: - case 628: - case 650: - case 685: + case 402: + case 461: + case 582: + case 602: + case 621: + case 625: + case 631: + case 653: + case 688: { BitArray a = new BitArray(239); a.Set(113, true); return a; } case 22: - case 547: - case 582: + case 550: + case 585: return set[9]; case 25: { @@ -163,7 +164,7 @@ partial class ExpressionFinder { case 27: return set[10]; case 28: - case 724: + case 727: return set[11]; case 29: return set[12]; @@ -177,28 +178,28 @@ partial class ExpressionFinder { case 267: case 278: case 279: - case 466: - case 467: - case 468: case 469: - case 557: - case 558: - case 591: - case 592: - case 679: - case 680: - case 733: - case 734: + case 470: + case 471: + case 472: + case 560: + case 561: + case 594: + case 595: + case 682: + case 683: + case 736: + case 737: return set[14]; case 33: case 34: - case 525: - case 526: - case 532: - case 533: - case 559: - case 560: - case 673: + case 528: + case 529: + case 535: + case 536: + case 562: + case 563: + case 676: return set[15]; case 35: case 37: @@ -210,27 +211,27 @@ partial class ExpressionFinder { case 221: case 309: case 334: - case 424: - case 442: - case 453: - case 481: - case 535: - case 553: - case 561: - case 633: + case 427: + case 445: + case 456: + case 484: + case 538: + case 556: + case 564: case 636: - case 658: + case 639: case 661: - case 663: - case 675: - case 688: - case 690: - case 713: + case 664: + case 666: + case 678: + case 691: + case 693: case 716: case 719: - case 725: + case 722: case 728: - case 746: + case 731: + case 749: return set[16]; case 38: case 41: @@ -241,8 +242,8 @@ partial class ExpressionFinder { case 97: case 101: case 163: - case 390: - case 485: + case 393: + case 488: return set[19]; case 42: { @@ -260,17 +261,17 @@ partial class ExpressionFinder { case 46: case 167: case 188: - case 394: - case 429: - case 479: + case 397: + case 432: case 482: - case 502: - case 565: - case 596: - case 648: - case 694: - case 723: - case 732: + case 485: + case 505: + case 568: + case 599: + case 651: + case 697: + case 726: + case 735: { BitArray a = new BitArray(239); a.Set(38, true); @@ -282,7 +283,7 @@ partial class ExpressionFinder { case 49: case 179: case 186: - case 396: + case 399: { BitArray a = new BitArray(239); a.Set(22, true); @@ -292,36 +293,36 @@ partial class ExpressionFinder { case 51: case 52: case 54: - case 392: - case 393: - case 414: - case 415: - case 421: - case 422: - case 493: - case 494: - case 707: - case 708: + case 395: + case 396: + case 417: + case 418: + case 424: + case 425: + case 496: + case 497: + case 710: + case 711: return set[22]; case 53: case 169: case 170: case 172: case 181: - case 416: - case 423: - case 431: - case 440: - case 444: - case 489: + case 419: + case 426: + case 434: + case 443: + case 447: case 492: - case 496: - case 498: + case 495: case 499: - case 509: - case 516: - case 523: - case 709: + case 501: + case 502: + case 512: + case 519: + case 526: + case 712: { BitArray a = new BitArray(239); a.Set(22, true); @@ -359,20 +360,21 @@ partial class ExpressionFinder { case 352: case 358: case 369: - case 371: case 372: - case 378: - case 395: - case 397: - case 417: - case 441: - case 471: - case 487: - case 488: + case 374: + case 375: + case 381: + case 398: + case 400: + case 420: + case 444: + case 474: case 490: case 491: - case 552: - case 632: + case 493: + case 494: + case 555: + case 635: return set[23]; case 57: case 78: @@ -448,7 +450,7 @@ partial class ExpressionFinder { return a; } case 71: - case 445: + case 448: { BitArray a = new BitArray(239); a.Set(40, true); @@ -467,7 +469,7 @@ partial class ExpressionFinder { case 284: case 285: case 336: - case 742: + case 745: { BitArray a = new BitArray(239); a.Set(20, true); @@ -499,7 +501,7 @@ partial class ExpressionFinder { } case 84: case 100: - case 519: + case 522: { BitArray a = new BitArray(239); a.Set(22, true); @@ -546,7 +548,7 @@ partial class ExpressionFinder { return a; } case 96: - case 689: + case 692: { BitArray a = new BitArray(239); a.Set(26, true); @@ -603,8 +605,8 @@ partial class ExpressionFinder { return a; } case 111: - case 454: - case 459: + case 457: + case 462: { BitArray a = new BitArray(239); a.Set(210, true); @@ -636,8 +638,8 @@ partial class ExpressionFinder { return a; } case 116: - case 604: - case 623: + case 607: + case 626: { BitArray a = new BitArray(239); a.Set(186, true); @@ -759,7 +761,7 @@ partial class ExpressionFinder { return a; } case 135: - case 641: + case 644: { BitArray a = new BitArray(239); a.Set(98, true); @@ -838,8 +840,8 @@ partial class ExpressionFinder { return set[32]; case 161: case 162: - case 483: - case 484: + case 486: + case 487: return set[33]; case 164: return set[34]; @@ -850,10 +852,10 @@ partial class ExpressionFinder { return set[35]; case 175: case 253: - case 461: + case 464: return set[36]; case 176: - case 377: + case 380: { BitArray a = new BitArray(239); a.Set(135, true); @@ -863,13 +865,13 @@ partial class ExpressionFinder { case 184: case 189: case 255: - case 426: - case 455: - case 477: + case 429: + case 458: case 480: - case 593: - case 594: - case 646: + case 483: + case 596: + case 597: + case 649: { BitArray a = new BitArray(239); a.Set(37, true); @@ -975,10 +977,10 @@ partial class ExpressionFinder { case 245: return set[45]; case 252: - case 556: - case 667: - case 678: - case 686: + case 559: + case 670: + case 681: + case 689: { BitArray a = new BitArray(239); a.Set(127, true); @@ -997,21 +999,21 @@ partial class ExpressionFinder { return set[49]; case 269: case 270: - case 383: + case 386: return set[50]; case 272: case 277: - case 367: - case 659: - case 660: + case 366: case 662: - case 697: - case 714: - case 715: + case 663: + case 665: + case 700: case 717: - case 726: - case 727: + case 718: + case 720: case 729: + case 730: + case 732: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1031,7 +1033,7 @@ partial class ExpressionFinder { case 287: case 329: case 344: - case 406: + case 409: return set[52]; case 290: case 291: @@ -1043,8 +1045,8 @@ partial class ExpressionFinder { case 342: return set[53]; case 292: - case 384: case 387: + case 390: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1152,14 +1154,16 @@ partial class ExpressionFinder { case 362: case 363: return set[66]; - case 365: - case 366: - return set[67]; + case 367: case 368: + return set[67]; case 370: return set[68]; + case 371: case 373: - case 379: + return set[69]; + case 376: + case 382: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1167,7 +1171,7 @@ partial class ExpressionFinder { a.Set(214, true); return a; } - case 376: + case 379: { BitArray a = new BitArray(239); a.Set(111, true); @@ -1175,7 +1179,7 @@ partial class ExpressionFinder { a.Set(113, true); return a; } - case 380: + case 383: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1183,63 +1187,63 @@ partial class ExpressionFinder { a.Set(135, true); return a; } - case 381: - case 382: - case 456: - case 457: - return set[69]; + case 384: case 385: - case 386: + case 459: + case 460: + return set[70]; case 388: case 389: - return set[70]; case 391: + case 392: return set[71]; - case 400: + case 394: + return set[72]; + case 403: { BitArray a = new BitArray(239); a.Set(211, true); a.Set(233, true); return a; } - case 402: - case 403: - case 408: - case 409: - return set[72]; - case 404: - case 410: - return set[73]; case 405: - case 413: - case 420: - return set[74]; + case 406: case 411: case 412: - case 418: - case 419: - case 704: - case 705: + return set[73]; + case 407: + case 413: + return set[74]; + case 408: + case 416: + case 423: return set[75]; - case 427: - case 428: + case 414: + case 415: + case 421: + case 422: + case 707: + case 708: return set[76]; case 430: - case 432: - case 433: - case 595: - case 647: + case 431: return set[77]; - case 434: + case 433: case 435: - return set[78]; case 436: + case 598: + case 650: + return set[78]; case 437: - return set[79]; case 438: - return set[80]; + return set[79]; case 439: - case 443: + case 440: + return set[80]; + case 441: + return set[81]; + case 442: + case 446: { BitArray a = new BitArray(239); a.Set(20, true); @@ -1247,87 +1251,87 @@ partial class ExpressionFinder { a.Set(38, true); return a; } - case 446: - case 447: + case 449: + case 450: + case 454: + return set[82]; case 451: - return set[81]; - case 448: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(39, true); return a; } - case 449: - case 450: - return set[82]; case 452: + case 453: + return set[83]; + case 455: { BitArray a = new BitArray(239); a.Set(21, true); return a; } - case 460: - return set[83]; - case 462: - case 475: - return set[84]; case 463: - case 476: - return set[85]; - case 464: + return set[84]; case 465: + case 478: + return set[85]; + case 466: + case 479: + return set[86]; + case 467: + case 468: { BitArray a = new BitArray(239); a.Set(10, true); return a; } - case 470: + case 473: { BitArray a = new BitArray(239); a.Set(12, true); return a; } - case 472: + case 475: { BitArray a = new BitArray(239); a.Set(13, true); return a; } - case 473: - return set[86]; - case 474: + case 476: return set[87]; - case 486: + case 477: return set[88]; - case 495: - case 497: + case 489: return set[89]; + case 498: case 500: - case 501: - case 563: - case 564: - case 692: - case 693: return set[90]; case 503: case 504: - case 505: - case 510: - case 511: case 566: + case 567: case 695: - case 722: - case 731: + case 696: return set[91]; case 506: - case 512: - case 521: - return set[92]; case 507: case 508: case 513: case 514: + case 569: + case 698: + case 725: + case 734: + return set[92]; + case 509: + case 515: + case 524: + return set[93]; + case 510: + case 511: + case 516: + case 517: { BitArray a = new BitArray(239); a.Set(22, true); @@ -1335,18 +1339,18 @@ partial class ExpressionFinder { a.Set(63, true); return a; } - case 515: - case 517: - case 522: - return set[93]; case 518: case 520: + case 525: return set[94]; - case 527: - case 540: - case 541: - case 597: - case 674: + case 521: + case 523: + return set[95]; + case 530: + case 543: + case 544: + case 600: + case 677: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1354,28 +1358,28 @@ partial class ExpressionFinder { a.Set(63, true); return a; } - case 528: - case 529: - case 601: - case 602: - return set[95]; - case 537: - case 538: - case 545: + case 531: + case 532: + case 604: + case 605: + return set[96]; + case 540: + case 541: + case 548: { BitArray a = new BitArray(239); a.Set(115, true); return a; } - case 543: - case 544: - return set[96]; - case 548: - case 549: + case 546: + case 547: return set[97]; - case 550: case 551: - case 610: + case 552: + return set[98]; + case 553: + case 554: + case 613: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1383,15 +1387,15 @@ partial class ExpressionFinder { a.Set(21, true); return a; } - case 555: + case 558: { BitArray a = new BitArray(239); a.Set(103, true); return a; } - case 567: - case 568: - case 580: + case 570: + case 571: + case 583: { BitArray a = new BitArray(239); a.Set(84, true); @@ -1399,84 +1403,84 @@ partial class ExpressionFinder { a.Set(209, true); return a; } - case 573: - case 574: - return set[98]; - case 575: case 576: - return set[99]; case 577: + return set[99]; case 578: - case 589: + case 579: return set[100]; - case 583: - case 584: + case 580: + case 581: + case 592: return set[101]; - case 585: case 586: - case 711: - return set[102]; case 587: - return set[103]; + return set[102]; case 588: - return set[104]; + case 589: + case 714: + return set[103]; case 590: - case 600: + return set[104]; + case 591: + return set[105]; + case 593: + case 603: { BitArray a = new BitArray(239); a.Set(172, true); return a; } - case 606: - case 607: - return set[105]; - case 608: - return set[106]; case 609: - case 640: + case 610: + return set[106]; + case 611: return set[107]; case 612: - case 613: - case 614: - case 631: + case 643: return set[108]; case 615: - case 619: - case 629: + case 616: + case 617: + case 634: + return set[109]; + case 618: + case 622: + case 632: { BitArray a = new BitArray(239); a.Set(128, true); a.Set(198, true); return a; } - case 621: - return set[109]; case 624: return set[110]; - case 625: + case 627: return set[111]; - case 634: - case 635: - case 637: - case 703: - case 706: + case 628: return set[112]; + case 637: case 638: - case 639: + case 640: + case 706: + case 709: return set[113]; + case 641: case 642: - case 644: - case 653: + return set[114]; + case 645: + case 647: + case 656: { BitArray a = new BitArray(239); a.Set(119, true); return a; } - case 643: - return set[114]; - case 645: + case 646: return set[115]; - case 651: + case 648: + return set[116]; + case 654: { BitArray a = new BitArray(239); a.Set(56, true); @@ -1484,11 +1488,11 @@ partial class ExpressionFinder { a.Set(193, true); return a; } - case 655: - case 656: - return set[116]; - case 657: - case 664: + case 658: + case 659: + return set[117]; + case 660: + case 667: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1496,111 +1500,111 @@ partial class ExpressionFinder { a.Set(136, true); return a; } - case 665: + case 668: { BitArray a = new BitArray(239); a.Set(101, true); return a; } - case 666: - return set[117]; case 669: - case 670: + return set[118]; + case 672: + case 673: { BitArray a = new BitArray(239); a.Set(149, true); return a; } - case 671: - case 677: - case 743: + case 674: + case 680: + case 746: { BitArray a = new BitArray(239); a.Set(3, true); return a; } - case 672: - return set[118]; - case 681: - case 682: + case 675: return set[119]; - case 683: - case 691: + case 684: + case 685: return set[120]; - case 687: + case 686: + case 694: return set[121]; - case 696: - case 698: + case 690: return set[122]; case 699: - case 710: - return set[123]; - case 700: case 701: - return set[124]; + return set[123]; case 702: + case 713: + return set[124]; + case 703: + case 704: return set[125]; - case 712: + case 705: + return set[126]; + case 715: { BitArray a = new BitArray(239); a.Set(136, true); return a; } - case 718: + case 721: { BitArray a = new BitArray(239); a.Set(140, true); return a; } - case 721: - case 730: + case 724: + case 733: { BitArray a = new BitArray(239); a.Set(169, true); return a; } - case 735: - return set[126]; - case 736: + case 738: + return set[127]; + case 739: { BitArray a = new BitArray(239); a.Set(160, true); return a; } - case 737: + case 740: { BitArray a = new BitArray(239); a.Set(137, true); return a; } - case 738: - case 739: - return set[127]; - case 744: + case 741: + case 742: + return set[128]; + case 747: { BitArray a = new BitArray(239); a.Set(11, true); return a; } - case 745: - return set[128]; - case 747: + case 748: + return set[129]; + case 750: { BitArray a = new BitArray(239); a.Set(173, true); return a; } - case 748: - return set[129]; - case 749: + case 751: + return set[130]; + case 752: { BitArray a = new BitArray(239); a.Set(67, true); a.Set(213, true); return a; - } - case 750: - return set[130]; + } + case 753: + return set[131]; default: throw new InvalidOperationException(); } } @@ -1614,6 +1618,7 @@ partial class ExpressionFinder { bool wasQualifierTokenAtStart = false; bool nextTokenIsPotentialStartOfExpression = false; bool readXmlIdentifier = false; + bool xmlAllowed = true; bool identifierExpected = false; bool nextTokenIsStartOfImportsOrAccessExpression = false; bool isMissingModifier = false; @@ -1657,7 +1662,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 1; break; } if (la.kind == 173) { stateStack.Push(1); - goto case 747; + goto case 750; } else { goto case 2; } @@ -1666,7 +1671,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 2; break; } if (la.kind == 137) { stateStack.Push(2); - goto case 737; + goto case 740; } else { goto case 3; } @@ -1675,7 +1680,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 3; break; } if (la.kind == 40) { stateStack.Push(3); - goto case 445; + goto case 448; } else { goto case 4; } @@ -1694,7 +1699,7 @@ partial class ExpressionFinder { case 5: { if (la == null) { currentState = 5; break; } if (la.kind == 160) { - currentState = 733; + currentState = 736; break; } else { if (set[4].Get(la.kind)) { @@ -1713,26 +1718,26 @@ partial class ExpressionFinder { if (la == null) { currentState = 7; break; } if (la.kind == 40) { stateStack.Push(7); - goto case 445; + goto case 448; } else { goto case 8; } } case 8: { if (la == null) { currentState = 8; break; } - if (set[131].Get(la.kind)) { + if (set[132].Get(la.kind)) { currentState = 8; break; } else { if (la.kind == 84 || la.kind == 155 || la.kind == 209) { - goto case 567; + goto case 570; } else { if (la.kind == 103) { - currentState = 556; + currentState = 559; break; } else { if (la.kind == 115) { - goto case 537; + goto case 540; } else { if (la.kind == 142) { goto case 9; @@ -1767,7 +1772,7 @@ partial class ExpressionFinder { case 13: { if (la == null) { currentState = 13; break; } if (la.kind == 37) { - currentState = 730; + currentState = 733; break; } else { goto case 14; @@ -1784,7 +1789,7 @@ partial class ExpressionFinder { case 16: { if (la == null) { currentState = 16; break; } if (la.kind == 140) { - currentState = 725; + currentState = 728; break; } else { goto case 17; @@ -1854,7 +1859,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 27; break; } if (la.kind == 40) { stateStack.Push(26); - goto case 445; + goto case 448; } else { isMissingModifier = true; goto case 28; @@ -1862,8 +1867,8 @@ partial class ExpressionFinder { } case 28: { if (la == null) { currentState = 28; break; } - if (set[132].Get(la.kind)) { - currentState = 724; + if (set[133].Get(la.kind)) { + currentState = 727; break; } else { isMissingModifier = false; @@ -1874,15 +1879,15 @@ partial class ExpressionFinder { if (la == null) { currentState = 29; break; } if (la.kind == 84 || la.kind == 155 || la.kind == 209) { stateStack.Push(17); - goto case 567; + goto case 570; } else { if (la.kind == 103) { stateStack.Push(17); - goto case 555; + goto case 558; } else { if (la.kind == 115) { stateStack.Push(17); - goto case 537; + goto case 540; } else { if (la.kind == 142) { stateStack.Push(17); @@ -1903,11 +1908,11 @@ partial class ExpressionFinder { case 30: { if (la == null) { currentState = 30; break; } if (la.kind == 119) { - currentState = 531; + currentState = 534; break; } else { if (la.kind == 186) { - currentState = 524; + currentState = 527; break; } else { if (la.kind == 127 || la.kind == 210) { @@ -1936,7 +1941,7 @@ partial class ExpressionFinder { case 34: { if (la == null) { currentState = 34; break; } if (la.kind == 37) { - currentState = 500; + currentState = 503; break; } else { if (la.kind == 63) { @@ -1966,7 +1971,7 @@ partial class ExpressionFinder { currentState = 38; break; } else { - if (set[133].Get(la.kind)) { + if (set[134].Get(la.kind)) { currentState = 38; break; } else { @@ -2035,7 +2040,7 @@ partial class ExpressionFinder { case 44: { if (la == null) { currentState = 44; break; } if (la.kind == 169) { - currentState = 495; + currentState = 498; break; } else { if (set[22].Get(la.kind)) { @@ -2069,7 +2074,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 48; break; } if (set[23].Get(la.kind)) { activeArgument = 0; - goto case 491; + goto case 494; } else { if (la.kind == 22) { activeArgument = 0; @@ -2389,7 +2394,7 @@ partial class ExpressionFinder { } case 77: { if (la == null) { currentState = 77; break; } - if (set[134].Get(la.kind)) { + if (set[135].Get(la.kind)) { currentState = 76; break; } else { @@ -3752,7 +3757,7 @@ partial class ExpressionFinder { currentState = 165; break; } else { - if (set[135].Get(la.kind)) { + if (set[136].Get(la.kind)) { currentState = 161; break; } else { @@ -3849,39 +3854,39 @@ partial class ExpressionFinder { } case 174: { if (la == null) { currentState = 174; break; } - if (set[136].Get(la.kind)) { + if (set[137].Get(la.kind)) { currentState = 175; break; } else { if (la.kind == 37) { - currentState = 487; + currentState = 490; break; } else { - if (set[137].Get(la.kind)) { + if (set[138].Get(la.kind)) { currentState = 175; break; } else { - if (set[133].Get(la.kind)) { + if (set[134].Get(la.kind)) { currentState = 175; break; } else { - if (set[135].Get(la.kind)) { - currentState = 483; + if (set[136].Get(la.kind)) { + currentState = 486; break; } else { if (la.kind == 129) { - currentState = 480; + currentState = 483; break; } else { if (la.kind == 237) { - currentState = 477; + currentState = 480; break; } else { - if (set[83].Get(la.kind)) { + if (set[84].Get(la.kind)) { stateStack.Push(175); nextTokenIsPotentialStartOfExpression = true; PushContext(Context.Xml, la, t); - goto case 460; + goto case 463; } else { if (la.kind == 127 || la.kind == 210) { stateStack.Push(175); @@ -3962,7 +3967,7 @@ partial class ExpressionFinder { } case 183: { if (la == null) { currentState = 183; break; } - if (set[138].Get(la.kind)) { + if (set[139].Get(la.kind)) { currentState = 189; break; } else { @@ -4154,7 +4159,7 @@ partial class ExpressionFinder { } case 205: { if (la == null) { currentState = 205; break; } - if (set[123].Get(la.kind)) { + if (set[124].Get(la.kind)) { currentState = stateStack.Pop(); break; } else { @@ -4512,7 +4517,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 252; break; } if (la.kind == 210) { stateStack.Push(253); - goto case 454; + goto case 457; } else { if (la.kind == 127) { stateStack.Push(253); @@ -4536,7 +4541,7 @@ partial class ExpressionFinder { } case 255: { stateStack.Push(256); - goto case 426; + goto case 429; } case 256: { nextTokenIsPotentialStartOfExpression = true; @@ -4549,7 +4554,7 @@ partial class ExpressionFinder { } else { if (la.kind == 1 || la.kind == 21 || la.kind == 63) { if (la.kind == 63) { - currentState = 424; + currentState = 427; break; } else { goto case 258; @@ -4589,8 +4594,8 @@ partial class ExpressionFinder { } case 264: { if (la == null) { currentState = 264; break; } - if (set[139].Get(la.kind)) { - if (set[69].Get(la.kind)) { + if (set[140].Get(la.kind)) { + if (set[70].Get(la.kind)) { if (set[50].Get(la.kind)) { stateStack.Push(262); goto case 269; @@ -4646,23 +4651,23 @@ partial class ExpressionFinder { case 270: { if (la == null) { currentState = 270; break; } if (la.kind == 88 || la.kind == 105 || la.kind == 204) { - currentState = 401; + currentState = 404; break; } else { if (la.kind == 211 || la.kind == 233) { - currentState = 397; + currentState = 400; break; } else { if (la.kind == 56 || la.kind == 193) { - currentState = 395; + currentState = 398; break; } else { if (la.kind == 189) { - currentState = 390; + currentState = 393; break; } else { if (la.kind == 135) { - currentState = 372; + currentState = 375; break; } else { if (la.kind == 197) { @@ -4706,7 +4711,7 @@ partial class ExpressionFinder { currentState = 298; break; } else { - if (set[140].Get(la.kind)) { + if (set[141].Get(la.kind)) { if (la.kind == 132) { currentState = 295; break; @@ -4745,7 +4750,7 @@ partial class ExpressionFinder { currentState = 271; break; } else { - if (set[141].Get(la.kind)) { + if (set[142].Get(la.kind)) { if (la.kind == 73) { currentState = 55; break; @@ -5433,6 +5438,7 @@ partial class ExpressionFinder { break; } case 362: { + xmlAllowed = false; nextTokenIsPotentialStartOfExpression = true; goto case 363; } @@ -5443,7 +5449,17 @@ partial class ExpressionFinder { break; } else { if (set[67].Get(la.kind)) { - goto case 365; + if (set[68].Get(la.kind)) { + xmlAllowed = true; + goto case 370; + } else { + if (set[23].Get(la.kind)) { + xmlAllowed = true; + goto case 369; + } else { + goto case 365; + } + } } else { Error(la); goto case 364; @@ -5455,47 +5471,60 @@ partial class ExpressionFinder { goto case 261; } case 365: { - nextTokenIsPotentialStartOfExpression = true; + Error(la); goto case 366; } case 366: { if (la == null) { currentState = 366; break; } - if (set[142].Get(la.kind)) { - if (la.kind == 144) { - currentState = 368; - break; - } else { - goto case 368; - } + if (la.kind == 22) { + currentState = 367; + break; + } else { + goto case 364; + } + } + case 367: { + xmlAllowed = false; + nextTokenIsPotentialStartOfExpression = true; + goto case 368; + } + case 368: { + if (la == null) { currentState = 368; break; } + if (set[68].Get(la.kind)) { + xmlAllowed = true; + goto case 370; } else { if (set[23].Get(la.kind)) { - stateStack.Push(367); - goto case 55; + xmlAllowed = true; + goto case 369; } else { - Error(la); - goto case 367; + goto case 365; } } } - case 367: { - if (la == null) { currentState = 367; break; } - if (la.kind == 22) { - currentState = 365; + case 369: { + stateStack.Push(366); + goto case 55; + } + case 370: { + if (la == null) { currentState = 370; break; } + if (la.kind == 144) { + currentState = 371; break; } else { - goto case 364; + goto case 371; } } - case 368: { - stateStack.Push(369); - goto case 370; + case 371: { + stateStack.Push(372); + goto case 373; } - case 369: { - stateStack.Push(367); + case 372: { + stateStack.Push(366); goto case 75; } - case 370: { - if (la == null) { currentState = 370; break; } + case 373: { + if (la == null) { currentState = 373; break; } if (la.kind == 20) { goto case 73; } else { @@ -5506,7 +5535,7 @@ partial class ExpressionFinder { goto case 71; } else { if (la.kind == 39) { - currentState = 371; + currentState = 374; break; } else { if (la.kind == 42) { @@ -5523,109 +5552,109 @@ partial class ExpressionFinder { } } } - case 371: { + case 374: { wasNormalAttribute = false; currentState = stateStack.Pop(); goto switchlbl; } - case 372: { - stateStack.Push(373); + case 375: { + stateStack.Push(376); goto case 55; } - case 373: { - if (la == null) { currentState = 373; break; } + case 376: { + if (la == null) { currentState = 376; break; } if (la.kind == 214) { - currentState = 381; + currentState = 384; break; } else { - goto case 374; + goto case 377; } } - case 374: { - if (la == null) { currentState = 374; break; } + case 377: { + if (la == null) { currentState = 377; break; } if (la.kind == 1 || la.kind == 21) { - goto case 375; + goto case 378; } else { goto case 6; } } - case 375: { - stateStack.Push(376); + case 378: { + stateStack.Push(379); goto case 261; } - case 376: { - if (la == null) { currentState = 376; break; } + case 379: { + if (la == null) { currentState = 379; break; } if (la.kind == 111 || la.kind == 112) { if (la.kind == 111) { - currentState = 380; + currentState = 383; break; } else { if (la.kind == 112) { - currentState = 378; + currentState = 381; break; } else { Error(la); - goto case 375; + goto case 378; } } } else { Expect(113, la); // "End" - currentState = 377; + currentState = 380; break; } } - case 377: { - if (la == null) { currentState = 377; break; } + case 380: { + if (la == null) { currentState = 380; break; } Expect(135, la); // "If" currentState = stateStack.Pop(); break; } - case 378: { - stateStack.Push(379); + case 381: { + stateStack.Push(382); goto case 55; } - case 379: { - if (la == null) { currentState = 379; break; } + case 382: { + if (la == null) { currentState = 382; break; } if (la.kind == 214) { - currentState = 375; + currentState = 378; break; } else { - goto case 375; + goto case 378; } } - case 380: { - if (la == null) { currentState = 380; break; } + case 383: { + if (la == null) { currentState = 383; break; } if (la.kind == 135) { - currentState = 378; + currentState = 381; break; } else { - goto case 375; + goto case 378; } } - case 381: { + case 384: { nextTokenIsPotentialStartOfExpression = true; - goto case 382; + goto case 385; } - case 382: { - if (la == null) { currentState = 382; break; } + case 385: { + if (la == null) { currentState = 385; break; } if (set[50].Get(la.kind)) { - goto case 383; + goto case 386; } else { - goto case 374; + goto case 377; } } - case 383: { - stateStack.Push(384); + case 386: { + stateStack.Push(387); goto case 269; } - case 384: { - if (la == null) { currentState = 384; break; } + case 387: { + if (la == null) { currentState = 387; break; } if (la.kind == 21) { - currentState = 388; + currentState = 391; break; } else { if (la.kind == 111) { - currentState = 385; + currentState = 388; break; } else { currentState = stateStack.Pop(); @@ -5633,99 +5662,99 @@ partial class ExpressionFinder { } } } - case 385: { + case 388: { nextTokenIsPotentialStartOfExpression = true; - goto case 386; + goto case 389; } - case 386: { - if (la == null) { currentState = 386; break; } + case 389: { + if (la == null) { currentState = 389; break; } if (set[50].Get(la.kind)) { - stateStack.Push(387); + stateStack.Push(390); goto case 269; } else { - goto case 387; + goto case 390; } } - case 387: { - if (la == null) { currentState = 387; break; } + case 390: { + if (la == null) { currentState = 390; break; } if (la.kind == 21) { - currentState = 385; + currentState = 388; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 388: { + case 391: { nextTokenIsPotentialStartOfExpression = true; - goto case 389; + goto case 392; } - case 389: { - if (la == null) { currentState = 389; break; } + case 392: { + if (la == null) { currentState = 392; break; } if (set[50].Get(la.kind)) { - goto case 383; + goto case 386; } else { - goto case 384; + goto case 387; } } - case 390: { - stateStack.Push(391); + case 393: { + stateStack.Push(394); goto case 101; } - case 391: { - if (la == null) { currentState = 391; break; } + case 394: { + if (la == null) { currentState = 394; break; } if (la.kind == 37) { - currentState = 392; + currentState = 395; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 392: { + case 395: { PushContext(Context.Expression, la, t); nextTokenIsPotentialStartOfExpression = true; - goto case 393; + goto case 396; } - case 393: { - if (la == null) { currentState = 393; break; } + case 396: { + if (la == null) { currentState = 396; break; } if (set[21].Get(la.kind)) { - stateStack.Push(394); + stateStack.Push(397); goto case 47; } else { - goto case 394; + goto case 397; } } - case 394: { + case 397: { PopContext(); goto case 46; } - case 395: { - stateStack.Push(396); + case 398: { + stateStack.Push(399); goto case 55; } - case 396: { - if (la == null) { currentState = 396; break; } + case 399: { + if (la == null) { currentState = 399; break; } Expect(22, la); // "," currentState = 55; break; } - case 397: { - stateStack.Push(398); + case 400: { + stateStack.Push(401); goto case 55; } - case 398: { - stateStack.Push(399); + case 401: { + stateStack.Push(402); goto case 261; } - case 399: { - if (la == null) { currentState = 399; break; } + case 402: { + if (la == null) { currentState = 402; break; } Expect(113, la); // "End" - currentState = 400; + currentState = 403; break; } - case 400: { - if (la == null) { currentState = 400; break; } + case 403: { + if (la == null) { currentState = 403; break; } if (la.kind == 233) { goto case 102; } else { @@ -5736,362 +5765,362 @@ partial class ExpressionFinder { } } } - case 401: { + case 404: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(402); + stateStack.Push(405); goto case 205; } - case 402: { + case 405: { PopContext(); - goto case 403; + goto case 406; } - case 403: { - if (la == null) { currentState = 403; break; } + case 406: { + if (la == null) { currentState = 406; break; } if (la.kind == 33) { - currentState = 404; + currentState = 407; break; } else { - goto case 404; + goto case 407; } } - case 404: { - if (la == null) { currentState = 404; break; } + case 407: { + if (la == null) { currentState = 407; break; } if (la.kind == 37) { - currentState = 421; + currentState = 424; break; } else { if (la.kind == 63) { - currentState = 418; + currentState = 421; break; } else { - goto case 405; + goto case 408; } } } - case 405: { - if (la == null) { currentState = 405; break; } + case 408: { + if (la == null) { currentState = 408; break; } if (la.kind == 20) { - currentState = 417; + currentState = 420; break; } else { - goto case 406; + goto case 409; } } - case 406: { - if (la == null) { currentState = 406; break; } + case 409: { + if (la == null) { currentState = 409; break; } if (la.kind == 22) { - currentState = 407; + currentState = 410; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 407: { + case 410: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(408); + stateStack.Push(411); goto case 205; } - case 408: { + case 411: { PopContext(); - goto case 409; + goto case 412; } - case 409: { - if (la == null) { currentState = 409; break; } + case 412: { + if (la == null) { currentState = 412; break; } if (la.kind == 33) { - currentState = 410; + currentState = 413; break; } else { - goto case 410; + goto case 413; } } - case 410: { - if (la == null) { currentState = 410; break; } + case 413: { + if (la == null) { currentState = 413; break; } if (la.kind == 37) { - currentState = 414; + currentState = 417; break; } else { if (la.kind == 63) { - currentState = 411; + currentState = 414; break; } else { - goto case 405; + goto case 408; } } } - case 411: { + case 414: { PushContext(Context.Type, la, t); - goto case 412; + goto case 415; } - case 412: { - if (la == null) { currentState = 412; break; } + case 415: { + if (la == null) { currentState = 415; break; } if (la.kind == 162) { - stateStack.Push(413); + stateStack.Push(416); goto case 85; } else { if (set[16].Get(la.kind)) { - stateStack.Push(413); + stateStack.Push(416); goto case 37; } else { Error(la); - goto case 413; + goto case 416; } } } - case 413: { + case 416: { PopContext(); - goto case 405; + goto case 408; } - case 414: { + case 417: { nextTokenIsPotentialStartOfExpression = true; - goto case 415; + goto case 418; } - case 415: { - if (la == null) { currentState = 415; break; } + case 418: { + if (la == null) { currentState = 418; break; } if (set[23].Get(la.kind)) { - stateStack.Push(416); + stateStack.Push(419); goto case 55; } else { - goto case 416; + goto case 419; } } - case 416: { - if (la == null) { currentState = 416; break; } + case 419: { + if (la == null) { currentState = 419; break; } if (la.kind == 22) { - currentState = 414; + currentState = 417; break; } else { Expect(38, la); // ")" - currentState = 410; + currentState = 413; break; } } - case 417: { - stateStack.Push(406); + case 420: { + stateStack.Push(409); goto case 55; } - case 418: { + case 421: { PushContext(Context.Type, la, t); - goto case 419; + goto case 422; } - case 419: { - if (la == null) { currentState = 419; break; } + case 422: { + if (la == null) { currentState = 422; break; } if (la.kind == 162) { - stateStack.Push(420); + stateStack.Push(423); goto case 85; } else { if (set[16].Get(la.kind)) { - stateStack.Push(420); + stateStack.Push(423); goto case 37; } else { Error(la); - goto case 420; + goto case 423; } } } - case 420: { + case 423: { PopContext(); - goto case 405; + goto case 408; } - case 421: { + case 424: { nextTokenIsPotentialStartOfExpression = true; - goto case 422; + goto case 425; } - case 422: { - if (la == null) { currentState = 422; break; } + case 425: { + if (la == null) { currentState = 425; break; } if (set[23].Get(la.kind)) { - stateStack.Push(423); + stateStack.Push(426); goto case 55; } else { - goto case 423; + goto case 426; } } - case 423: { - if (la == null) { currentState = 423; break; } + case 426: { + if (la == null) { currentState = 426; break; } if (la.kind == 22) { - currentState = 421; + currentState = 424; break; } else { Expect(38, la); // ")" - currentState = 404; + currentState = 407; break; } } - case 424: { + case 427: { PushContext(Context.Type, la, t); - stateStack.Push(425); + stateStack.Push(428); goto case 37; } - case 425: { + case 428: { PopContext(); goto case 258; } - case 426: { - if (la == null) { currentState = 426; break; } + case 429: { + if (la == null) { currentState = 429; break; } Expect(37, la); // "(" - currentState = 427; + currentState = 430; break; } - case 427: { + case 430: { PushContext(Context.Default, la, t); SetIdentifierExpected(la); - goto case 428; + goto case 431; } - case 428: { - if (la == null) { currentState = 428; break; } - if (set[77].Get(la.kind)) { - stateStack.Push(429); - goto case 430; + case 431: { + if (la == null) { currentState = 431; break; } + if (set[78].Get(la.kind)) { + stateStack.Push(432); + goto case 433; } else { - goto case 429; + goto case 432; } } - case 429: { + case 432: { PopContext(); goto case 46; } - case 430: { - stateStack.Push(431); + case 433: { + stateStack.Push(434); PushContext(Context.Parameter, la, t); - goto case 432; + goto case 435; } - case 431: { - if (la == null) { currentState = 431; break; } + case 434: { + if (la == null) { currentState = 434; break; } if (la.kind == 22) { - currentState = 430; + currentState = 433; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 432: { + case 435: { SetIdentifierExpected(la); - goto case 433; + goto case 436; } - case 433: { - if (la == null) { currentState = 433; break; } + case 436: { + if (la == null) { currentState = 436; break; } if (la.kind == 40) { - stateStack.Push(432); - goto case 445; + stateStack.Push(435); + goto case 448; } else { - goto case 434; + goto case 437; } } - case 434: { + case 437: { SetIdentifierExpected(la); - goto case 435; + goto case 438; } - case 435: { - if (la == null) { currentState = 435; break; } + case 438: { + if (la == null) { currentState = 438; break; } if (set[143].Get(la.kind)) { - currentState = 434; + currentState = 437; break; } else { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(436); + stateStack.Push(439); goto case 205; } } - case 436: { + case 439: { PopContext(); - goto case 437; + goto case 440; } - case 437: { - if (la == null) { currentState = 437; break; } + case 440: { + if (la == null) { currentState = 440; break; } if (la.kind == 33) { - currentState = 438; + currentState = 441; break; } else { - goto case 438; + goto case 441; } } - case 438: { - if (la == null) { currentState = 438; break; } + case 441: { + if (la == null) { currentState = 441; break; } if (la.kind == 37) { - currentState = 444; + currentState = 447; break; } else { if (la.kind == 63) { - currentState = 442; + currentState = 445; break; } else { - goto case 439; + goto case 442; } } } - case 439: { - if (la == null) { currentState = 439; break; } + case 442: { + if (la == null) { currentState = 442; break; } if (la.kind == 20) { - currentState = 441; + currentState = 444; break; } else { - goto case 440; + goto case 443; } } - case 440: { + case 443: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 441: { - stateStack.Push(440); + case 444: { + stateStack.Push(443); goto case 55; } - case 442: { + case 445: { PushContext(Context.Type, la, t); - stateStack.Push(443); + stateStack.Push(446); goto case 37; } - case 443: { + case 446: { PopContext(); - goto case 439; + goto case 442; } - case 444: { - if (la == null) { currentState = 444; break; } + case 447: { + if (la == null) { currentState = 447; break; } if (la.kind == 22) { - currentState = 444; + currentState = 447; break; } else { Expect(38, la); // ")" - currentState = 438; + currentState = 441; break; } } - case 445: { - if (la == null) { currentState = 445; break; } + case 448: { + if (la == null) { currentState = 448; break; } Expect(40, la); // "<" - currentState = 446; + currentState = 449; break; } - case 446: { + case 449: { wasNormalAttribute = true; PushContext(Context.Attribute, la, t); - goto case 447; + goto case 450; } - case 447: { - stateStack.Push(448); - goto case 451; + case 450: { + stateStack.Push(451); + goto case 454; } - case 448: { - if (la == null) { currentState = 448; break; } + case 451: { + if (la == null) { currentState = 451; break; } if (la.kind == 22) { - currentState = 447; + currentState = 450; break; } else { Expect(39, la); // ">" - currentState = 449; + currentState = 452; break; } } - case 449: { + case 452: { PopContext(); - goto case 450; + goto case 453; } - case 450: { - if (la == null) { currentState = 450; break; } + case 453: { + if (la == null) { currentState = 453; break; } if (la.kind == 1) { goto case 25; } else { @@ -6099,302 +6128,302 @@ partial class ExpressionFinder { goto switchlbl; } } - case 451: { - if (la == null) { currentState = 451; break; } + case 454: { + if (la == null) { currentState = 454; break; } if (la.kind == 65 || la.kind == 155) { - currentState = 452; + currentState = 455; break; } else { goto case 37; } } - case 452: { - if (la == null) { currentState = 452; break; } + case 455: { + if (la == null) { currentState = 455; break; } Expect(21, la); // ":" - currentState = 453; + currentState = 456; break; } - case 453: { + case 456: { wasNormalAttribute = false; goto case 37; } - case 454: { - if (la == null) { currentState = 454; break; } + case 457: { + if (la == null) { currentState = 457; break; } Expect(210, la); // "Sub" - currentState = 455; + currentState = 458; break; } - case 455: { - stateStack.Push(456); - goto case 426; + case 458: { + stateStack.Push(459); + goto case 429; } - case 456: { + case 459: { nextTokenIsPotentialStartOfExpression = true; - goto case 457; + goto case 460; } - case 457: { - if (la == null) { currentState = 457; break; } + case 460: { + if (la == null) { currentState = 460; break; } if (set[50].Get(la.kind)) { goto case 269; } else { if (la.kind == 1 || la.kind == 21) { - stateStack.Push(458); + stateStack.Push(461); goto case 261; } else { goto case 6; } } } - case 458: { - if (la == null) { currentState = 458; break; } + case 461: { + if (la == null) { currentState = 461; break; } Expect(113, la); // "End" - currentState = 459; + currentState = 462; break; } - case 459: { - if (la == null) { currentState = 459; break; } + case 462: { + if (la == null) { currentState = 462; break; } Expect(210, la); // "Sub" currentState = stateStack.Pop(); break; } - case 460: { - if (la == null) { currentState = 460; break; } + case 463: { + if (la == null) { currentState = 463; break; } if (la.kind == 17 || la.kind == 18 || la.kind == 19) { - currentState = 473; + currentState = 476; break; } else { if (la.kind == 10) { - stateStack.Push(462); - goto case 464; + stateStack.Push(465); + goto case 467; } else { Error(la); - goto case 461; + goto case 464; } } } - case 461: { + case 464: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 462: { - if (la == null) { currentState = 462; break; } + case 465: { + if (la == null) { currentState = 465; break; } if (la.kind == 17) { - currentState = 463; + currentState = 466; break; } else { - goto case 461; + goto case 464; } } - case 463: { - if (la == null) { currentState = 463; break; } + case 466: { + if (la == null) { currentState = 466; break; } if (la.kind == 16) { - currentState = 462; + currentState = 465; break; } else { - goto case 462; + goto case 465; } } - case 464: { + case 467: { PushContext(Context.Xml, la, t); - goto case 465; + goto case 468; } - case 465: { - if (la == null) { currentState = 465; break; } + case 468: { + if (la == null) { currentState = 468; break; } Expect(10, la); // XmlOpenTag - currentState = 466; + currentState = 469; break; } - case 466: { - if (la == null) { currentState = 466; break; } + case 469: { + if (la == null) { currentState = 469; break; } if (set[144].Get(la.kind)) { if (set[145].Get(la.kind)) { - currentState = 466; + currentState = 469; break; } else { if (la.kind == 12) { - stateStack.Push(466); - goto case 470; + stateStack.Push(469); + goto case 473; } else { Error(la); - goto case 466; + goto case 469; } } } else { if (la.kind == 14) { - currentState = 467; + currentState = 470; break; } else { if (la.kind == 11) { - currentState = 468; + currentState = 471; break; } else { Error(la); - goto case 467; + goto case 470; } } } } - case 467: { + case 470: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 468: { - if (la == null) { currentState = 468; break; } + case 471: { + if (la == null) { currentState = 471; break; } if (set[146].Get(la.kind)) { if (set[147].Get(la.kind)) { - currentState = 468; + currentState = 471; break; } else { if (la.kind == 12) { - stateStack.Push(468); - goto case 470; + stateStack.Push(471); + goto case 473; } else { if (la.kind == 10) { - stateStack.Push(468); - goto case 464; + stateStack.Push(471); + goto case 467; } else { Error(la); - goto case 468; + goto case 471; } } } } else { Expect(15, la); // XmlOpenEndTag - currentState = 469; + currentState = 472; break; } } - case 469: { - if (la == null) { currentState = 469; break; } + case 472: { + if (la == null) { currentState = 472; break; } if (set[148].Get(la.kind)) { if (set[149].Get(la.kind)) { - currentState = 469; + currentState = 472; break; } else { if (la.kind == 12) { - stateStack.Push(469); - goto case 470; + stateStack.Push(472); + goto case 473; } else { Error(la); - goto case 469; + goto case 472; } } } else { Expect(11, la); // XmlCloseTag - currentState = 467; + currentState = 470; break; } } - case 470: { - if (la == null) { currentState = 470; break; } + case 473: { + if (la == null) { currentState = 473; break; } Expect(12, la); // XmlStartInlineVB - currentState = 471; + currentState = 474; break; } - case 471: { - stateStack.Push(472); + case 474: { + stateStack.Push(475); goto case 55; } - case 472: { - if (la == null) { currentState = 472; break; } + case 475: { + if (la == null) { currentState = 475; break; } Expect(13, la); // XmlEndInlineVB currentState = stateStack.Pop(); break; } - case 473: { - if (la == null) { currentState = 473; break; } + case 476: { + if (la == null) { currentState = 476; break; } if (la.kind == 16) { - currentState = 474; + currentState = 477; break; } else { - goto case 474; + goto case 477; } } - case 474: { - if (la == null) { currentState = 474; break; } + case 477: { + if (la == null) { currentState = 477; break; } if (la.kind == 17 || la.kind == 19) { - currentState = 473; + currentState = 476; break; } else { if (la.kind == 10) { - stateStack.Push(475); - goto case 464; + stateStack.Push(478); + goto case 467; } else { - goto case 461; + goto case 464; } } } - case 475: { - if (la == null) { currentState = 475; break; } + case 478: { + if (la == null) { currentState = 478; break; } if (la.kind == 17) { - currentState = 476; + currentState = 479; break; } else { - goto case 461; + goto case 464; } } - case 476: { - if (la == null) { currentState = 476; break; } + case 479: { + if (la == null) { currentState = 479; break; } if (la.kind == 16) { - currentState = 475; + currentState = 478; break; } else { - goto case 475; + goto case 478; } } - case 477: { - if (la == null) { currentState = 477; break; } + case 480: { + if (la == null) { currentState = 480; break; } Expect(37, la); // "(" - currentState = 478; + currentState = 481; break; } - case 478: { + case 481: { readXmlIdentifier = true; - stateStack.Push(479); + stateStack.Push(482); goto case 205; } - case 479: { - if (la == null) { currentState = 479; break; } + case 482: { + if (la == null) { currentState = 482; break; } Expect(38, la); // ")" currentState = 175; break; } - case 480: { - if (la == null) { currentState = 480; break; } + case 483: { + if (la == null) { currentState = 483; break; } Expect(37, la); // "(" - currentState = 481; + currentState = 484; break; } - case 481: { + case 484: { PushContext(Context.Type, la, t); - stateStack.Push(482); + stateStack.Push(485); goto case 37; } - case 482: { + case 485: { PopContext(); - goto case 479; + goto case 482; } - case 483: { + case 486: { nextTokenIsStartOfImportsOrAccessExpression = true; wasQualifierTokenAtStart = true; - goto case 484; + goto case 487; } - case 484: { - if (la == null) { currentState = 484; break; } + case 487: { + if (la == null) { currentState = 487; break; } if (la.kind == 10) { - currentState = 485; + currentState = 488; break; } else { - goto case 485; + goto case 488; } } - case 485: { - stateStack.Push(486); + case 488: { + stateStack.Push(489); goto case 101; } - case 486: { - if (la == null) { currentState = 486; break; } + case 489: { + if (la == null) { currentState = 489; break; } if (la.kind == 11) { currentState = 175; break; @@ -6402,235 +6431,235 @@ partial class ExpressionFinder { goto case 175; } } - case 487: { + case 490: { activeArgument = 0; - goto case 488; + goto case 491; } - case 488: { - stateStack.Push(489); + case 491: { + stateStack.Push(492); goto case 55; } - case 489: { - if (la == null) { currentState = 489; break; } + case 492: { + if (la == null) { currentState = 492; break; } if (la.kind == 22) { - currentState = 490; + currentState = 493; break; } else { - goto case 479; + goto case 482; } } - case 490: { + case 493: { activeArgument++; - goto case 488; + goto case 491; } - case 491: { - stateStack.Push(492); + case 494: { + stateStack.Push(495); goto case 55; } - case 492: { - if (la == null) { currentState = 492; break; } + case 495: { + if (la == null) { currentState = 495; break; } if (la.kind == 22) { - currentState = 493; + currentState = 496; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 493: { + case 496: { activeArgument++; nextTokenIsPotentialStartOfExpression = true; - goto case 494; + goto case 497; } - case 494: { - if (la == null) { currentState = 494; break; } + case 497: { + if (la == null) { currentState = 497; break; } if (set[23].Get(la.kind)) { - goto case 491; + goto case 494; } else { - goto case 492; + goto case 495; } } - case 495: { - if (la == null) { currentState = 495; break; } + case 498: { + if (la == null) { currentState = 498; break; } if (set[16].Get(la.kind)) { PushContext(Context.Type, la, t); - stateStack.Push(499); + stateStack.Push(502); goto case 37; } else { - goto case 496; + goto case 499; } } - case 496: { - if (la == null) { currentState = 496; break; } + case 499: { + if (la == null) { currentState = 499; break; } if (la.kind == 22) { - currentState = 497; + currentState = 500; break; } else { goto case 45; } } - case 497: { - if (la == null) { currentState = 497; break; } + case 500: { + if (la == null) { currentState = 500; break; } if (set[16].Get(la.kind)) { PushContext(Context.Type, la, t); - stateStack.Push(498); + stateStack.Push(501); goto case 37; } else { - goto case 496; + goto case 499; } } - case 498: { + case 501: { PopContext(); - goto case 496; + goto case 499; } - case 499: { + case 502: { PopContext(); - goto case 496; + goto case 499; } - case 500: { + case 503: { SetIdentifierExpected(la); - goto case 501; + goto case 504; } - case 501: { - if (la == null) { currentState = 501; break; } + case 504: { + if (la == null) { currentState = 504; break; } if (set[150].Get(la.kind)) { if (la.kind == 169) { - currentState = 503; + currentState = 506; break; } else { - if (set[77].Get(la.kind)) { - stateStack.Push(502); - goto case 430; + if (set[78].Get(la.kind)) { + stateStack.Push(505); + goto case 433; } else { Error(la); - goto case 502; + goto case 505; } } } else { - goto case 502; + goto case 505; } } - case 502: { - if (la == null) { currentState = 502; break; } + case 505: { + if (la == null) { currentState = 505; break; } Expect(38, la); // ")" currentState = 34; break; } - case 503: { - stateStack.Push(502); - goto case 504; + case 506: { + stateStack.Push(505); + goto case 507; } - case 504: { + case 507: { SetIdentifierExpected(la); - goto case 505; + goto case 508; } - case 505: { - if (la == null) { currentState = 505; break; } + case 508: { + if (la == null) { currentState = 508; break; } if (la.kind == 138 || la.kind == 178) { - currentState = 506; + currentState = 509; break; } else { - goto case 506; + goto case 509; } } - case 506: { + case 509: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(507); - goto case 521; + stateStack.Push(510); + goto case 524; } - case 507: { + case 510: { PopContext(); - goto case 508; + goto case 511; } - case 508: { - if (la == null) { currentState = 508; break; } + case 511: { + if (la == null) { currentState = 511; break; } if (la.kind == 63) { - currentState = 522; + currentState = 525; break; } else { - goto case 509; + goto case 512; } } - case 509: { - if (la == null) { currentState = 509; break; } + case 512: { + if (la == null) { currentState = 512; break; } if (la.kind == 22) { - currentState = 510; + currentState = 513; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 510: { + case 513: { SetIdentifierExpected(la); - goto case 511; + goto case 514; } - case 511: { - if (la == null) { currentState = 511; break; } + case 514: { + if (la == null) { currentState = 514; break; } if (la.kind == 138 || la.kind == 178) { - currentState = 512; + currentState = 515; break; } else { - goto case 512; + goto case 515; } } - case 512: { + case 515: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(513); - goto case 521; + stateStack.Push(516); + goto case 524; } - case 513: { + case 516: { PopContext(); - goto case 514; + goto case 517; } - case 514: { - if (la == null) { currentState = 514; break; } + case 517: { + if (la == null) { currentState = 517; break; } if (la.kind == 63) { - currentState = 515; + currentState = 518; break; } else { - goto case 509; + goto case 512; } } - case 515: { + case 518: { PushContext(Context.Type, la, t); - stateStack.Push(516); - goto case 517; + stateStack.Push(519); + goto case 520; } - case 516: { + case 519: { PopContext(); - goto case 509; + goto case 512; } - case 517: { - if (la == null) { currentState = 517; break; } - if (set[94].Get(la.kind)) { - goto case 520; + case 520: { + if (la == null) { currentState = 520; break; } + if (set[95].Get(la.kind)) { + goto case 523; } else { if (la.kind == 35) { - currentState = 518; + currentState = 521; break; } else { goto case 6; } } } - case 518: { - stateStack.Push(519); - goto case 520; + case 521: { + stateStack.Push(522); + goto case 523; } - case 519: { - if (la == null) { currentState = 519; break; } + case 522: { + if (la == null) { currentState = 522; break; } if (la.kind == 22) { - currentState = 518; + currentState = 521; break; } else { goto case 82; } } - case 520: { - if (la == null) { currentState = 520; break; } + case 523: { + if (la == null) { currentState = 523; break; } if (set[16].Get(la.kind)) { currentState = 38; break; @@ -6650,8 +6679,8 @@ partial class ExpressionFinder { } } } - case 521: { - if (la == null) { currentState = 521; break; } + case 524: { + if (la == null) { currentState = 524; break; } if (la.kind == 2) { goto case 145; } else { @@ -6758,515 +6787,515 @@ partial class ExpressionFinder { } } } - case 522: { + case 525: { PushContext(Context.Type, la, t); - stateStack.Push(523); - goto case 517; + stateStack.Push(526); + goto case 520; } - case 523: { + case 526: { PopContext(); - goto case 509; + goto case 512; } - case 524: { + case 527: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(525); + stateStack.Push(528); goto case 205; } - case 525: { + case 528: { PopContext(); - goto case 526; + goto case 529; } - case 526: { - if (la == null) { currentState = 526; break; } + case 529: { + if (la == null) { currentState = 529; break; } if (la.kind == 37) { - stateStack.Push(527); - goto case 426; + stateStack.Push(530); + goto case 429; } else { - goto case 527; + goto case 530; } } - case 527: { - if (la == null) { currentState = 527; break; } + case 530: { + if (la == null) { currentState = 530; break; } if (la.kind == 63) { - currentState = 528; + currentState = 531; break; } else { goto case 23; } } - case 528: { + case 531: { PushContext(Context.Type, la, t); - goto case 529; + goto case 532; } - case 529: { - if (la == null) { currentState = 529; break; } + case 532: { + if (la == null) { currentState = 532; break; } if (la.kind == 40) { - stateStack.Push(529); - goto case 445; + stateStack.Push(532); + goto case 448; } else { - stateStack.Push(530); + stateStack.Push(533); goto case 37; } } - case 530: { + case 533: { PopContext(); goto case 23; } - case 531: { + case 534: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(532); + stateStack.Push(535); goto case 205; } - case 532: { + case 535: { PopContext(); - goto case 533; + goto case 536; } - case 533: { - if (la == null) { currentState = 533; break; } + case 536: { + if (la == null) { currentState = 536; break; } if (la.kind == 37 || la.kind == 63) { if (la.kind == 63) { - currentState = 535; + currentState = 538; break; } else { if (la.kind == 37) { stateStack.Push(23); - goto case 426; + goto case 429; } else { - goto case 534; + goto case 537; } } } else { goto case 23; } } - case 534: { + case 537: { Error(la); goto case 23; } - case 535: { + case 538: { PushContext(Context.Type, la, t); - stateStack.Push(536); + stateStack.Push(539); goto case 37; } - case 536: { + case 539: { PopContext(); goto case 23; } - case 537: { + case 540: { PushContext(Context.TypeDeclaration, la, t); - goto case 538; + goto case 541; } - case 538: { - if (la == null) { currentState = 538; break; } + case 541: { + if (la == null) { currentState = 541; break; } Expect(115, la); // "Enum" - currentState = 539; + currentState = 542; break; } - case 539: { + case 542: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(540); + stateStack.Push(543); goto case 205; } - case 540: { + case 543: { PopContext(); - goto case 541; + goto case 544; } - case 541: { - if (la == null) { currentState = 541; break; } + case 544: { + if (la == null) { currentState = 544; break; } if (la.kind == 63) { - currentState = 553; + currentState = 556; break; } else { - goto case 542; + goto case 545; } } - case 542: { - stateStack.Push(543); + case 545: { + stateStack.Push(546); goto case 23; } - case 543: { + case 546: { SetIdentifierExpected(la); - goto case 544; + goto case 547; } - case 544: { - if (la == null) { currentState = 544; break; } - if (set[97].Get(la.kind)) { - goto case 548; + case 547: { + if (la == null) { currentState = 547; break; } + if (set[98].Get(la.kind)) { + goto case 551; } else { Expect(113, la); // "End" - currentState = 545; + currentState = 548; break; } } - case 545: { - if (la == null) { currentState = 545; break; } + case 548: { + if (la == null) { currentState = 548; break; } Expect(115, la); // "Enum" - currentState = 546; + currentState = 549; break; } - case 546: { - stateStack.Push(547); + case 549: { + stateStack.Push(550); goto case 23; } - case 547: { + case 550: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 548: { + case 551: { SetIdentifierExpected(la); - goto case 549; + goto case 552; } - case 549: { - if (la == null) { currentState = 549; break; } + case 552: { + if (la == null) { currentState = 552; break; } if (la.kind == 40) { - stateStack.Push(548); - goto case 445; + stateStack.Push(551); + goto case 448; } else { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(550); + stateStack.Push(553); goto case 205; } } - case 550: { + case 553: { PopContext(); - goto case 551; + goto case 554; } - case 551: { - if (la == null) { currentState = 551; break; } + case 554: { + if (la == null) { currentState = 554; break; } if (la.kind == 20) { - currentState = 552; + currentState = 555; break; } else { - goto case 542; + goto case 545; } } - case 552: { - stateStack.Push(542); + case 555: { + stateStack.Push(545); goto case 55; } - case 553: { + case 556: { PushContext(Context.Type, la, t); - stateStack.Push(554); + stateStack.Push(557); goto case 37; } - case 554: { + case 557: { PopContext(); - goto case 542; + goto case 545; } - case 555: { - if (la == null) { currentState = 555; break; } + case 558: { + if (la == null) { currentState = 558; break; } Expect(103, la); // "Delegate" - currentState = 556; + currentState = 559; break; } - case 556: { - if (la == null) { currentState = 556; break; } + case 559: { + if (la == null) { currentState = 559; break; } if (la.kind == 210) { - currentState = 557; + currentState = 560; break; } else { if (la.kind == 127) { - currentState = 557; + currentState = 560; break; } else { Error(la); - goto case 557; + goto case 560; } } } - case 557: { + case 560: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - goto case 558; + goto case 561; } - case 558: { - if (la == null) { currentState = 558; break; } - currentState = 559; + case 561: { + if (la == null) { currentState = 561; break; } + currentState = 562; break; } - case 559: { + case 562: { PopContext(); - goto case 560; + goto case 563; } - case 560: { - if (la == null) { currentState = 560; break; } + case 563: { + if (la == null) { currentState = 563; break; } if (la.kind == 37) { - currentState = 563; + currentState = 566; break; } else { if (la.kind == 63) { - currentState = 561; + currentState = 564; break; } else { goto case 23; } } } - case 561: { + case 564: { PushContext(Context.Type, la, t); - stateStack.Push(562); + stateStack.Push(565); goto case 37; } - case 562: { + case 565: { PopContext(); goto case 23; } - case 563: { + case 566: { SetIdentifierExpected(la); - goto case 564; + goto case 567; } - case 564: { - if (la == null) { currentState = 564; break; } + case 567: { + if (la == null) { currentState = 567; break; } if (set[150].Get(la.kind)) { if (la.kind == 169) { - currentState = 566; + currentState = 569; break; } else { - if (set[77].Get(la.kind)) { - stateStack.Push(565); - goto case 430; + if (set[78].Get(la.kind)) { + stateStack.Push(568); + goto case 433; } else { Error(la); - goto case 565; + goto case 568; } } } else { - goto case 565; + goto case 568; } } - case 565: { - if (la == null) { currentState = 565; break; } + case 568: { + if (la == null) { currentState = 568; break; } Expect(38, la); // ")" - currentState = 560; + currentState = 563; break; } - case 566: { - stateStack.Push(565); - goto case 504; + case 569: { + stateStack.Push(568); + goto case 507; } - case 567: { + case 570: { PushContext(Context.TypeDeclaration, la, t); - goto case 568; + goto case 571; } - case 568: { - if (la == null) { currentState = 568; break; } + case 571: { + if (la == null) { currentState = 571; break; } if (la.kind == 155) { - currentState = 569; + currentState = 572; break; } else { if (la.kind == 84) { - currentState = 569; + currentState = 572; break; } else { if (la.kind == 209) { - currentState = 569; + currentState = 572; break; } else { Error(la); - goto case 569; + goto case 572; } } } } - case 569: { + case 572: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(570); + stateStack.Push(573); goto case 205; } - case 570: { + case 573: { PopContext(); - goto case 571; + goto case 574; } - case 571: { - if (la == null) { currentState = 571; break; } + case 574: { + if (la == null) { currentState = 574; break; } if (la.kind == 37) { - currentState = 721; + currentState = 724; break; } else { - goto case 572; + goto case 575; } } - case 572: { - stateStack.Push(573); + case 575: { + stateStack.Push(576); goto case 23; } - case 573: { + case 576: { SetIdentifierExpected(la); isMissingModifier = true; - goto case 574; + goto case 577; } - case 574: { - if (la == null) { currentState = 574; break; } + case 577: { + if (la == null) { currentState = 577; break; } if (la.kind == 140) { isMissingModifier = false; - goto case 718; + goto case 721; } else { - goto case 575; + goto case 578; } } - case 575: { + case 578: { SetIdentifierExpected(la); isMissingModifier = true; - goto case 576; + goto case 579; } - case 576: { - if (la == null) { currentState = 576; break; } + case 579: { + if (la == null) { currentState = 579; break; } if (la.kind == 136) { isMissingModifier = false; - goto case 712; + goto case 715; } else { - goto case 577; + goto case 580; } } - case 577: { + case 580: { SetIdentifierExpected(la); isMissingModifier = true; - goto case 578; + goto case 581; } - case 578: { - if (la == null) { currentState = 578; break; } - if (set[101].Get(la.kind)) { - goto case 583; + case 581: { + if (la == null) { currentState = 581; break; } + if (set[102].Get(la.kind)) { + goto case 586; } else { isMissingModifier = false; - goto case 579; + goto case 582; } } - case 579: { - if (la == null) { currentState = 579; break; } + case 582: { + if (la == null) { currentState = 582; break; } Expect(113, la); // "End" - currentState = 580; + currentState = 583; break; } - case 580: { - if (la == null) { currentState = 580; break; } + case 583: { + if (la == null) { currentState = 583; break; } if (la.kind == 155) { - currentState = 581; + currentState = 584; break; } else { if (la.kind == 84) { - currentState = 581; + currentState = 584; break; } else { if (la.kind == 209) { - currentState = 581; + currentState = 584; break; } else { Error(la); - goto case 581; + goto case 584; } } } } - case 581: { - stateStack.Push(582); + case 584: { + stateStack.Push(585); goto case 23; } - case 582: { + case 585: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 583: { + case 586: { SetIdentifierExpected(la); isMissingModifier = true; - goto case 584; + goto case 587; } - case 584: { - if (la == null) { currentState = 584; break; } + case 587: { + if (la == null) { currentState = 587; break; } if (la.kind == 40) { - stateStack.Push(583); - goto case 445; + stateStack.Push(586); + goto case 448; } else { isMissingModifier = true; - goto case 585; + goto case 588; } } - case 585: { + case 588: { SetIdentifierExpected(la); - goto case 586; + goto case 589; } - case 586: { - if (la == null) { currentState = 586; break; } - if (set[132].Get(la.kind)) { - currentState = 711; + case 589: { + if (la == null) { currentState = 589; break; } + if (set[133].Get(la.kind)) { + currentState = 714; break; } else { isMissingModifier = false; SetIdentifierExpected(la); - goto case 587; + goto case 590; } } - case 587: { - if (la == null) { currentState = 587; break; } + case 590: { + if (la == null) { currentState = 590; break; } if (la.kind == 84 || la.kind == 155 || la.kind == 209) { - stateStack.Push(577); - goto case 567; + stateStack.Push(580); + goto case 570; } else { if (la.kind == 103) { - stateStack.Push(577); - goto case 555; + stateStack.Push(580); + goto case 558; } else { if (la.kind == 115) { - stateStack.Push(577); - goto case 537; + stateStack.Push(580); + goto case 540; } else { if (la.kind == 142) { - stateStack.Push(577); + stateStack.Push(580); goto case 9; } else { - if (set[104].Get(la.kind)) { - stateStack.Push(577); + if (set[105].Get(la.kind)) { + stateStack.Push(580); PushContext(Context.Member, la, t); SetIdentifierExpected(la); - goto case 588; + goto case 591; } else { Error(la); - goto case 577; + goto case 580; } } } } } } - case 588: { - if (la == null) { currentState = 588; break; } - if (set[122].Get(la.kind)) { - stateStack.Push(589); - goto case 696; + case 591: { + if (la == null) { currentState = 591; break; } + if (set[123].Get(la.kind)) { + stateStack.Push(592); + goto case 699; } else { if (la.kind == 127 || la.kind == 210) { - stateStack.Push(589); - goto case 678; + stateStack.Push(592); + goto case 681; } else { if (la.kind == 101) { - stateStack.Push(589); - goto case 665; + stateStack.Push(592); + goto case 668; } else { if (la.kind == 119) { - stateStack.Push(589); - goto case 653; + stateStack.Push(592); + goto case 656; } else { if (la.kind == 98) { - stateStack.Push(589); - goto case 641; + stateStack.Push(592); + goto case 644; } else { if (la.kind == 186) { - stateStack.Push(589); - goto case 604; + stateStack.Push(592); + goto case 607; } else { if (la.kind == 172) { - stateStack.Push(589); - goto case 590; + stateStack.Push(592); + goto case 593; } else { Error(la); - goto case 589; + goto case 592; } } } @@ -7275,716 +7304,716 @@ partial class ExpressionFinder { } } } - case 589: { + case 592: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 590: { - if (la == null) { currentState = 590; break; } + case 593: { + if (la == null) { currentState = 593; break; } Expect(172, la); // "Operator" - currentState = 591; + currentState = 594; break; } - case 591: { + case 594: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - goto case 592; + goto case 595; } - case 592: { - if (la == null) { currentState = 592; break; } - currentState = 593; + case 595: { + if (la == null) { currentState = 595; break; } + currentState = 596; break; } - case 593: { + case 596: { PopContext(); - goto case 594; + goto case 597; } - case 594: { - if (la == null) { currentState = 594; break; } + case 597: { + if (la == null) { currentState = 597; break; } Expect(37, la); // "(" - currentState = 595; + currentState = 598; break; } - case 595: { - stateStack.Push(596); - goto case 430; + case 598: { + stateStack.Push(599); + goto case 433; } - case 596: { - if (la == null) { currentState = 596; break; } + case 599: { + if (la == null) { currentState = 599; break; } Expect(38, la); // ")" - currentState = 597; + currentState = 600; break; } - case 597: { - if (la == null) { currentState = 597; break; } + case 600: { + if (la == null) { currentState = 600; break; } if (la.kind == 63) { - currentState = 601; + currentState = 604; break; } else { - goto case 598; + goto case 601; } } - case 598: { - stateStack.Push(599); + case 601: { + stateStack.Push(602); goto case 261; } - case 599: { - if (la == null) { currentState = 599; break; } + case 602: { + if (la == null) { currentState = 602; break; } Expect(113, la); // "End" - currentState = 600; + currentState = 603; break; } - case 600: { - if (la == null) { currentState = 600; break; } + case 603: { + if (la == null) { currentState = 603; break; } Expect(172, la); // "Operator" currentState = 23; break; } - case 601: { + case 604: { PushContext(Context.Type, la, t); - goto case 602; + goto case 605; } - case 602: { - if (la == null) { currentState = 602; break; } + case 605: { + if (la == null) { currentState = 605; break; } if (la.kind == 40) { - stateStack.Push(602); - goto case 445; + stateStack.Push(605); + goto case 448; } else { - stateStack.Push(603); + stateStack.Push(606); goto case 37; } } - case 603: { + case 606: { PopContext(); - goto case 598; + goto case 601; } - case 604: { - if (la == null) { currentState = 604; break; } + case 607: { + if (la == null) { currentState = 607; break; } Expect(186, la); // "Property" - currentState = 605; + currentState = 608; break; } - case 605: { + case 608: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(606); + stateStack.Push(609); goto case 205; } - case 606: { + case 609: { PopContext(); - goto case 607; + goto case 610; } - case 607: { - if (la == null) { currentState = 607; break; } + case 610: { + if (la == null) { currentState = 610; break; } if (la.kind == 37) { - stateStack.Push(608); - goto case 426; + stateStack.Push(611); + goto case 429; } else { - goto case 608; + goto case 611; } } - case 608: { - if (la == null) { currentState = 608; break; } + case 611: { + if (la == null) { currentState = 611; break; } if (la.kind == 63) { - currentState = 638; + currentState = 641; break; } else { - goto case 609; + goto case 612; } } - case 609: { - if (la == null) { currentState = 609; break; } + case 612: { + if (la == null) { currentState = 612; break; } if (la.kind == 136) { - currentState = 633; + currentState = 636; break; } else { - goto case 610; + goto case 613; } } - case 610: { - if (la == null) { currentState = 610; break; } + case 613: { + if (la == null) { currentState = 613; break; } if (la.kind == 20) { - currentState = 632; + currentState = 635; break; } else { - goto case 611; + goto case 614; } } - case 611: { - stateStack.Push(612); + case 614: { + stateStack.Push(615); goto case 23; } - case 612: { + case 615: { PopContext(); - goto case 613; + goto case 616; } - case 613: { - if (la == null) { currentState = 613; break; } + case 616: { + if (la == null) { currentState = 616; break; } if (la.kind == 40) { - stateStack.Push(613); - goto case 445; + stateStack.Push(616); + goto case 448; } else { - goto case 614; + goto case 617; } } - case 614: { - if (la == null) { currentState = 614; break; } + case 617: { + if (la == null) { currentState = 617; break; } if (set[151].Get(la.kind)) { - currentState = 631; + currentState = 634; break; } else { if (la.kind == 128 || la.kind == 198) { PushContext(Context.Member, la, t); - goto case 615; + goto case 618; } else { currentState = stateStack.Pop(); goto switchlbl; } } } - case 615: { - if (la == null) { currentState = 615; break; } + case 618: { + if (la == null) { currentState = 618; break; } if (la.kind == 128) { - currentState = 616; + currentState = 619; break; } else { if (la.kind == 198) { - currentState = 616; + currentState = 619; break; } else { Error(la); - goto case 616; + goto case 619; } } } - case 616: { - if (la == null) { currentState = 616; break; } + case 619: { + if (la == null) { currentState = 619; break; } if (la.kind == 37) { - stateStack.Push(617); - goto case 426; + stateStack.Push(620); + goto case 429; } else { - goto case 617; + goto case 620; } } - case 617: { - stateStack.Push(618); + case 620: { + stateStack.Push(621); goto case 261; } - case 618: { - if (la == null) { currentState = 618; break; } + case 621: { + if (la == null) { currentState = 621; break; } Expect(113, la); // "End" - currentState = 619; + currentState = 622; break; } - case 619: { - if (la == null) { currentState = 619; break; } + case 622: { + if (la == null) { currentState = 622; break; } if (la.kind == 128) { - currentState = 620; + currentState = 623; break; } else { if (la.kind == 198) { - currentState = 620; + currentState = 623; break; } else { Error(la); - goto case 620; + goto case 623; } } } - case 620: { - stateStack.Push(621); + case 623: { + stateStack.Push(624); goto case 23; } - case 621: { - if (la == null) { currentState = 621; break; } - if (set[110].Get(la.kind)) { - goto case 624; + case 624: { + if (la == null) { currentState = 624; break; } + if (set[111].Get(la.kind)) { + goto case 627; } else { - goto case 622; + goto case 625; } } - case 622: { - if (la == null) { currentState = 622; break; } + case 625: { + if (la == null) { currentState = 625; break; } Expect(113, la); // "End" - currentState = 623; + currentState = 626; break; } - case 623: { - if (la == null) { currentState = 623; break; } + case 626: { + if (la == null) { currentState = 626; break; } Expect(186, la); // "Property" currentState = 23; break; } - case 624: { - if (la == null) { currentState = 624; break; } + case 627: { + if (la == null) { currentState = 627; break; } if (la.kind == 40) { - stateStack.Push(624); - goto case 445; + stateStack.Push(627); + goto case 448; } else { - goto case 625; + goto case 628; } } - case 625: { - if (la == null) { currentState = 625; break; } + case 628: { + if (la == null) { currentState = 628; break; } if (set[151].Get(la.kind)) { - currentState = 625; + currentState = 628; break; } else { if (la.kind == 128) { - currentState = 626; + currentState = 629; break; } else { if (la.kind == 198) { - currentState = 626; + currentState = 629; break; } else { Error(la); - goto case 626; + goto case 629; } } } } - case 626: { - if (la == null) { currentState = 626; break; } + case 629: { + if (la == null) { currentState = 629; break; } if (la.kind == 37) { - stateStack.Push(627); - goto case 426; + stateStack.Push(630); + goto case 429; } else { - goto case 627; + goto case 630; } } - case 627: { - stateStack.Push(628); + case 630: { + stateStack.Push(631); goto case 261; } - case 628: { - if (la == null) { currentState = 628; break; } + case 631: { + if (la == null) { currentState = 631; break; } Expect(113, la); // "End" - currentState = 629; + currentState = 632; break; } - case 629: { - if (la == null) { currentState = 629; break; } + case 632: { + if (la == null) { currentState = 632; break; } if (la.kind == 128) { - currentState = 630; + currentState = 633; break; } else { if (la.kind == 198) { - currentState = 630; + currentState = 633; break; } else { Error(la); - goto case 630; + goto case 633; } } } - case 630: { - stateStack.Push(622); + case 633: { + stateStack.Push(625); goto case 23; } - case 631: { + case 634: { SetIdentifierExpected(la); - goto case 614; + goto case 617; } - case 632: { - stateStack.Push(611); + case 635: { + stateStack.Push(614); goto case 55; } - case 633: { + case 636: { PushContext(Context.Type, la, t); - stateStack.Push(634); + stateStack.Push(637); goto case 37; } - case 634: { + case 637: { PopContext(); - goto case 635; + goto case 638; } - case 635: { - if (la == null) { currentState = 635; break; } + case 638: { + if (la == null) { currentState = 638; break; } if (la.kind == 22) { - currentState = 636; + currentState = 639; break; } else { - goto case 610; + goto case 613; } } - case 636: { + case 639: { PushContext(Context.Type, la, t); - stateStack.Push(637); + stateStack.Push(640); goto case 37; } - case 637: { + case 640: { PopContext(); - goto case 635; + goto case 638; } - case 638: { + case 641: { PushContext(Context.Type, la, t); - goto case 639; + goto case 642; } - case 639: { - if (la == null) { currentState = 639; break; } + case 642: { + if (la == null) { currentState = 642; break; } if (la.kind == 40) { - stateStack.Push(639); - goto case 445; + stateStack.Push(642); + goto case 448; } else { if (la.kind == 162) { - stateStack.Push(640); + stateStack.Push(643); goto case 85; } else { if (set[16].Get(la.kind)) { - stateStack.Push(640); + stateStack.Push(643); goto case 37; } else { Error(la); - goto case 640; + goto case 643; } } } } - case 640: { + case 643: { PopContext(); - goto case 609; + goto case 612; } - case 641: { - if (la == null) { currentState = 641; break; } + case 644: { + if (la == null) { currentState = 644; break; } Expect(98, la); // "Custom" - currentState = 642; + currentState = 645; break; } - case 642: { - stateStack.Push(643); - goto case 653; + case 645: { + stateStack.Push(646); + goto case 656; } - case 643: { - if (la == null) { currentState = 643; break; } - if (set[115].Get(la.kind)) { - goto case 645; + case 646: { + if (la == null) { currentState = 646; break; } + if (set[116].Get(la.kind)) { + goto case 648; } else { Expect(113, la); // "End" - currentState = 644; + currentState = 647; break; } } - case 644: { - if (la == null) { currentState = 644; break; } + case 647: { + if (la == null) { currentState = 647; break; } Expect(119, la); // "Event" currentState = 23; break; } - case 645: { - if (la == null) { currentState = 645; break; } + case 648: { + if (la == null) { currentState = 648; break; } if (la.kind == 40) { - stateStack.Push(645); - goto case 445; + stateStack.Push(648); + goto case 448; } else { if (la.kind == 56) { - currentState = 646; + currentState = 649; break; } else { if (la.kind == 193) { - currentState = 646; + currentState = 649; break; } else { if (la.kind == 189) { - currentState = 646; + currentState = 649; break; } else { Error(la); - goto case 646; + goto case 649; } } } } } - case 646: { - if (la == null) { currentState = 646; break; } + case 649: { + if (la == null) { currentState = 649; break; } Expect(37, la); // "(" - currentState = 647; + currentState = 650; break; } - case 647: { - stateStack.Push(648); - goto case 430; + case 650: { + stateStack.Push(651); + goto case 433; } - case 648: { - if (la == null) { currentState = 648; break; } + case 651: { + if (la == null) { currentState = 651; break; } Expect(38, la); // ")" - currentState = 649; + currentState = 652; break; } - case 649: { - stateStack.Push(650); + case 652: { + stateStack.Push(653); goto case 261; } - case 650: { - if (la == null) { currentState = 650; break; } + case 653: { + if (la == null) { currentState = 653; break; } Expect(113, la); // "End" - currentState = 651; + currentState = 654; break; } - case 651: { - if (la == null) { currentState = 651; break; } + case 654: { + if (la == null) { currentState = 654; break; } if (la.kind == 56) { - currentState = 652; + currentState = 655; break; } else { if (la.kind == 193) { - currentState = 652; + currentState = 655; break; } else { if (la.kind == 189) { - currentState = 652; + currentState = 655; break; } else { Error(la); - goto case 652; + goto case 655; } } } } - case 652: { - stateStack.Push(643); + case 655: { + stateStack.Push(646); goto case 23; } - case 653: { - if (la == null) { currentState = 653; break; } + case 656: { + if (la == null) { currentState = 656; break; } Expect(119, la); // "Event" - currentState = 654; + currentState = 657; break; } - case 654: { + case 657: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(655); + stateStack.Push(658); goto case 205; } - case 655: { + case 658: { PopContext(); - goto case 656; + goto case 659; } - case 656: { - if (la == null) { currentState = 656; break; } + case 659: { + if (la == null) { currentState = 659; break; } if (la.kind == 63) { - currentState = 663; + currentState = 666; break; } else { if (set[152].Get(la.kind)) { if (la.kind == 37) { - stateStack.Push(657); - goto case 426; + stateStack.Push(660); + goto case 429; } else { - goto case 657; + goto case 660; } } else { Error(la); - goto case 657; + goto case 660; } } } - case 657: { - if (la == null) { currentState = 657; break; } + case 660: { + if (la == null) { currentState = 660; break; } if (la.kind == 136) { - currentState = 658; + currentState = 661; break; } else { goto case 23; } } - case 658: { + case 661: { PushContext(Context.Type, la, t); - stateStack.Push(659); + stateStack.Push(662); goto case 37; } - case 659: { + case 662: { PopContext(); - goto case 660; + goto case 663; } - case 660: { - if (la == null) { currentState = 660; break; } + case 663: { + if (la == null) { currentState = 663; break; } if (la.kind == 22) { - currentState = 661; + currentState = 664; break; } else { goto case 23; } } - case 661: { + case 664: { PushContext(Context.Type, la, t); - stateStack.Push(662); + stateStack.Push(665); goto case 37; } - case 662: { + case 665: { PopContext(); - goto case 660; + goto case 663; } - case 663: { + case 666: { PushContext(Context.Type, la, t); - stateStack.Push(664); + stateStack.Push(667); goto case 37; } - case 664: { + case 667: { PopContext(); - goto case 657; + goto case 660; } - case 665: { - if (la == null) { currentState = 665; break; } + case 668: { + if (la == null) { currentState = 668; break; } Expect(101, la); // "Declare" - currentState = 666; + currentState = 669; break; } - case 666: { - if (la == null) { currentState = 666; break; } + case 669: { + if (la == null) { currentState = 669; break; } if (la.kind == 62 || la.kind == 66 || la.kind == 223) { - currentState = 667; + currentState = 670; break; } else { - goto case 667; + goto case 670; } } - case 667: { - if (la == null) { currentState = 667; break; } + case 670: { + if (la == null) { currentState = 670; break; } if (la.kind == 210) { - currentState = 668; + currentState = 671; break; } else { if (la.kind == 127) { - currentState = 668; + currentState = 671; break; } else { Error(la); - goto case 668; + goto case 671; } } } - case 668: { + case 671: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(669); + stateStack.Push(672); goto case 205; } - case 669: { + case 672: { PopContext(); - goto case 670; + goto case 673; } - case 670: { - if (la == null) { currentState = 670; break; } + case 673: { + if (la == null) { currentState = 673; break; } Expect(149, la); // "Lib" - currentState = 671; + currentState = 674; break; } - case 671: { - if (la == null) { currentState = 671; break; } + case 674: { + if (la == null) { currentState = 674; break; } Expect(3, la); // LiteralString - currentState = 672; + currentState = 675; break; } - case 672: { - if (la == null) { currentState = 672; break; } + case 675: { + if (la == null) { currentState = 675; break; } if (la.kind == 59) { - currentState = 677; + currentState = 680; break; } else { - goto case 673; + goto case 676; } - } - case 673: { - if (la == null) { currentState = 673; break; } + } + case 676: { + if (la == null) { currentState = 676; break; } if (la.kind == 37) { - stateStack.Push(674); - goto case 426; + stateStack.Push(677); + goto case 429; } else { - goto case 674; + goto case 677; } } - case 674: { - if (la == null) { currentState = 674; break; } + case 677: { + if (la == null) { currentState = 677; break; } if (la.kind == 63) { - currentState = 675; + currentState = 678; break; } else { goto case 23; } } - case 675: { + case 678: { PushContext(Context.Type, la, t); - stateStack.Push(676); + stateStack.Push(679); goto case 37; } - case 676: { + case 679: { PopContext(); goto case 23; } - case 677: { - if (la == null) { currentState = 677; break; } + case 680: { + if (la == null) { currentState = 680; break; } Expect(3, la); // LiteralString - currentState = 673; + currentState = 676; break; } - case 678: { - if (la == null) { currentState = 678; break; } + case 681: { + if (la == null) { currentState = 681; break; } if (la.kind == 210) { - currentState = 679; + currentState = 682; break; } else { if (la.kind == 127) { - currentState = 679; + currentState = 682; break; } else { Error(la); - goto case 679; + goto case 682; } } } - case 679: { + case 682: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - goto case 680; + goto case 683; } - case 680: { - if (la == null) { currentState = 680; break; } - currentState = 681; + case 683: { + if (la == null) { currentState = 683; break; } + currentState = 684; break; } - case 681: { + case 684: { PopContext(); - goto case 682; + goto case 685; } - case 682: { - if (la == null) { currentState = 682; break; } + case 685: { + if (la == null) { currentState = 685; break; } if (la.kind == 37) { - currentState = 692; + currentState = 695; break; } else { if (la.kind == 63) { - currentState = 690; + currentState = 693; break; } else { - goto case 683; + goto case 686; } } } - case 683: { - if (la == null) { currentState = 683; break; } + case 686: { + if (la == null) { currentState = 686; break; } if (la.kind == 134 || la.kind == 136) { - currentState = 687; + currentState = 690; break; } else { - goto case 684; + goto case 687; } } - case 684: { - stateStack.Push(685); + case 687: { + stateStack.Push(688); goto case 261; } - case 685: { - if (la == null) { currentState = 685; break; } + case 688: { + if (la == null) { currentState = 688; break; } Expect(113, la); // "End" - currentState = 686; + currentState = 689; break; } - case 686: { - if (la == null) { currentState = 686; break; } + case 689: { + if (la == null) { currentState = 689; break; } if (la.kind == 210) { currentState = 23; break; @@ -7993,129 +8022,129 @@ partial class ExpressionFinder { currentState = 23; break; } else { - goto case 534; + goto case 537; } } } - case 687: { - if (la == null) { currentState = 687; break; } + case 690: { + if (la == null) { currentState = 690; break; } if (la.kind == 153 || la.kind == 158 || la.kind == 159) { - currentState = 689; + currentState = 692; break; } else { - goto case 688; + goto case 691; } } - case 688: { - stateStack.Push(684); + case 691: { + stateStack.Push(687); goto case 37; } - case 689: { - if (la == null) { currentState = 689; break; } + case 692: { + if (la == null) { currentState = 692; break; } Expect(26, la); // "." - currentState = 688; + currentState = 691; break; } - case 690: { + case 693: { PushContext(Context.Type, la, t); - stateStack.Push(691); + stateStack.Push(694); goto case 37; } - case 691: { + case 694: { PopContext(); - goto case 683; + goto case 686; } - case 692: { + case 695: { SetIdentifierExpected(la); - goto case 693; + goto case 696; } - case 693: { - if (la == null) { currentState = 693; break; } + case 696: { + if (la == null) { currentState = 696; break; } if (set[150].Get(la.kind)) { if (la.kind == 169) { - currentState = 695; + currentState = 698; break; } else { - if (set[77].Get(la.kind)) { - stateStack.Push(694); - goto case 430; + if (set[78].Get(la.kind)) { + stateStack.Push(697); + goto case 433; } else { Error(la); - goto case 694; + goto case 697; } } } else { - goto case 694; + goto case 697; } } - case 694: { - if (la == null) { currentState = 694; break; } + case 697: { + if (la == null) { currentState = 697; break; } Expect(38, la); // ")" - currentState = 682; + currentState = 685; break; } - case 695: { - stateStack.Push(694); - goto case 504; - } - case 696: { + case 698: { stateStack.Push(697); + goto case 507; + } + case 699: { + stateStack.Push(700); SetIdentifierExpected(la); - goto case 698; + goto case 701; } - case 697: { - if (la == null) { currentState = 697; break; } + case 700: { + if (la == null) { currentState = 700; break; } if (la.kind == 22) { - currentState = 696; + currentState = 699; break; } else { goto case 23; } } - case 698: { - if (la == null) { currentState = 698; break; } + case 701: { + if (la == null) { currentState = 701; break; } if (la.kind == 88) { - currentState = 699; + currentState = 702; break; } else { - goto case 699; + goto case 702; } } - case 699: { + case 702: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(700); - goto case 710; + stateStack.Push(703); + goto case 713; } - case 700: { + case 703: { PopContext(); - goto case 701; + goto case 704; } - case 701: { - if (la == null) { currentState = 701; break; } + case 704: { + if (la == null) { currentState = 704; break; } if (la.kind == 33) { - currentState = 702; + currentState = 705; break; } else { - goto case 702; + goto case 705; } } - case 702: { - if (la == null) { currentState = 702; break; } + case 705: { + if (la == null) { currentState = 705; break; } if (la.kind == 37) { - currentState = 707; + currentState = 710; break; } else { if (la.kind == 63) { - currentState = 704; + currentState = 707; break; } else { - goto case 703; + goto case 706; } } } - case 703: { - if (la == null) { currentState = 703; break; } + case 706: { + if (la == null) { currentState = 706; break; } if (la.kind == 20) { currentState = 55; break; @@ -8124,56 +8153,56 @@ partial class ExpressionFinder { goto switchlbl; } } - case 704: { + case 707: { PushContext(Context.Type, la, t); - goto case 705; + goto case 708; } - case 705: { - if (la == null) { currentState = 705; break; } + case 708: { + if (la == null) { currentState = 708; break; } if (la.kind == 162) { - stateStack.Push(706); + stateStack.Push(709); goto case 85; } else { if (set[16].Get(la.kind)) { - stateStack.Push(706); + stateStack.Push(709); goto case 37; } else { Error(la); - goto case 706; + goto case 709; } } } - case 706: { + case 709: { PopContext(); - goto case 703; + goto case 706; } - case 707: { + case 710: { nextTokenIsPotentialStartOfExpression = true; - goto case 708; + goto case 711; } - case 708: { - if (la == null) { currentState = 708; break; } + case 711: { + if (la == null) { currentState = 711; break; } if (set[23].Get(la.kind)) { - stateStack.Push(709); + stateStack.Push(712); goto case 55; } else { - goto case 709; + goto case 712; } } - case 709: { - if (la == null) { currentState = 709; break; } + case 712: { + if (la == null) { currentState = 712; break; } if (la.kind == 22) { - currentState = 707; + currentState = 710; break; } else { Expect(38, la); // ")" - currentState = 702; + currentState = 705; break; } } - case 710: { - if (la == null) { currentState = 710; break; } - if (set[137].Get(la.kind)) { + case 713: { + if (la == null) { currentState = 713; break; } + if (set[138].Get(la.kind)) { currentState = stateStack.Pop(); break; } else { @@ -8188,249 +8217,249 @@ partial class ExpressionFinder { } } } - case 711: { + case 714: { isMissingModifier = false; - goto case 585; + goto case 588; } - case 712: { - if (la == null) { currentState = 712; break; } + case 715: { + if (la == null) { currentState = 715; break; } Expect(136, la); // "Implements" - currentState = 713; + currentState = 716; break; } - case 713: { + case 716: { PushContext(Context.Type, la, t); - stateStack.Push(714); + stateStack.Push(717); goto case 37; } - case 714: { + case 717: { PopContext(); - goto case 715; + goto case 718; } - case 715: { - if (la == null) { currentState = 715; break; } + case 718: { + if (la == null) { currentState = 718; break; } if (la.kind == 22) { - currentState = 716; + currentState = 719; break; } else { - stateStack.Push(577); + stateStack.Push(580); goto case 23; } } - case 716: { + case 719: { PushContext(Context.Type, la, t); - stateStack.Push(717); + stateStack.Push(720); goto case 37; } - case 717: { + case 720: { PopContext(); - goto case 715; + goto case 718; } - case 718: { - if (la == null) { currentState = 718; break; } + case 721: { + if (la == null) { currentState = 721; break; } Expect(140, la); // "Inherits" - currentState = 719; + currentState = 722; break; } - case 719: { + case 722: { PushContext(Context.Type, la, t); - stateStack.Push(720); + stateStack.Push(723); goto case 37; } - case 720: { + case 723: { PopContext(); - stateStack.Push(575); + stateStack.Push(578); goto case 23; } - case 721: { - if (la == null) { currentState = 721; break; } + case 724: { + if (la == null) { currentState = 724; break; } Expect(169, la); // "Of" - currentState = 722; + currentState = 725; break; } - case 722: { - stateStack.Push(723); - goto case 504; + case 725: { + stateStack.Push(726); + goto case 507; } - case 723: { - if (la == null) { currentState = 723; break; } + case 726: { + if (la == null) { currentState = 726; break; } Expect(38, la); // ")" - currentState = 572; + currentState = 575; break; } - case 724: { + case 727: { isMissingModifier = false; goto case 28; } - case 725: { + case 728: { PushContext(Context.Type, la, t); - stateStack.Push(726); + stateStack.Push(729); goto case 37; } - case 726: { + case 729: { PopContext(); - goto case 727; + goto case 730; } - case 727: { - if (la == null) { currentState = 727; break; } + case 730: { + if (la == null) { currentState = 730; break; } if (la.kind == 22) { - currentState = 728; + currentState = 731; break; } else { stateStack.Push(17); goto case 23; } } - case 728: { + case 731: { PushContext(Context.Type, la, t); - stateStack.Push(729); + stateStack.Push(732); goto case 37; } - case 729: { + case 732: { PopContext(); - goto case 727; + goto case 730; } - case 730: { - if (la == null) { currentState = 730; break; } + case 733: { + if (la == null) { currentState = 733; break; } Expect(169, la); // "Of" - currentState = 731; + currentState = 734; break; } - case 731: { - stateStack.Push(732); - goto case 504; + case 734: { + stateStack.Push(735); + goto case 507; } - case 732: { - if (la == null) { currentState = 732; break; } + case 735: { + if (la == null) { currentState = 735; break; } Expect(38, la); // ")" currentState = 14; break; } - case 733: { + case 736: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - goto case 734; + goto case 737; } - case 734: { - if (la == null) { currentState = 734; break; } + case 737: { + if (la == null) { currentState = 737; break; } if (set[49].Get(la.kind)) { - currentState = 734; + currentState = 737; break; } else { PopContext(); - stateStack.Push(735); + stateStack.Push(738); goto case 23; } } - case 735: { - if (la == null) { currentState = 735; break; } + case 738: { + if (la == null) { currentState = 738; break; } if (set[3].Get(la.kind)) { - stateStack.Push(735); + stateStack.Push(738); goto case 5; } else { Expect(113, la); // "End" - currentState = 736; + currentState = 739; break; } } - case 736: { - if (la == null) { currentState = 736; break; } + case 739: { + if (la == null) { currentState = 739; break; } Expect(160, la); // "Namespace" currentState = 23; break; } - case 737: { - if (la == null) { currentState = 737; break; } + case 740: { + if (la == null) { currentState = 740; break; } Expect(137, la); // "Imports" - currentState = 738; + currentState = 741; break; } - case 738: { + case 741: { PushContext(Context.Importable, la, t); nextTokenIsStartOfImportsOrAccessExpression = true; - goto case 739; + goto case 742; } - case 739: { - if (la == null) { currentState = 739; break; } + case 742: { + if (la == null) { currentState = 742; break; } if (set[153].Get(la.kind)) { - currentState = 745; + currentState = 748; break; } else { if (la.kind == 10) { - currentState = 741; + currentState = 744; break; } else { Error(la); - goto case 740; + goto case 743; } } } - case 740: { + case 743: { PopContext(); goto case 23; } - case 741: { - stateStack.Push(742); + case 744: { + stateStack.Push(745); goto case 205; } - case 742: { - if (la == null) { currentState = 742; break; } + case 745: { + if (la == null) { currentState = 745; break; } Expect(20, la); // "=" - currentState = 743; + currentState = 746; break; } - case 743: { - if (la == null) { currentState = 743; break; } + case 746: { + if (la == null) { currentState = 746; break; } Expect(3, la); // LiteralString - currentState = 744; + currentState = 747; break; } - case 744: { - if (la == null) { currentState = 744; break; } + case 747: { + if (la == null) { currentState = 747; break; } Expect(11, la); // XmlCloseTag - currentState = 740; + currentState = 743; break; } - case 745: { - if (la == null) { currentState = 745; break; } + case 748: { + if (la == null) { currentState = 748; break; } if (la.kind == 33 || la.kind == 37) { - stateStack.Push(745); + stateStack.Push(748); goto case 42; } else { if (la.kind == 20 || la.kind == 26) { - currentState = 746; + currentState = 749; break; } else { - goto case 740; + goto case 743; } } } - case 746: { - stateStack.Push(740); + case 749: { + stateStack.Push(743); goto case 37; } - case 747: { - if (la == null) { currentState = 747; break; } + case 750: { + if (la == null) { currentState = 750; break; } Expect(173, la); // "Option" - currentState = 748; + currentState = 751; break; } - case 748: { - if (la == null) { currentState = 748; break; } + case 751: { + if (la == null) { currentState = 751; break; } if (la.kind == 121 || la.kind == 139 || la.kind == 207) { - currentState = 750; + currentState = 753; break; } else { if (la.kind == 87) { - currentState = 749; + currentState = 752; break; } else { - goto case 534; + goto case 537; } } } - case 749: { - if (la == null) { currentState = 749; break; } + case 752: { + if (la == null) { currentState = 752; break; } if (la.kind == 213) { currentState = 23; break; @@ -8439,12 +8468,12 @@ partial class ExpressionFinder { currentState = 23; break; } else { - goto case 534; + goto case 537; } } } - case 750: { - if (la == null) { currentState = 750; break; } + case 753: { + if (la == null) { currentState = 753; break; } if (la.kind == 170 || la.kind == 171) { currentState = 23; break; @@ -8541,6 +8570,7 @@ partial class ExpressionFinder { new BitArray(new int[] {-66189316, 1174405160, -51383073, -972018405, -1030969182, 17106228, -97186288, 8259}), new BitArray(new int[] {-65140740, 1174409128, -51384097, -971985637, -1030903646, 17106228, -97186288, 8259}), new BitArray(new int[] {-65140740, 1174409128, -51384097, -972018405, -1030903646, 17106228, -97186288, 8259}), + new BitArray(new int[] {1048576, 3968, 0, 0, 65536, 0, 0, 0}), new BitArray(new int[] {1048576, 3968, 0, 0, 0, 0, 0, 0}), new BitArray(new int[] {-64092162, 1191182376, -1051937, -680509669, -1030969166, -1593504460, -21144002, 8903}), new BitArray(new int[] {-64092162, 1191182376, -1051937, -680476901, -1030969166, -1593504460, -21144002, 8903}), @@ -8615,7 +8645,6 @@ partial class ExpressionFinder { new BitArray(new int[] {-64092162, 1191182376, -1051937, -680378597, -1030969166, -1593504460, -21144002, 8903}), new BitArray(new int[] {0, 0, 33554432, 16777216, 16, 0, 16392, 0}), new BitArray(new int[] {-66189316, 1174405160, -51383585, -972018405, -1030969182, 17106228, -97186288, 8259}), - new BitArray(new int[] {1048576, 3968, 0, 0, 65536, 0, 0, 0}), new BitArray(new int[] {0, 0, 288, 0, 0, 4210688, 0, 0}), new BitArray(new int[] {-18434, -1, -1, -1, -1, -1, -1, -1}), new BitArray(new int[] {-22530, -1, -1, -1, -1, -1, -1, -1}), diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/PushParser.frame b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/PushParser.frame index 1bf369d5ea..73427172fc 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/PushParser.frame +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/PushParser.frame @@ -37,6 +37,7 @@ partial class ExpressionFinder { bool wasQualifierTokenAtStart = false; bool nextTokenIsPotentialStartOfExpression = false; bool readXmlIdentifier = false; + bool xmlAllowed = true; bool identifierExpected = false; bool nextTokenIsStartOfImportsOrAccessExpression = false; bool isMissingModifier = false; diff --git a/src/Libraries/NRefactory/Test/Parser/Statements/SwitchStatementTests.cs b/src/Libraries/NRefactory/Test/Parser/Statements/SwitchStatementTests.cs index 73de1122ee..997fbaaa5f 100644 --- a/src/Libraries/NRefactory/Test/Parser/Statements/SwitchStatementTests.cs +++ b/src/Libraries/NRefactory/Test/Parser/Statements/SwitchStatementTests.cs @@ -39,6 +39,20 @@ namespace ICSharpCode.NRefactory.Tests.Ast SwitchSection sec = switchStmt.SwitchSections[0]; Assert.AreEqual(0, sec.SwitchLabels.Count); } + + [Test] + public void SpecialCaseStatement() + { + SwitchStatement stmt = ParseUtilVBNet.ParseStatement("Select Case a\nCase < 50\nCase > 20, < 10\nEnd Select"); + Assert.AreEqual("a", ((IdentifierExpression)stmt.SwitchExpression).Identifier); + } + + [Test] + public void SpecialCaseStatement2() + { + SwitchStatement stmt = ParseUtilVBNet.ParseStatement("Select Case a\nCase < 50\nEnd Select"); + Assert.AreEqual("a", ((IdentifierExpression)stmt.SwitchExpression).Identifier); + } #endregion } } From e4a3f111799a7222552ba8e4692ebad790b66d7d Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 21 May 2012 20:02:26 +0200 Subject: [PATCH 15/22] fix Indentation incorrect in function - http://community.sharpdevelop.net/forums/p/13803/41447.aspx#41447 --- .../VBNetFormattingStrategy.cs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs index 5fa9e46fec..630eb36816 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs @@ -832,22 +832,14 @@ namespace ICSharpCode.VBNetBinding internal static bool IsBlockEnd(Token current, Token prev) { - if (current.Kind == Tokens.Next) { - if (prev.Kind == Tokens.Resume) - return false; - else - return true; - } + if (current.Kind == Tokens.Next) + return prev.Kind == Tokens.EOL; if (current.Kind == Tokens.Loop) - return true; + return prev.Kind == Tokens.EOL; - if (blockTokens.Contains(current.Kind)) { - if (prev.Kind == Tokens.End) - return true; - else - return false; - } + if (blockTokens.Contains(current.Kind)) + return prev.Kind == Tokens.End; return IsSpecialCase(current, prev); } From 7672cab7054a9bbbd7582c7483bff097dc8a18b6 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 21 May 2012 20:17:03 +0200 Subject: [PATCH 16/22] fix build --- .../NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Libraries/NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs b/src/Libraries/NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs index 287cb12990..e4ff7815fd 100644 --- a/src/Libraries/NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs +++ b/src/Libraries/NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs @@ -783,7 +783,7 @@ End If"; public void SelectStatement() { string statement = @"Select Case - Case , + Case < 1, () Case Else End Select"; @@ -792,8 +792,8 @@ End Select"; CheckHead(lexer); CheckTokens(lexer, Tokens.Select, Tokens.Case, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL, - Tokens.Case, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.Comma, - Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL, + Tokens.Case, Tokens.LessThan, Tokens.LiteralInteger, Tokens.Comma, Tokens.OpenParenthesis, + Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.CloseParenthesis, Tokens.EOL, Tokens.Case, Tokens.Else, Tokens.EOL, Tokens.End, Tokens.Select ); From fde27ea60ab61286bf25b97ef085bfda857e6092 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 22 May 2012 18:15:12 +0200 Subject: [PATCH 17/22] add some more unit tests for VB indentation and add colon as statement terminator --- .../VBNetFormattingStrategy.cs | 4 +- .../FormattingStrategy/IndentationTests.cs | 48 +++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs index 630eb36816..3cf7d13709 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs @@ -833,10 +833,10 @@ namespace ICSharpCode.VBNetBinding internal static bool IsBlockEnd(Token current, Token prev) { if (current.Kind == Tokens.Next) - return prev.Kind == Tokens.EOL; + return prev.Kind == Tokens.EOL || prev.Kind == Tokens.Colon; if (current.Kind == Tokens.Loop) - return prev.Kind == Tokens.EOL; + return prev.Kind == Tokens.EOL || prev.Kind == Tokens.Colon; if (blockTokens.Contains(current.Kind)) return prev.Kind == Tokens.End; diff --git a/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs b/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs index 9bf3974b77..da07315820 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs @@ -524,6 +524,54 @@ End Module"; RunFormatTest(code, expected); } + [Test] + public void ForNextOneLine() + { + string expected = @"Module Core + Sub Main + Dim a = 1 + For i = 0 To 10 : Console.WriteLine(i) : Next + Dim b = 2 + End Sub +End Module"; + + string code = @"Module Core +Sub Main +Dim a = 1 +For i = 0 To 10 : Console.WriteLine(i) : Next +Dim b = 2 +End Sub +End Module"; + + RunFormatTest(code, expected); + } + + [Test] + public void RandomNext() + { + string expected = @"Module Core + Public Function GetRandomNumber( _ + Optional ByVal Low As Integer = 1, _ + Optional ByVal High As Integer = 100) As Integer + ' Returns a random number, + ' between the optional Low and High parameters + Return objRandom.Next(Low, High + 1) + End Function +End Module"; + + string code = @"Module Core +Public Function GetRandomNumber( _ +Optional ByVal Low As Integer = 1, _ +Optional ByVal High As Integer = 100) As Integer +' Returns a random number, +' between the optional Low and High parameters +Return objRandom.Next(Low, High + 1) +End Function +End Module"; + + RunFormatTest(code, expected); + } + void RunFormatTest(string code, string expectedCode) { AvalonEditTextEditorAdapter editor = new AvalonEditTextEditorAdapter(new TextEditor()); From 90871ca3e73319ff1c318bb570f777db119490e7 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Mon, 28 May 2012 11:37:30 +0200 Subject: [PATCH 18/22] Revert aca4119 (r5998) to fix forum-14354: Rename fails if filename in Project Explorer is too long for the treeview viewport --- .../Gui/Components/ExtTreeView/ExtTreeView.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Main/Base/Project/Src/Gui/Components/ExtTreeView/ExtTreeView.cs b/src/Main/Base/Project/Src/Gui/Components/ExtTreeView/ExtTreeView.cs index e3951cdb8e..99c2d8ea6a 100644 --- a/src/Main/Base/Project/Src/Gui/Components/ExtTreeView/ExtTreeView.cs +++ b/src/Main/Base/Project/Src/Gui/Components/ExtTreeView/ExtTreeView.cs @@ -132,7 +132,7 @@ namespace ICSharpCode.SharpDevelop.Gui #region label editing - string labelEditOldLabel; + //string labelEditOldLabel; public void StartLabelEdit(ExtTreeNode node) { @@ -146,10 +146,12 @@ namespace ICSharpCode.SharpDevelop.Gui LabelEdit = true; node.BeforeLabelEdit(); node.BeginEdit(); - // remove node's label so that it doesn't get rendered behind the label editing textbox - // (if the user deletes some characters so that the text box shrinks) - labelEditOldLabel = node.Text; - node.Text = ""; + // Workaround disabled due to http://community.sharpdevelop.net/forums/t/14354.aspx + // "Rename fails if filename in Project Explorer is too long for the treeview viewport" + //// remove node's label so that it doesn't get rendered behind the label editing textbox + //// (if the user deletes some characters so that the text box shrinks) + //labelEditOldLabel = node.Text; + //node.Text = ""; } } @@ -176,8 +178,8 @@ namespace ICSharpCode.SharpDevelop.Gui ExtTreeNode node = e.Node as ExtTreeNode; if (node != null) { - node.Text = labelEditOldLabel; - labelEditOldLabel = null; + //node.Text = labelEditOldLabel; + //labelEditOldLabel = null; if (e.Label != null) { node.AfterLabelEdit(e.Label); } From e98d78f6dffd3a19cd4d0d86e92b159f81fd5d22 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Tue, 29 May 2012 20:24:24 +0100 Subject: [PATCH 19/22] Fix null reference when using Show Service in Browser when service address not found in app.config. --- .../Commands/ReferenceFolderNodeCommands.cs | 87 +++++++++++-------- 1 file changed, 51 insertions(+), 36 deletions(-) diff --git a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/ReferenceFolderNodeCommands.cs b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/ReferenceFolderNodeCommands.cs index ea770cddbe..b9f930e7a6 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/ReferenceFolderNodeCommands.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/ReferenceFolderNodeCommands.cs @@ -3,6 +3,7 @@ using System; using System.Diagnostics; +using System.IO; using System.Net; using System.Web.Services.Discovery; using System.Windows.Forms; @@ -178,54 +179,70 @@ namespace ICSharpCode.SharpDevelop.Project.Commands } return webReferencesNode; } - } - + } - public class ShowServiceInBrowser: AbstractMenuCommand + public class ShowServiceInBrowser : AbstractMenuCommand { - private static string NodePath = "//system.serviceModel//client//endpoint"; + static string NodePath = "//system.serviceModel//client//endpoint"; public override void Run() { - // hack try url fvoid = LoadConfigDocument(f); + XmlDocument appConfig = LoadAppConfig(); + if (appConfig != null) { + string endpointAddress = FindEndPointAddress(appConfig); + if (endpointAddress != null) { + StartInternetExplorer(endpointAddress); + } else { + MessageService.ShowError("No service found."); + } + } else { + MessageService.ShowError("No app.config file found."); + } + } + + XmlDocument LoadAppConfig() + { AbstractProjectBrowserTreeNode node = ProjectBrowserPad.Instance.SelectedNode; - var f = CompilableProject.GetAppConfigFile(node.Project,false); - if (!String.IsNullOrEmpty(f)) - { - - var configFile = LoadConfigDocument(f); - var endPoint = configFile.SelectSingleNode(NodePath).Attributes["address"].Value; - ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe"); - startInfo.WindowStyle = ProcessWindowStyle.Normal; - startInfo.Arguments = endPoint; - - Process.Start(startInfo); - - - - } else - { - MessageService.ShowError("No app.config File found"); + FileName appConfigFileName = CompilableProject.GetAppConfigFile(node.Project, false); + if (!String.IsNullOrEmpty(appConfigFileName)) { + return LoadAppConfig(appConfigFileName); } + return null; } - static XmlDocument LoadConfigDocument(string fileName) + static XmlDocument LoadAppConfig(string fileName) { - XmlDocument doc = null; - try - { - doc = new XmlDocument(); - + try { + var doc = new XmlDocument(); doc.Load(fileName); return doc; + } catch (FileNotFoundException ex) { + LoggingService.Debug("LoadConfigDocument: " + fileName + ": " + ex.Message); } - catch (System.IO.FileNotFoundException e) - { - throw new Exception("No configuration file found.", e); + return null; + } + + string FindEndPointAddress(XmlDocument appConfig) + { + XmlNode endPoint = appConfig.SelectSingleNode(NodePath); + if (endPoint != null) { + XmlAttribute addressAttribute = endPoint.Attributes["address"]; + if (addressAttribute != null) { + return addressAttribute.Value; + } } + return null; + } + + void StartInternetExplorer(string arguments) + { + var startInfo = new ProcessStartInfo("IExplore.exe") { + WindowStyle = ProcessWindowStyle.Normal, + Arguments = arguments + }; + Process.Start(startInfo); } } - public class AddServiceReferenceToProject : AbstractMenuCommand { @@ -247,14 +264,12 @@ namespace ICSharpCode.SharpDevelop.Project.Commands } } - public class RefreshReference : AbstractMenuCommand { public override void Run() { - ReferenceNode node = Owner as ReferenceNode; - if (node != null) - { + var node = Owner as ReferenceNode; + if (node != null) { ReferenceProjectItem item = node.ReferenceProjectItem; if (item != null) { AssemblyParserService.RefreshProjectContentForReference(item); From 0596de0f0f7fb3ba5d9a774814ab66d5a77883d2 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 4 Jun 2012 23:16:35 +0200 Subject: [PATCH 20/22] implement type-lookup cache to improve performance of Forms Designer - http://community.sharpdevelop.net/forums/t/15914.aspx --- .../Project/Src/DesignerViewContent.cs | 3 ++ .../Src/Services/TypeResolutionService.cs | 39 ++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs index 29ea7692cc..d4218544ce 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs @@ -159,6 +159,9 @@ namespace ICSharpCode.FormsDesigner { LoggingService.Debug("Forms designer: Load " + file.FileName + "; inMasterLoadOperation=" + this.inMasterLoadOperation); + if (this.typeResolutionService != null) + this.typeResolutionService.ClearCaches(); + if (inMasterLoadOperation) { if (this.sourceCodeStorage.ContainsFile(file)) { diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs index 3b484f99e6..837e3757f0 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs @@ -361,6 +361,19 @@ namespace ICSharpCode.FormsDesigner.Services return GetType(name, throwOnError, false); } + #if DEBUG + int count = 0; + #endif + + Dictionary typeCache = new Dictionary(StringComparer.Ordinal); + Dictionary typeCacheIgnoreCase = new Dictionary(StringComparer.OrdinalIgnoreCase); + + public void ClearCaches() + { + typeCacheIgnoreCase.Clear(); + typeCache.Clear(); + } + public Type GetType(string name, bool throwOnError, bool ignoreCase) { if (name == null || name.Length == 0) { @@ -369,9 +382,19 @@ namespace ICSharpCode.FormsDesigner.Services if (IgnoreType(name)) { return null; } + if (ignoreCase) { + Type cachedType; + if (typeCacheIgnoreCase.TryGetValue(name, out cachedType)) + return cachedType; + } else { + Type cachedType; + if (typeCache.TryGetValue(name, out cachedType)) + return cachedType; + } #if DEBUG if (!name.StartsWith("System.")) { - LoggingService.Debug("TypeResolutionService: Looking for " + name); + count++; + LoggingService.Debug(count + " TypeResolutionService: Looking for " + name); } #endif try { @@ -436,6 +459,7 @@ namespace ICSharpCode.FormsDesigner.Services try { Type t = asm.GetType(name, false); if (t != null) { + AddToCache(name, t, ignoreCase); return t; } } catch (FileNotFoundException) { @@ -449,7 +473,7 @@ namespace ICSharpCode.FormsDesigner.Services if (throwOnError && type == null) throw new TypeLoadException(name + " not found by TypeResolutionService"); - + AddToCache(name, type, ignoreCase); return type; } catch (Exception e) { LoggingService.Error(e); @@ -457,6 +481,17 @@ namespace ICSharpCode.FormsDesigner.Services return null; } + void AddToCache(string name, Type type, bool ignoreCase) + { + if (type == null) + return; + if (ignoreCase) { + typeCacheIgnoreCase.Add(name, type); + } else { + typeCache.Add(name, type); + } + } + public void ReferenceAssembly(AssemblyName name) { ICSharpCode.Core.LoggingService.Warn("TODO: Add Assembly reference : " + name); From 8a45f2e79eef40499b33a9ef730be285a7274eec Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 5 Jun 2012 19:25:15 +0200 Subject: [PATCH 21/22] Update ICSharpCode.Decompiler to ILSpy 2.1 --- .../ICSharpCode.Decompiler/Ast/AstBuilder.cs | 16 + .../Ast/AstMethodBodyBuilder.cs | 6 +- .../Ast/DecompilerContext.cs | 1 + .../Ast/TextOutputFormatter.cs | 8 +- .../Ast/Transforms/DelegateConstruction.cs | 1 + .../DecompilerSettings.cs | 15 + .../ICSharpCode.Decompiler.csproj | 3 + .../ILAst/AsyncDecompiler.cs | 653 ++++++++++++++++++ .../ILAst/ILAstOptimizer.cs | 15 +- .../ICSharpCode.Decompiler/ILAst/ILCodes.cs | 6 +- .../ILAst/PatternMatching.cs | 12 + .../ILAst/StateRange.cs | 310 +++++++++ .../ILAst/SymbolicExecution.cs | 148 ++++ .../ILAst/TypeAnalysis.cs | 21 +- .../ILAst/YieldReturnDecompiler.cs | 418 ++--------- .../Properties/AssemblyInfo.cs | 4 +- .../ICSharpCode.Decompiler/Tests/Async.cs | 144 ++++ .../Tests/ICSharpCode.Decompiler.Tests.csproj | 4 +- .../Tests/PropertiesAndEvents.cs | 2 +- .../Tests/TestRunner.cs | 6 + 20 files changed, 1409 insertions(+), 384 deletions(-) create mode 100644 src/Libraries/ICSharpCode.Decompiler/ILAst/AsyncDecompiler.cs create mode 100644 src/Libraries/ICSharpCode.Decompiler/ILAst/StateRange.cs create mode 100644 src/Libraries/ICSharpCode.Decompiler/ILAst/SymbolicExecution.cs create mode 100644 src/Libraries/ICSharpCode.Decompiler/Tests/Async.cs diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/AstBuilder.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/AstBuilder.cs index fc288d80fd..a95ddbaf2d 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Ast/AstBuilder.cs +++ b/src/Libraries/ICSharpCode.Decompiler/Ast/AstBuilder.cs @@ -81,6 +81,8 @@ namespace ICSharpCode.Decompiler.Ast return true; if (settings.YieldReturn && YieldReturnDecompiler.IsCompilerGeneratorEnumerator(type)) return true; + if (settings.AsyncAwait && AsyncDecompiler.IsCompilerGeneratedStateMachine(type)) + return true; } else if (type.IsCompilerGenerated()) { if (type.Name.StartsWith("", StringComparison.Ordinal)) return true; @@ -770,6 +772,10 @@ namespace ICSharpCode.Decompiler.Ast SetNewModifier(astMethod); } astMethod.Body = CreateMethodBody(methodDef, astMethod.Parameters); + if (context.CurrentMethodIsAsync) { + astMethod.Modifiers |= Modifiers.Async; + context.CurrentMethodIsAsync = false; + } } ConvertAttributes(astMethod, methodDef); if (methodDef.HasCustomAttributes && astMethod.Parameters.Count > 0) { @@ -1342,6 +1348,7 @@ namespace ICSharpCode.Decompiler.Ast static void ConvertCustomAttributes(AstNode attributedNode, ICustomAttributeProvider customAttributeProvider, string attributeTarget = null) { + EntityDeclaration entityDecl = attributedNode as EntityDeclaration; if (customAttributeProvider.HasCustomAttributes) { var attributes = new List(); foreach (var customAttribute in customAttributeProvider.CustomAttributes.OrderBy(a => a.AttributeType.FullName)) { @@ -1353,6 +1360,15 @@ namespace ICSharpCode.Decompiler.Ast // don't show the ParamArrayAttribute (it's converted to the 'params' modifier) continue; } + // if the method is async, remove [DebuggerStepThrough] and [Async + if (entityDecl != null && entityDecl.HasModifier(Modifiers.Async)) { + if (customAttribute.AttributeType.Name == "DebuggerStepThroughAttribute" && customAttribute.AttributeType.Namespace == "System.Diagnostics") { + continue; + } + if (customAttribute.AttributeType.Name == "AsyncStateMachineAttribute" && customAttribute.AttributeType.Namespace == "System.Runtime.CompilerServices") { + continue; + } + } var attribute = new ICSharpCode.NRefactory.CSharp.Attribute(); attribute.AddAnnotation(customAttribute); diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs index 5de5b0ba5a..8ad9047c1c 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs +++ b/src/Libraries/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs @@ -58,6 +58,7 @@ namespace ICSharpCode.Decompiler.Ast MethodDefinition oldCurrentMethod = context.CurrentMethod; Debug.Assert(oldCurrentMethod == null || oldCurrentMethod == methodDef); context.CurrentMethod = methodDef; + context.CurrentMethodIsAsync = false; try { AstMethodBodyBuilder builder = new AstMethodBodyBuilder(); builder.methodDef = methodDef; @@ -847,8 +848,11 @@ namespace ICSharpCode.Decompiler.Ast case ILCode.ExpressionTreeParameterDeclarations: args[args.Count - 1].AddAnnotation(new ParameterDeclarationAnnotation(byteCode)); return args[args.Count - 1]; + case ILCode.Await: + return new UnaryOperatorExpression(UnaryOperatorType.Await, arg1); case ILCode.NullableOf: - case ILCode.ValueOf: return arg1; + case ILCode.ValueOf: + return arg1; default: throw new Exception("Unknown OpCode: " + byteCode.Code); } diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/DecompilerContext.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/DecompilerContext.cs index 4a3f277827..624b1b33fd 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Ast/DecompilerContext.cs +++ b/src/Libraries/ICSharpCode.Decompiler/Ast/DecompilerContext.cs @@ -33,6 +33,7 @@ namespace ICSharpCode.Decompiler public TypeDefinition CurrentType; public MethodDefinition CurrentMethod; public DecompilerSettings Settings = new DecompilerSettings(); + public bool CurrentMethodIsAsync; // public ITypeResolveContext TypeResolveContext; // public IProjectContent ProjectContent; diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs index 85fef513ee..b17e24656f 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs +++ b/src/Libraries/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs @@ -114,6 +114,9 @@ namespace ICSharpCode.Decompiler.Ast object GetCurrentLocalDefinition() { AstNode node = nodeStack.Peek(); + if (node is Identifier && node.Parent != null) + node = node.Parent; + var parameterDef = node.Annotation(); if (parameterDef != null) return parameterDef; @@ -126,14 +129,11 @@ namespace ICSharpCode.Decompiler.Ast //if (variable.OriginalVariable != null) // return variable.OriginalVariable; return variable; - } else { - } } var label = node as LabelStatement; - if (label != null) - { + if (label != null) { var method = nodeStack.Select(nd => nd.Annotation()).FirstOrDefault(mr => mr != null); if (method != null) return method.ToString() + label.Label; diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs index 9264000f08..9c5aa97f6e 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs +++ b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs @@ -151,6 +151,7 @@ namespace ICSharpCode.Decompiler.Ast.Transforms DecompilerContext subContext = context.Clone(); subContext.CurrentMethod = method; + subContext.CurrentMethodIsAsync = false; subContext.ReservedVariableNames.AddRange(currentlyUsedVariableNames); BlockStatement body = AstMethodBodyBuilder.CreateMethodBody(method, subContext, ame.Parameters); TransformationPipeline.RunTransformationsUntil(body, v => v is DelegateConstruction, subContext); diff --git a/src/Libraries/ICSharpCode.Decompiler/DecompilerSettings.cs b/src/Libraries/ICSharpCode.Decompiler/DecompilerSettings.cs index 435124491c..f78194a6f9 100644 --- a/src/Libraries/ICSharpCode.Decompiler/DecompilerSettings.cs +++ b/src/Libraries/ICSharpCode.Decompiler/DecompilerSettings.cs @@ -72,6 +72,21 @@ namespace ICSharpCode.Decompiler } } + bool asyncAwait = true; + + /// + /// Decompile async methods. + /// + public bool AsyncAwait { + get { return asyncAwait; } + set { + if (asyncAwait != value) { + asyncAwait = value; + OnPropertyChanged("AsyncAwait"); + } + } + } + bool automaticProperties = true; /// diff --git a/src/Libraries/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/src/Libraries/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 846edc60a2..60bead91a6 100644 --- a/src/Libraries/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/src/Libraries/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -101,6 +101,7 @@ + @@ -114,6 +115,8 @@ + + diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/AsyncDecompiler.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/AsyncDecompiler.cs new file mode 100644 index 0000000000..4535c0f82a --- /dev/null +++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/AsyncDecompiler.cs @@ -0,0 +1,653 @@ +// Copyright (c) 2012 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using Mono.Cecil; +using Mono.Cecil.Cil; + +namespace ICSharpCode.Decompiler.ILAst +{ + /// + /// Decompiler step for C# 5 async/await. + /// + class AsyncDecompiler + { + public static bool IsCompilerGeneratedStateMachine(TypeDefinition type) + { + if (!(type.DeclaringType != null && type.IsCompilerGenerated())) + return false; + foreach (TypeReference i in type.Interfaces) { + if (i.Namespace == "System.Runtime.CompilerServices" && i.Name == "IAsyncStateMachine") + return true; + } + return false; + } + + enum AsyncMethodType + { + Void, + Task, + TaskOfT + } + + DecompilerContext context; + + // These fields are set by MatchTaskCreationPattern() + AsyncMethodType methodType; + int initialState; + TypeDefinition stateMachineStruct; + MethodDefinition moveNextMethod; + FieldDefinition builderField; + FieldDefinition stateField; + Dictionary fieldToParameterMap = new Dictionary(); + + // These fields are set by AnalyzeMoveNext() + int finalState = -2; + ILTryCatchBlock mainTryCatch; + ILLabel setResultAndExitLabel; + ILLabel exitLabel; + ILExpression resultExpr; + + #region RunStep1() method + public static void RunStep1(DecompilerContext context, ILBlock method) + { + if (!context.Settings.AsyncAwait) + return; // abort if async decompilation is disabled + var yrd = new AsyncDecompiler(); + yrd.context = context; + if (!yrd.MatchTaskCreationPattern(method)) + return; + #if DEBUG + if (Debugger.IsAttached) { + yrd.Run(); + } else { + #endif + try { + yrd.Run(); + } catch (SymbolicAnalysisFailedException) { + return; + } + #if DEBUG + } + #endif + context.CurrentMethodIsAsync = true; + + method.Body.Clear(); + method.EntryGoto = null; + method.Body.AddRange(yrd.newTopLevelBody); + ILAstOptimizer.RemoveRedundantCode(method); + } + + void Run() + { + AnalyzeMoveNext(); + ValidateCatchBlock(mainTryCatch.CatchBlocks[0]); + AnalyzeStateMachine(mainTryCatch.TryBlock); + // AnalyzeStateMachine invokes ConvertBody + MarkGeneratedVariables(); + YieldReturnDecompiler.TranslateFieldsToLocalAccess(newTopLevelBody, fieldToParameterMap); + } + #endregion + + #region MatchTaskCreationPattern + bool MatchTaskCreationPattern(ILBlock method) + { + if (method.Body.Count < 5) + return false; + // Check the second-to-last instruction (the start call) first, as we can get the most information from that + MethodReference startMethod; + ILExpression loadStartTarget, loadStartArgument; + // call(AsyncTaskMethodBuilder::Start, ldloca(builder), ldloca(stateMachine)) + if (!method.Body[method.Body.Count - 2].Match(ILCode.Call, out startMethod, out loadStartTarget, out loadStartArgument)) + return false; + if (startMethod.Name != "Start" || startMethod.DeclaringType == null || startMethod.DeclaringType.Namespace != "System.Runtime.CompilerServices") + return false; + switch (startMethod.DeclaringType.Name) { + case "AsyncTaskMethodBuilder`1": + methodType = AsyncMethodType.TaskOfT; + break; + case "AsyncTaskMethodBuilder": + methodType = AsyncMethodType.Task; + break; + case "AsyncVoidMethodBuilder": + methodType = AsyncMethodType.Void; + break; + default: + return false; + } + ILVariable stateMachineVar, builderVar; + if (!loadStartTarget.Match(ILCode.Ldloca, out builderVar)) + return false; + if (!loadStartArgument.Match(ILCode.Ldloca, out stateMachineVar)) + return false; + + stateMachineStruct = stateMachineVar.Type.ResolveWithinSameModule(); + if (stateMachineStruct == null || !stateMachineStruct.IsValueType) + return false; + moveNextMethod = stateMachineStruct.Methods.FirstOrDefault(f => f.Name == "MoveNext"); + if (moveNextMethod == null) + return false; + + // Check third-to-last instruction (copy of builder): + // stloc(builder, ldfld(StateMachine::<>t__builder, ldloca(stateMachine))) + ILExpression loadBuilderExpr; + if (!method.Body[method.Body.Count - 3].MatchStloc(builderVar, out loadBuilderExpr)) + return false; + FieldReference builderFieldRef; + ILExpression loadStateMachineForBuilderExpr; + if (!loadBuilderExpr.Match(ILCode.Ldfld, out builderFieldRef, out loadStateMachineForBuilderExpr)) + return false; + if (!loadStateMachineForBuilderExpr.MatchLdloca(stateMachineVar)) + return false; + builderField = builderFieldRef.ResolveWithinSameModule(); + if (builderField == null) + return false; + + // Check the last instruction (ret) + if (methodType == AsyncMethodType.Void) { + if (!method.Body[method.Body.Count - 1].Match(ILCode.Ret)) + return false; + } else { + // ret(call(AsyncTaskMethodBuilder::get_Task, ldflda(StateMachine::<>t__builder, ldloca(stateMachine)))) + ILExpression returnValue; + if (!method.Body[method.Body.Count - 1].Match(ILCode.Ret, out returnValue)) + return false; + MethodReference getTaskMethod; + ILExpression builderExpr; + if (!returnValue.Match(ILCode.Call, out getTaskMethod, out builderExpr)) + return false; + ILExpression loadStateMachineForBuilderExpr2; + FieldReference builderField2; + if (!builderExpr.Match(ILCode.Ldflda, out builderField2, out loadStateMachineForBuilderExpr2)) + return false; + if (builderField2.ResolveWithinSameModule() != builderField || !loadStateMachineForBuilderExpr2.MatchLdloca(stateMachineVar)) + return false; + } + + // Check the last field assignment - this should be the state field + ILExpression initialStateExpr; + if (!MatchStFld(method.Body[method.Body.Count - 4], stateMachineVar, out stateField, out initialStateExpr)) + return false; + if (!initialStateExpr.Match(ILCode.Ldc_I4, out initialState)) + return false; + if (initialState != -1) + return false; + + // Check the second-to-last field assignment - this should be the builder field + FieldDefinition builderField3; + ILExpression builderInitialization; + if (!MatchStFld(method.Body[method.Body.Count - 5], stateMachineVar, out builderField3, out builderInitialization)) + return false; + MethodReference createMethodRef; + if (builderField3 != builderField || !builderInitialization.Match(ILCode.Call, out createMethodRef)) + return false; + if (createMethodRef.Name != "Create") + return false; + + for (int i = 0; i < method.Body.Count - 5; i++) { + FieldDefinition field; + ILExpression fieldInit; + if (!MatchStFld(method.Body[i], stateMachineVar, out field, out fieldInit)) + return false; + ILVariable v; + if (!fieldInit.Match(ILCode.Ldloc, out v)) + return false; + if (!v.IsParameter) + return false; + fieldToParameterMap[field] = v; + } + + return true; + } + + static bool MatchStFld(ILNode stfld, ILVariable stateMachineVar, out FieldDefinition field, out ILExpression expr) + { + field = null; + FieldReference fieldRef; + ILExpression ldloca; + if (!stfld.Match(ILCode.Stfld, out fieldRef, out ldloca, out expr)) + return false; + field = fieldRef.ResolveWithinSameModule(); + return field != null && ldloca.MatchLdloca(stateMachineVar); + } + #endregion + + #region Analyze MoveNext + void AnalyzeMoveNext() + { + ILBlock ilMethod = CreateILAst(moveNextMethod); + + if (ilMethod.Body.Count != 6) + throw new SymbolicAnalysisFailedException(); + + mainTryCatch = ilMethod.Body[0] as ILTryCatchBlock; + if (mainTryCatch == null || mainTryCatch.CatchBlocks.Count != 1) + throw new SymbolicAnalysisFailedException(); + if (mainTryCatch.FaultBlock != null || mainTryCatch.FinallyBlock != null) + throw new SymbolicAnalysisFailedException(); + + setResultAndExitLabel = ilMethod.Body[1] as ILLabel; + if (setResultAndExitLabel == null) + throw new SymbolicAnalysisFailedException(); + + if (!MatchStateAssignment(ilMethod.Body[2], out finalState)) + throw new SymbolicAnalysisFailedException(); + + // call(AsyncTaskMethodBuilder`1::SetResult, ldflda(StateMachine::<>t__builder, ldloc(this)), ldloc(<>t__result)) + MethodReference setResultMethod; + ILExpression builderExpr; + if (methodType == AsyncMethodType.TaskOfT) { + if (!ilMethod.Body[3].Match(ILCode.Call, out setResultMethod, out builderExpr, out resultExpr)) + throw new SymbolicAnalysisFailedException(); + } else { + if (!ilMethod.Body[3].Match(ILCode.Call, out setResultMethod, out builderExpr)) + throw new SymbolicAnalysisFailedException(); + } + if (!(setResultMethod.Name == "SetResult" && IsBuilderFieldOnThis(builderExpr))) + throw new SymbolicAnalysisFailedException(); + + exitLabel = ilMethod.Body[4] as ILLabel; + if (exitLabel == null) + throw new SymbolicAnalysisFailedException(); + } + + /// + /// Creates ILAst for the specified method, optimized up to before the 'YieldReturn' step. + /// + ILBlock CreateILAst(MethodDefinition method) + { + if (method == null || !method.HasBody) + throw new SymbolicAnalysisFailedException(); + + ILBlock ilMethod = new ILBlock(); + ILAstBuilder astBuilder = new ILAstBuilder(); + ilMethod.Body = astBuilder.Build(method, true, context); + ILAstOptimizer optimizer = new ILAstOptimizer(); + optimizer.Optimize(context, ilMethod, ILAstOptimizationStep.YieldReturn); + return ilMethod; + } + + void ValidateCatchBlock(ILTryCatchBlock.CatchBlock catchBlock) + { + if (catchBlock.ExceptionType == null || catchBlock.ExceptionType.Name != "Exception") + throw new SymbolicAnalysisFailedException(); + if (catchBlock.Body.Count != 3) + throw new SymbolicAnalysisFailedException(); + int stateID; + if (!(MatchStateAssignment(catchBlock.Body[0], out stateID) && stateID == finalState)) + throw new SymbolicAnalysisFailedException(); + MethodReference setExceptionMethod; + ILExpression builderExpr, exceptionExpr; + if (!catchBlock.Body[1].Match(ILCode.Call, out setExceptionMethod, out builderExpr, out exceptionExpr)) + throw new SymbolicAnalysisFailedException(); + if (!(setExceptionMethod.Name == "SetException" && IsBuilderFieldOnThis(builderExpr) && exceptionExpr.MatchLdloc(catchBlock.ExceptionVariable))) + throw new SymbolicAnalysisFailedException(); + + ILLabel label; + if (!(catchBlock.Body[2].Match(ILCode.Leave, out label) && label == exitLabel)) + throw new SymbolicAnalysisFailedException(); + } + + bool IsBuilderFieldOnThis(ILExpression builderExpr) + { + // ldflda(StateMachine::<>t__builder, ldloc(this)) + FieldReference fieldRef; + ILExpression target; + return builderExpr.Match(ILCode.Ldflda, out fieldRef, out target) + && fieldRef.ResolveWithinSameModule() == builderField + && target.MatchThis(); + } + + bool MatchStateAssignment(ILNode stfld, out int stateID) + { + // stfld(StateMachine::<>1__state, ldloc(this), ldc.i4(-2)) + stateID = 0; + FieldReference fieldRef; + ILExpression target, val; + if (stfld.Match(ILCode.Stfld, out fieldRef, out target, out val)) { + return fieldRef.ResolveWithinSameModule() == stateField + && target.MatchThis() + && val.Match(ILCode.Ldc_I4, out stateID); + } + return false; + } + #endregion + + #region AnalyzeStateMachine + ILVariable doFinallyBodies; + List newTopLevelBody; + + void AnalyzeStateMachine(ILBlock block) + { + var body = block.Body; + if (body.Count == 0) + throw new SymbolicAnalysisFailedException(); + if (DetectDoFinallyBodies(body)) { + body.RemoveAt(0); + if (body.Count == 0) + throw new SymbolicAnalysisFailedException(); + } + StateRangeAnalysis rangeAnalysis = new StateRangeAnalysis(body[0], StateRangeAnalysisMode.AsyncMoveNext, stateField); + int bodyLength = block.Body.Count; + int pos = rangeAnalysis.AssignStateRanges(body, bodyLength); + rangeAnalysis.EnsureLabelAtPos(body, ref pos, ref bodyLength); + + var labelStateRangeMapping = rangeAnalysis.CreateLabelRangeMapping(body, pos, bodyLength); + newTopLevelBody = ConvertBody(body, pos, bodyLength, labelStateRangeMapping); + newTopLevelBody.Insert(0, MakeGoTo(labelStateRangeMapping, initialState)); + newTopLevelBody.Add(setResultAndExitLabel); + if (methodType == AsyncMethodType.TaskOfT) { + newTopLevelBody.Add(new ILExpression(ILCode.Ret, null, resultExpr)); + } else { + newTopLevelBody.Add(new ILExpression(ILCode.Ret, null)); + } + } + + bool DetectDoFinallyBodies(List body) + { + ILVariable v; + ILExpression initExpr; + if (!body[0].Match(ILCode.Stloc, out v, out initExpr)) + return false; + int initialValue; + if (!(initExpr.Match(ILCode.Ldc_I4, out initialValue) && initialValue == 1)) + return false; + doFinallyBodies = v; + return true; + } + #endregion + + #region ConvertBody + ILExpression MakeGoTo(LabelRangeMapping mapping, int state) + { + foreach (var pair in mapping) { + if (pair.Value.Contains(state)) + return new ILExpression(ILCode.Br, pair.Key); + } + throw new SymbolicAnalysisFailedException(); + } + + List ConvertBody(List body, int startPos, int bodyLength, LabelRangeMapping mapping) + { + List newBody = new List(); + // Copy all instructions from the old body to newBody. + for (int pos = startPos; pos < bodyLength; pos++) { + ILTryCatchBlock tryCatchBlock = body[pos] as ILTryCatchBlock; + ILExpression expr = body[pos] as ILExpression; + if (expr != null && expr.Code == ILCode.Leave && expr.Operand == exitLabel) { + ILVariable awaiterVar; + FieldDefinition awaiterField; + int targetStateID; + HandleAwait(newBody, out awaiterVar, out awaiterField, out targetStateID); + MarkAsGeneratedVariable(awaiterVar); + newBody.Add(new ILExpression(ILCode.Await, null, new ILExpression(ILCode.Ldloca, awaiterVar))); + newBody.Add(MakeGoTo(mapping, targetStateID)); + } else if (tryCatchBlock != null) { + ILTryCatchBlock newTryCatchBlock = new ILTryCatchBlock(); + var tryBody = tryCatchBlock.TryBlock.Body; + if (tryBody.Count == 0) + throw new SymbolicAnalysisFailedException(); + StateRangeAnalysis rangeAnalysis = new StateRangeAnalysis(tryBody[0], StateRangeAnalysisMode.AsyncMoveNext, stateField); + int tryBodyLength = tryBody.Count; + int posInTryBody = rangeAnalysis.AssignStateRanges(tryBody, tryBodyLength); + rangeAnalysis.EnsureLabelAtPos(tryBody, ref posInTryBody, ref tryBodyLength); + + var mappingInTryBlock = rangeAnalysis.CreateLabelRangeMapping(tryBody, posInTryBody, tryBodyLength); + var newTryBody = ConvertBody(tryBody, posInTryBody, tryBodyLength, mappingInTryBlock); + newTryBody.Insert(0, MakeGoTo(mappingInTryBlock, initialState)); + + // If there's a label at the beginning of the state dispatcher, copy that + if (posInTryBody > 0 && tryBody.FirstOrDefault() is ILLabel) + newTryBody.Insert(0, tryBody.First()); + + newTryCatchBlock.TryBlock = new ILBlock(newTryBody); + newTryCatchBlock.CatchBlocks = new List(tryCatchBlock.CatchBlocks); + newTryCatchBlock.FaultBlock = tryCatchBlock.FaultBlock; + if (tryCatchBlock.FinallyBlock != null) + newTryCatchBlock.FinallyBlock = new ILBlock(ConvertFinally(tryCatchBlock.FinallyBlock.Body)); + + newBody.Add(newTryCatchBlock); + } else { + newBody.Add(body[pos]); + } + } + return newBody; + } + + List ConvertFinally(List body) + { + List newBody = new List(body); + ILLabel endFinallyLabel; + ILExpression ceqExpr; + if (newBody.Count > 0 && newBody[0].Match(ILCode.Brtrue, out endFinallyLabel, out ceqExpr)) { + ILExpression loadDoFinallyBodies, loadZero; + object unused; + if (ceqExpr.Match(ILCode.Ceq, out unused, out loadDoFinallyBodies, out loadZero)) { + int num; + if (loadDoFinallyBodies.MatchLdloc(doFinallyBodies) && loadZero.Match(ILCode.Ldc_I4, out num) && num == 0) { + newBody.RemoveAt(0); + } + } else if (ceqExpr.Match(ILCode.LogicNot, out loadDoFinallyBodies)) { + if (loadDoFinallyBodies.MatchLdloc(doFinallyBodies)) { + newBody.RemoveAt(0); + } + } + } + return newBody; + } + + void HandleAwait(List newBody, out ILVariable awaiterVar, out FieldDefinition awaiterField, out int targetStateID) + { + // Handle the instructions prior to the exit out of the method to detect what is being awaited. + // (analyses the last instructions in newBody and removes the analyzed instructions from newBody) + + if (doFinallyBodies != null) { + // stloc(<>t__doFinallyBodies, ldc.i4(0)) + ILExpression dfbInitExpr; + if (!newBody.LastOrDefault().MatchStloc(doFinallyBodies, out dfbInitExpr)) + throw new SymbolicAnalysisFailedException(); + int val; + if (!(dfbInitExpr.Match(ILCode.Ldc_I4, out val) && val == 0)) + throw new SymbolicAnalysisFailedException(); + newBody.RemoveAt(newBody.Count - 1); // remove doFinallyBodies assignment + } + + // call(AsyncTaskMethodBuilder::AwaitUnsafeOnCompleted, ldflda(StateMachine::<>t__builder, ldloc(this)), ldloca(CS$0$0001), ldloc(this)) + ILExpression callAwaitUnsafeOnCompleted = newBody.LastOrDefault() as ILExpression; + newBody.RemoveAt(newBody.Count - 1); // remove AwaitUnsafeOnCompleted call + if (callAwaitUnsafeOnCompleted == null || callAwaitUnsafeOnCompleted.Code != ILCode.Call) + throw new SymbolicAnalysisFailedException(); + if (((MethodReference)callAwaitUnsafeOnCompleted.Operand).Name != "AwaitUnsafeOnCompleted") + throw new SymbolicAnalysisFailedException(); + if (callAwaitUnsafeOnCompleted.Arguments.Count != 3) + throw new SymbolicAnalysisFailedException(); + if (!callAwaitUnsafeOnCompleted.Arguments[1].Match(ILCode.Ldloca, out awaiterVar)) + throw new SymbolicAnalysisFailedException(); + + // stfld(StateMachine::<>u__$awaiter6, ldloc(this), ldloc(CS$0$0001)) + FieldReference awaiterFieldRef; + ILExpression loadThis, loadAwaiterVar; + if (!newBody.LastOrDefault().Match(ILCode.Stfld, out awaiterFieldRef, out loadThis, out loadAwaiterVar)) + throw new SymbolicAnalysisFailedException(); + newBody.RemoveAt(newBody.Count - 1); // remove awaiter field assignment + awaiterField = awaiterFieldRef.ResolveWithinSameModule(); + if (!(awaiterField != null && loadThis.MatchThis() && loadAwaiterVar.MatchLdloc(awaiterVar))) + throw new SymbolicAnalysisFailedException(); + + // stfld(StateMachine::<>1__state, ldloc(this), ldc.i4(0)) + if (!MatchStateAssignment(newBody.LastOrDefault(), out targetStateID)) + throw new SymbolicAnalysisFailedException(); + newBody.RemoveAt(newBody.Count - 1); // remove awaiter field assignment + } + #endregion + + #region MarkGeneratedVariables + int smallestGeneratedVariableIndex = int.MaxValue; + + void MarkAsGeneratedVariable(ILVariable v) + { + if (v.OriginalVariable != null && v.OriginalVariable.Index >= 0) { + smallestGeneratedVariableIndex = Math.Min(smallestGeneratedVariableIndex, v.OriginalVariable.Index); + } + } + + void MarkGeneratedVariables() + { + var expressions = new ILBlock(newTopLevelBody).GetSelfAndChildrenRecursive(); + foreach (var v in expressions.Select(e => e.Operand).OfType()) { + if (v.OriginalVariable != null && v.OriginalVariable.Index >= smallestGeneratedVariableIndex) + v.IsGenerated = true; + } + } + #endregion + + #region RunStep2() method + public static void RunStep2(DecompilerContext context, ILBlock method) + { + if (context.CurrentMethodIsAsync) { + Step2(method.Body); + ILAstOptimizer.RemoveRedundantCode(method); + // Repeat the inlining/copy propagation optimization because the conversion of field access + // to local variables can open up additional inlining possibilities. + ILInlining inlining = new ILInlining(method); + inlining.InlineAllVariables(); + inlining.CopyPropagation(); + } + } + + static void Step2(List body) + { + for (int pos = 0; pos < body.Count; pos++) { + ILTryCatchBlock tc = body[pos] as ILTryCatchBlock; + if (tc != null) { + Step2(tc.TryBlock.Body); + } else { + Step2(body, ref pos); + } + } + } + + static bool Step2(List body, ref int pos) + { + // stloc(CS$0$0001, callvirt(class System.Threading.Tasks.Task`1::GetAwaiter, awaiterExpr) + // brtrue(IL_7C, call(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted, ldloca(CS$0$0001))) + // await(ldloca(CS$0$0001)) + // ... + // IL_7C: + // arg_8B_0 = call(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult, ldloca(CS$0$0001)) + // initobj(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1, ldloca(CS$0$0001)) + + ILExpression loadAwaiter; + ILVariable awaiterVar; + if (!body[pos].Match(ILCode.Await, out loadAwaiter)) + return false; + if (!loadAwaiter.Match(ILCode.Ldloca, out awaiterVar)) + return false; + + ILVariable stackVar; + ILExpression stackExpr; + while (pos >= 1 && body[pos - 1].Match(ILCode.Stloc, out stackVar, out stackExpr)) + pos--; + + // stloc(CS$0$0001, callvirt(class System.Threading.Tasks.Task`1::GetAwaiter, awaiterExpr) + ILExpression getAwaiterCall; + if (!(pos >= 2 && body[pos - 2].MatchStloc(awaiterVar, out getAwaiterCall))) + return false; + MethodReference getAwaiterMethod; + ILExpression awaitedExpr; + if (!(getAwaiterCall.Match(ILCode.Call, out getAwaiterMethod, out awaitedExpr) || getAwaiterCall.Match(ILCode.Callvirt, out getAwaiterMethod, out awaitedExpr))) + return false; + + if (awaitedExpr.Code == ILCode.AddressOf) { + // remove 'AddressOf()' when calling GetAwaiter() on a value type + awaitedExpr = awaitedExpr.Arguments[0]; + } + + // brtrue(IL_7C, call(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted, ldloca(CS$0$0001))) + ILLabel label; + ILExpression getIsCompletedCall; + if (!(pos >= 1 && body[pos - 1].Match(ILCode.Brtrue, out label, out getIsCompletedCall))) + return false; + + int labelPos = body.IndexOf(label); + if (labelPos < pos) + return false; + for (int i = pos + 1; i < labelPos; i++) { + // validate that we aren't deleting any unexpected instructions - + // between the await and the label, there should only be the stack, awaiter and state logic + ILExpression expr = body[i] as ILExpression; + if (expr == null) + return false; + switch (expr.Code) { + case ILCode.Stloc: + case ILCode.Initobj: + case ILCode.Stfld: + case ILCode.Await: + // e.g. + // stloc(CS$0$0001, ldfld(StateMachine::<>u__$awaitere, ldloc(this))) + // initobj(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1, ldloca(CS$0$0002_66)) + // stfld('d__d'::<>u__$awaitere, ldloc(this), ldloc(CS$0$0002_66)) + // stfld('d__d'::<>1__state, ldloc(this), ldc.i4(-1)) + break; + default: + return false; + } + } + if (labelPos + 1 >= body.Count) + return false; + ILExpression resultAssignment = body[labelPos + 1] as ILExpression; + ILVariable resultVar; + ILExpression getResultCall; + bool isResultAssignment = resultAssignment.Match(ILCode.Stloc, out resultVar, out getResultCall); + if (!isResultAssignment) + getResultCall = resultAssignment; + if (!(getResultCall.Operand is MethodReference && ((MethodReference)getResultCall.Operand).Name == "GetResult")) + return false; + + pos -= 2; // also delete 'stloc', 'brtrue' and 'await' + body.RemoveRange(pos, labelPos - pos); + Debug.Assert(body[pos] == label); + + pos++; + if (isResultAssignment) { + Debug.Assert(body[pos] == resultAssignment); + resultAssignment.Arguments[0] = new ILExpression(ILCode.Await, null, awaitedExpr); + } else { + body[pos] = new ILExpression(ILCode.Await, null, awaitedExpr); + } + + // if the awaiter variable is cleared out in the next instruction, remove that instruction + if (IsVariableReset(body.ElementAtOrDefault(pos + 1), awaiterVar)) { + body.RemoveAt(pos + 1); + } + + return true; + } + + static bool IsVariableReset(ILNode expr, ILVariable variable) + { + object unused; + ILExpression ldloca; + return expr.Match(ILCode.Initobj, out unused, out ldloca) && ldloca.MatchLdloca(variable); + } + #endregion + } +} diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs index 051662f357..bf85ca94f4 100644 --- a/src/Libraries/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs +++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs @@ -35,6 +35,7 @@ namespace ICSharpCode.Decompiler.ILAst InlineVariables, CopyPropagation, YieldReturn, + AsyncAwait, PropertyAccessInstructions, SplitToMovableBlocks, TypeInference, @@ -107,6 +108,10 @@ namespace ICSharpCode.Decompiler.ILAst if (abortBeforeStep == ILAstOptimizationStep.YieldReturn) return; YieldReturnDecompiler.Run(context, method); + AsyncDecompiler.RunStep1(context, method); + + if (abortBeforeStep == ILAstOptimizationStep.AsyncAwait) return; + AsyncDecompiler.RunStep2(context, method); if (abortBeforeStep == ILAstOptimizationStep.PropertyAccessInstructions) return; IntroducePropertyAccessInstructions(method); @@ -256,7 +261,7 @@ namespace ICSharpCode.Decompiler.ILAst /// Ignore arguments of 'leave' /// /// - void RemoveRedundantCode(ILBlock method) + internal static void RemoveRedundantCode(ILBlock method) { Dictionary labelRefCount = new Dictionary(); foreach (ILLabel target in method.GetSelfAndChildrenRecursive(e => e.IsBranch()).SelectMany(e => e.GetBranchTargets())) { @@ -286,7 +291,13 @@ namespace ICSharpCode.Decompiler.ILAst prevExpr.ILRanges.AddRange(((ILExpression)body[i]).ILRanges); // Ignore pop } else { - newBody.Add(body[i]); + ILLabel label = body[i] as ILLabel; + if (label != null) { + if (labelRefCount.GetOrDefault(label) > 0) + newBody.Add(label); + } else { + newBody.Add(body[i]); + } } } block.Body = newBody; diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/ILCodes.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/ILCodes.cs index cbf5486988..5ca063b752 100644 --- a/src/Libraries/ICSharpCode.Decompiler/ILAst/ILCodes.cs +++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/ILCodes.cs @@ -333,7 +333,11 @@ namespace ICSharpCode.Decompiler.ILAst /// The last child of this node is the call constructing the expression tree, all other children are the /// assignments to the ParameterExpression variables. /// - ExpressionTreeParameterDeclarations + ExpressionTreeParameterDeclarations, + /// + /// C# 5 await + /// + Await } public static class ILCodeUtil diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/PatternMatching.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/PatternMatching.cs index cc4e5ee5f5..31fcf62b15 100644 --- a/src/Libraries/ICSharpCode.Decompiler/ILAst/PatternMatching.cs +++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/PatternMatching.cs @@ -155,5 +155,17 @@ namespace ICSharpCode.Decompiler.ILAst ILVariable v; return node.Match(ILCode.Ldloc, out v) && v == expectedVar; } + + public static bool MatchLdloca(this ILNode node, ILVariable expectedVar) + { + ILVariable v; + return node.Match(ILCode.Ldloca, out v) && v == expectedVar; + } + + public static bool MatchStloc(this ILNode node, ILVariable expectedVar, out ILExpression expr) + { + ILVariable v; + return node.Match(ILCode.Stloc, out v, out expr) && v == expectedVar; + } } } diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/StateRange.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/StateRange.cs new file mode 100644 index 0000000000..4a55e1d0b6 --- /dev/null +++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/StateRange.cs @@ -0,0 +1,310 @@ +// Copyright (c) 2012 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using Mono.Cecil; + +namespace ICSharpCode.Decompiler.ILAst +{ + struct Interval + { + public readonly int Start, End; + + public Interval(int start, int end) + { + Debug.Assert(start <= end || (start == 0 && end == -1)); + this.Start = start; + this.End = end; + } + + public override string ToString() + { + return string.Format("({0} to {1})", Start, End); + } + } + + class StateRange + { + readonly List data = new List(); + + public StateRange() + { + } + + public StateRange(int start, int end) + { + this.data.Add(new Interval(start, end)); + } + + public bool IsEmpty { + get { return data.Count == 0; } + } + + public bool Contains(int val) + { + foreach (Interval v in data) { + if (v.Start <= val && val <= v.End) + return true; + } + return false; + } + + public void UnionWith(StateRange other) + { + data.AddRange(other.data); + } + + /// + /// Unions this state range with (other intersect (minVal to maxVal)) + /// + public void UnionWith(StateRange other, int minVal, int maxVal) + { + foreach (Interval v in other.data) { + int start = Math.Max(v.Start, minVal); + int end = Math.Min(v.End, maxVal); + if (start <= end) + data.Add(new Interval(start, end)); + } + } + + /// + /// Merges overlapping interval ranges. + /// + public void Simplify() + { + if (data.Count < 2) + return; + data.Sort((a, b) => a.Start.CompareTo(b.Start)); + Interval prev = data[0]; + int prevIndex = 0; + for (int i = 1; i < data.Count; i++) { + Interval next = data[i]; + Debug.Assert(prev.Start <= next.Start); + if (next.Start <= prev.End + 1) { // intervals overlapping or touching + prev = new Interval(prev.Start, Math.Max(prev.End, next.End)); + data[prevIndex] = prev; + data[i] = new Interval(0, -1); // mark as deleted + } else { + prev = next; + prevIndex = i; + } + } + data.RemoveAll(i => i.Start > i.End); // remove all entries that were marked as deleted + } + + public override string ToString() + { + return string.Join(",", data); + } + + public Interval ToEnclosingInterval() + { + if (data.Count == 0) + throw new SymbolicAnalysisFailedException(); + return new Interval(data[0].Start, data[data.Count - 1].End); + } + } + + enum StateRangeAnalysisMode + { + IteratorMoveNext, + IteratorDispose, + AsyncMoveNext + } + + class StateRangeAnalysis + { + readonly StateRangeAnalysisMode mode; + readonly FieldDefinition stateField; + internal DefaultDictionary ranges; + SymbolicEvaluationContext evalContext; + + internal Dictionary finallyMethodToStateInterval; // used only for IteratorDispose + + /// + /// Initializes the state range logic: + /// Clears 'ranges' and sets 'ranges[entryPoint]' to the full range (int.MinValue to int.MaxValue) + /// + public StateRangeAnalysis(ILNode entryPoint, StateRangeAnalysisMode mode, FieldDefinition stateField) + { + this.mode = mode; + this.stateField = stateField; + if (mode == StateRangeAnalysisMode.IteratorDispose) { + finallyMethodToStateInterval = new Dictionary(); + } + + ranges = new DefaultDictionary(n => new StateRange()); + ranges[entryPoint] = new StateRange(int.MinValue, int.MaxValue); + evalContext = new SymbolicEvaluationContext(stateField); + } + + public int AssignStateRanges(List body, int bodyLength) + { + if (bodyLength == 0) + return 0; + for (int i = 0; i < bodyLength; i++) { + StateRange nodeRange = ranges[body[i]]; + nodeRange.Simplify(); + + ILLabel label = body[i] as ILLabel; + if (label != null) { + ranges[body[i + 1]].UnionWith(nodeRange); + continue; + } + + ILTryCatchBlock tryFinally = body[i] as ILTryCatchBlock; + if (tryFinally != null) { + if (mode == StateRangeAnalysisMode.IteratorDispose) { + if (tryFinally.CatchBlocks.Count != 0 || tryFinally.FaultBlock != null || tryFinally.FinallyBlock == null) + throw new SymbolicAnalysisFailedException(); + ranges[tryFinally.TryBlock].UnionWith(nodeRange); + if (tryFinally.TryBlock.Body.Count != 0) { + ranges[tryFinally.TryBlock.Body[0]].UnionWith(nodeRange); + AssignStateRanges(tryFinally.TryBlock.Body, tryFinally.TryBlock.Body.Count); + } + continue; + } else if (mode == StateRangeAnalysisMode.AsyncMoveNext) { + return i; + } else { + throw new SymbolicAnalysisFailedException(); + } + } + + ILExpression expr = body[i] as ILExpression; + if (expr == null) + throw new SymbolicAnalysisFailedException(); + switch (expr.Code) { + case ILCode.Switch: + { + SymbolicValue val = evalContext.Eval(expr.Arguments[0]); + if (val.Type != SymbolicValueType.State) + goto default; + ILLabel[] targetLabels = (ILLabel[])expr.Operand; + for (int j = 0; j < targetLabels.Length; j++) { + int state = j - val.Constant; + ranges[targetLabels[j]].UnionWith(nodeRange, state, state); + } + StateRange nextRange = ranges[body[i + 1]]; + nextRange.UnionWith(nodeRange, int.MinValue, -1 - val.Constant); + nextRange.UnionWith(nodeRange, targetLabels.Length - val.Constant, int.MaxValue); + break; + } + case ILCode.Br: + case ILCode.Leave: + ranges[(ILLabel)expr.Operand].UnionWith(nodeRange); + break; + case ILCode.Brtrue: + { + SymbolicValue val = evalContext.Eval(expr.Arguments[0]); + if (val.Type == SymbolicValueType.StateEquals) { + ranges[(ILLabel)expr.Operand].UnionWith(nodeRange, val.Constant, val.Constant); + StateRange nextRange = ranges[body[i + 1]]; + nextRange.UnionWith(nodeRange, int.MinValue, val.Constant - 1); + nextRange.UnionWith(nodeRange, val.Constant + 1, int.MaxValue); + break; + } else if (val.Type == SymbolicValueType.StateInEquals) { + ranges[body[i + 1]].UnionWith(nodeRange, val.Constant, val.Constant); + StateRange targetRange = ranges[(ILLabel)expr.Operand]; + targetRange.UnionWith(nodeRange, int.MinValue, val.Constant - 1); + targetRange.UnionWith(nodeRange, val.Constant + 1, int.MaxValue); + break; + } else { + goto default; + } + } + case ILCode.Nop: + ranges[body[i + 1]].UnionWith(nodeRange); + break; + case ILCode.Ret: + break; + case ILCode.Stloc: + { + SymbolicValue val = evalContext.Eval(expr.Arguments[0]); + if (val.Type == SymbolicValueType.State && val.Constant == 0) { + evalContext.AddStateVariable((ILVariable)expr.Operand); + goto case ILCode.Nop; + } else { + goto default; + } + } + case ILCode.Call: + // in some cases (e.g. foreach over array) the C# compiler produces a finally method outside of try-finally blocks + if (mode == StateRangeAnalysisMode.IteratorDispose) { + MethodDefinition mdef = (expr.Operand as MethodReference).ResolveWithinSameModule(); + if (mdef == null || finallyMethodToStateInterval.ContainsKey(mdef)) + throw new SymbolicAnalysisFailedException(); + finallyMethodToStateInterval.Add(mdef, nodeRange.ToEnclosingInterval()); + break; + } else { + goto default; + } + default: + if (mode == StateRangeAnalysisMode.IteratorDispose) { + throw new SymbolicAnalysisFailedException(); + } else { + return i; + } + } + } + return bodyLength; + } + + public void EnsureLabelAtPos(List body, ref int pos, ref int bodyLength) + { + if (pos > 0 && body[pos - 1] is ILLabel) { + pos--; + } else { + // ensure that the first element at body[pos] is a label: + ILLabel newLabel = new ILLabel(); + newLabel.Name = "YieldReturnEntryPoint"; + ranges[newLabel] = ranges[body[pos]]; // give the label the range of the instruction at body[pos] + body.Insert(pos, newLabel); + bodyLength++; + } + } + + public LabelRangeMapping CreateLabelRangeMapping(List body, int pos, int bodyLength) + { + LabelRangeMapping result = new LabelRangeMapping(); + CreateLabelRangeMapping(body, pos, bodyLength, result, false); + return result; + } + + void CreateLabelRangeMapping(List body, int pos, int bodyLength, LabelRangeMapping result, bool onlyInitialLabels) + { + for (int i = pos; i < bodyLength; i++) { + ILLabel label = body[i] as ILLabel; + if (label != null) { + result.Add(new KeyValuePair(label, ranges[label])); + } else { + ILTryCatchBlock tryCatchBlock = body[i] as ILTryCatchBlock; + if (tryCatchBlock != null) { + CreateLabelRangeMapping(tryCatchBlock.TryBlock.Body, 0, tryCatchBlock.TryBlock.Body.Count, result, true); + } else if (onlyInitialLabels) { + break; + } + } + } + } + } + + class LabelRangeMapping : List> {} +} diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/SymbolicExecution.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/SymbolicExecution.cs new file mode 100644 index 0000000000..98255f2f2d --- /dev/null +++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/SymbolicExecution.cs @@ -0,0 +1,148 @@ +// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using Mono.Cecil; + +namespace ICSharpCode.Decompiler.ILAst +{ + /// + /// This exception is thrown when we find something else than we expect from the C# compiler. + /// This aborts the analysis and makes the whole transform fail. + /// + class SymbolicAnalysisFailedException : Exception {} + + enum SymbolicValueType + { + /// + /// Unknown value + /// + Unknown, + /// + /// int: Constant (result of ldc.i4) + /// + IntegerConstant, + /// + /// int: State + Constant + /// + State, + /// + /// This pointer (result of ldarg.0) + /// + This, + /// + /// bool: State == Constant + /// + StateEquals, + /// + /// bool: State != Constant + /// + StateInEquals + } + + struct SymbolicValue + { + public readonly int Constant; + public readonly SymbolicValueType Type; + + public SymbolicValue(SymbolicValueType type, int constant = 0) + { + this.Type = type; + this.Constant = constant; + } + + public override string ToString() + { + return string.Format("[SymbolicValue {0}: {1}]", this.Type, this.Constant); + } + } + + class SymbolicEvaluationContext + { + readonly FieldDefinition stateField; + readonly List stateVariables = new List(); + + public SymbolicEvaluationContext(FieldDefinition stateField) + { + this.stateField = stateField; + } + + public void AddStateVariable(ILVariable v) + { + if (!stateVariables.Contains(v)) + stateVariables.Add(v); + } + + SymbolicValue Failed() + { + return new SymbolicValue(SymbolicValueType.Unknown); + } + + public SymbolicValue Eval(ILExpression expr) + { + SymbolicValue left, right; + switch (expr.Code) { + case ILCode.Sub: + left = Eval(expr.Arguments[0]); + right = Eval(expr.Arguments[1]); + if (left.Type != SymbolicValueType.State && left.Type != SymbolicValueType.IntegerConstant) + return Failed(); + if (right.Type != SymbolicValueType.IntegerConstant) + return Failed(); + return new SymbolicValue(left.Type, unchecked ( left.Constant - right.Constant )); + case ILCode.Ldfld: + if (Eval(expr.Arguments[0]).Type != SymbolicValueType.This) + return Failed(); + if (CecilExtensions.ResolveWithinSameModule(expr.Operand as FieldReference) != stateField) + return Failed(); + return new SymbolicValue(SymbolicValueType.State); + case ILCode.Ldloc: + ILVariable loadedVariable = (ILVariable)expr.Operand; + if (stateVariables.Contains(loadedVariable)) + return new SymbolicValue(SymbolicValueType.State); + else if (loadedVariable.IsParameter && loadedVariable.OriginalParameter.Index < 0) + return new SymbolicValue(SymbolicValueType.This); + else + return Failed(); + case ILCode.Ldc_I4: + return new SymbolicValue(SymbolicValueType.IntegerConstant, (int)expr.Operand); + case ILCode.Ceq: + case ILCode.Cne: + left = Eval(expr.Arguments[0]); + right = Eval(expr.Arguments[1]); + if (left.Type != SymbolicValueType.State || right.Type != SymbolicValueType.IntegerConstant) + return Failed(); + // bool: (state + left.Constant == right.Constant) + // bool: (state == right.Constant - left.Constant) + return new SymbolicValue(expr.Code == ILCode.Ceq ? SymbolicValueType.StateEquals : SymbolicValueType.StateInEquals, unchecked(right.Constant - left.Constant)); + case ILCode.LogicNot: + SymbolicValue val = Eval(expr.Arguments[0]); + if (val.Type == SymbolicValueType.StateEquals) + return new SymbolicValue(SymbolicValueType.StateInEquals, val.Constant); + else if (val.Type == SymbolicValueType.StateInEquals) + return new SymbolicValue(SymbolicValueType.StateEquals, val.Constant); + else + return Failed(); + default: + return Failed(); + } + } + } +} diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs index 6e8444a1ca..2e46e285bf 100644 --- a/src/Libraries/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs +++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs @@ -790,8 +790,17 @@ namespace ICSharpCode.Decompiler.ILAst case ILCode.YieldBreak: return null; case ILCode.Ret: - if (forceInferChildren && expr.Arguments.Count == 1) - InferTypeForExpression(expr.Arguments[0], context.CurrentMethod.ReturnType); + if (forceInferChildren && expr.Arguments.Count == 1) { + TypeReference returnType = context.CurrentMethod.ReturnType; + if (context.CurrentMethodIsAsync && returnType != null && returnType.Namespace == "System.Threading.Tasks") { + if (returnType.Name == "Task") { + returnType = typeSystem.Void; + } else if (returnType.Name == "Task`1" && returnType.IsGenericInstance) { + returnType = ((GenericInstanceType)returnType).GenericArguments[0]; + } + } + InferTypeForExpression(expr.Arguments[0], returnType); + } return null; case ILCode.YieldReturn: if (forceInferChildren) { @@ -803,6 +812,14 @@ namespace ICSharpCode.Decompiler.ILAst } } return null; + case ILCode.Await: + { + TypeReference taskType = InferTypeForExpression(expr.Arguments[0], null); + if (taskType.Name == "Task`1" && taskType.IsGenericInstance && taskType.Namespace == "System.Threading.Tasks") { + return ((GenericInstanceType)taskType).GenericArguments[0]; + } + return null; + } #endregion case ILCode.Pop: return null; diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs index 06a211eea8..b4b6183bf8 100644 --- a/src/Libraries/ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs +++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs @@ -24,7 +24,7 @@ using Mono.Cecil; namespace ICSharpCode.Decompiler.ILAst { - public class YieldReturnDecompiler + class YieldReturnDecompiler { // For a description on the code generated by the C# compiler for yield return: // http://csharpindepth.com/Articles/Chapter6/IteratorBlockImplementation.aspx @@ -34,11 +34,8 @@ namespace ICSharpCode.Decompiler.ILAst // - Figure out which of the fields is the state field // - Construct an exception table based on states. This allows us to determine, for each state, what the parent try block is. - /// - /// This exception is thrown when we find something else than we expect from the C# compiler. - /// This aborts the analysis and makes the whole transform fail. - /// - class YieldAnalysisFailedException : Exception {} + // See http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2011/03/06/ilspy-yield-return.aspx + // for a description of this step. DecompilerContext context; TypeDefinition enumeratorType; @@ -66,7 +63,7 @@ namespace ICSharpCode.Decompiler.ILAst #endif try { yrd.Run(); - } catch (YieldAnalysisFailedException) { + } catch (SymbolicAnalysisFailedException) { return; } #if DEBUG @@ -211,7 +208,7 @@ namespace ICSharpCode.Decompiler.ILAst } } if (stateField == null) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); } /// @@ -220,7 +217,7 @@ namespace ICSharpCode.Decompiler.ILAst ILBlock CreateILAst(MethodDefinition method) { if (method == null || !method.HasBody) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); ILBlock ilMethod = new ILBlock(); ILAstBuilder astBuilder = new ILAstBuilder(); @@ -269,7 +266,7 @@ namespace ICSharpCode.Decompiler.ILAst } } if (currentField == null) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); } #endregion @@ -322,337 +319,30 @@ namespace ICSharpCode.Decompiler.ILAst disposeMethod = enumeratorType.Methods.FirstOrDefault(m => m.Name == "System.IDisposable.Dispose"); ILBlock ilMethod = CreateILAst(disposeMethod); - finallyMethodToStateInterval = new Dictionary(); - - InitStateRanges(ilMethod.Body[0]); - AssignStateRanges(ilMethod.Body, ilMethod.Body.Count, forDispose: true); + var rangeAnalysis = new StateRangeAnalysis(ilMethod.Body[0], StateRangeAnalysisMode.IteratorDispose, stateField); + rangeAnalysis.AssignStateRanges(ilMethod.Body, ilMethod.Body.Count); + finallyMethodToStateInterval = rangeAnalysis.finallyMethodToStateInterval; // Now look at the finally blocks: foreach (var tryFinally in ilMethod.GetSelfAndChildrenRecursive()) { - Interval interval = ranges[tryFinally.TryBlock.Body[0]].ToEnclosingInterval(); + Interval interval = rangeAnalysis.ranges[tryFinally.TryBlock.Body[0]].ToEnclosingInterval(); var finallyBody = tryFinally.FinallyBlock.Body; if (finallyBody.Count != 2) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); ILExpression call = finallyBody[0] as ILExpression; if (call == null || call.Code != ILCode.Call || call.Arguments.Count != 1) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); if (!call.Arguments[0].MatchThis()) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); if (!finallyBody[1].Match(ILCode.Endfinally)) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); MethodDefinition mdef = GetMethodDefinition(call.Operand as MethodReference); if (mdef == null || finallyMethodToStateInterval.ContainsKey(mdef)) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); finallyMethodToStateInterval.Add(mdef, interval); } - ranges = null; - } - #endregion - - #region Assign StateRanges / Symbolic Execution (used for analysis of Dispose() and MoveNext()) - #region struct Interval / class StateRange - struct Interval - { - public readonly int Start, End; - - public Interval(int start, int end) - { - Debug.Assert(start <= end || (start == 0 && end == -1)); - this.Start = start; - this.End = end; - } - - public override string ToString() - { - return string.Format("({0} to {1})", Start, End); - } - } - - class StateRange - { - readonly List data = new List(); - - public StateRange() - { - } - - public StateRange(int start, int end) - { - this.data.Add(new Interval(start, end)); - } - - public bool Contains(int val) - { - foreach (Interval v in data) { - if (v.Start <= val && val <= v.End) - return true; - } - return false; - } - - public void UnionWith(StateRange other) - { - data.AddRange(other.data); - } - - /// - /// Unions this state range with (other intersect (minVal to maxVal)) - /// - public void UnionWith(StateRange other, int minVal, int maxVal) - { - foreach (Interval v in other.data) { - int start = Math.Max(v.Start, minVal); - int end = Math.Min(v.End, maxVal); - if (start <= end) - data.Add(new Interval(start, end)); - } - } - - /// - /// Merges overlapping interval ranges. - /// - public void Simplify() - { - if (data.Count < 2) - return; - data.Sort((a, b) => a.Start.CompareTo(b.Start)); - Interval prev = data[0]; - int prevIndex = 0; - for (int i = 1; i < data.Count; i++) { - Interval next = data[i]; - Debug.Assert(prev.Start <= next.Start); - if (next.Start <= prev.End + 1) { // intervals overlapping or touching - prev = new Interval(prev.Start, Math.Max(prev.End, next.End)); - data[prevIndex] = prev; - data[i] = new Interval(0, -1); // mark as deleted - } else { - prev = next; - prevIndex = i; - } - } - data.RemoveAll(i => i.Start > i.End); // remove all entries that were marked as deleted - } - - public override string ToString() - { - return string.Join(",", data); - } - - public Interval ToEnclosingInterval() - { - if (data.Count == 0) - throw new YieldAnalysisFailedException(); - return new Interval(data[0].Start, data[data.Count - 1].End); - } - } - #endregion - - DefaultDictionary ranges; - ILVariable rangeAnalysisStateVariable; - - /// - /// Initializes the state range logic: - /// Clears 'ranges' and sets 'ranges[entryPoint]' to the full range (int.MinValue to int.MaxValue) - /// - void InitStateRanges(ILNode entryPoint) - { - ranges = new DefaultDictionary(n => new StateRange()); - ranges[entryPoint] = new StateRange(int.MinValue, int.MaxValue); - rangeAnalysisStateVariable = null; - } - - int AssignStateRanges(List body, int bodyLength, bool forDispose) - { - if (bodyLength == 0) - return 0; - for (int i = 0; i < bodyLength; i++) { - StateRange nodeRange = ranges[body[i]]; - nodeRange.Simplify(); - - ILLabel label = body[i] as ILLabel; - if (label != null) { - ranges[body[i + 1]].UnionWith(nodeRange); - continue; - } - - ILTryCatchBlock tryFinally = body[i] as ILTryCatchBlock; - if (tryFinally != null) { - if (!forDispose || tryFinally.CatchBlocks.Count != 0 || tryFinally.FaultBlock != null || tryFinally.FinallyBlock == null) - throw new YieldAnalysisFailedException(); - ranges[tryFinally.TryBlock].UnionWith(nodeRange); - if (tryFinally.TryBlock.Body.Count != 0) { - ranges[tryFinally.TryBlock.Body[0]].UnionWith(nodeRange); - AssignStateRanges(tryFinally.TryBlock.Body, tryFinally.TryBlock.Body.Count, forDispose); - } - continue; - } - - ILExpression expr = body[i] as ILExpression; - if (expr == null) - throw new YieldAnalysisFailedException(); - switch (expr.Code) { - case ILCode.Switch: - { - SymbolicValue val = Eval(expr.Arguments[0]); - if (val.Type != SymbolicValueType.State) - throw new YieldAnalysisFailedException(); - ILLabel[] targetLabels = (ILLabel[])expr.Operand; - for (int j = 0; j < targetLabels.Length; j++) { - int state = j - val.Constant; - ranges[targetLabels[j]].UnionWith(nodeRange, state, state); - } - StateRange nextRange = ranges[body[i + 1]]; - nextRange.UnionWith(nodeRange, int.MinValue, -1 - val.Constant); - nextRange.UnionWith(nodeRange, targetLabels.Length - val.Constant, int.MaxValue); - break; - } - case ILCode.Br: - case ILCode.Leave: - ranges[(ILLabel)expr.Operand].UnionWith(nodeRange); - break; - case ILCode.Brtrue: - { - SymbolicValue val = Eval(expr.Arguments[0]); - if (val.Type == SymbolicValueType.StateEquals) { - ranges[(ILLabel)expr.Operand].UnionWith(nodeRange, val.Constant, val.Constant); - StateRange nextRange = ranges[body[i + 1]]; - nextRange.UnionWith(nodeRange, int.MinValue, val.Constant - 1); - nextRange.UnionWith(nodeRange, val.Constant + 1, int.MaxValue); - } else if (val.Type == SymbolicValueType.StateInEquals) { - ranges[body[i + 1]].UnionWith(nodeRange, val.Constant, val.Constant); - StateRange targetRange = ranges[(ILLabel)expr.Operand]; - targetRange.UnionWith(nodeRange, int.MinValue, val.Constant - 1); - targetRange.UnionWith(nodeRange, val.Constant + 1, int.MaxValue); - } else { - throw new YieldAnalysisFailedException(); - } - break; - } - case ILCode.Nop: - ranges[body[i + 1]].UnionWith(nodeRange); - break; - case ILCode.Ret: - break; - case ILCode.Stloc: - { - SymbolicValue val = Eval(expr.Arguments[0]); - if (val.Type == SymbolicValueType.State && val.Constant == 0 && rangeAnalysisStateVariable == null) - rangeAnalysisStateVariable = (ILVariable)expr.Operand; - else - throw new YieldAnalysisFailedException(); - goto case ILCode.Nop; - } - case ILCode.Call: - // in some cases (e.g. foreach over array) the C# compiler produces a finally method outside of try-finally blocks - if (forDispose) { - MethodDefinition mdef = GetMethodDefinition(expr.Operand as MethodReference); - if (mdef == null || finallyMethodToStateInterval.ContainsKey(mdef)) - throw new YieldAnalysisFailedException(); - finallyMethodToStateInterval.Add(mdef, nodeRange.ToEnclosingInterval()); - } else { - throw new YieldAnalysisFailedException(); - } - break; - default: - if (forDispose) - throw new YieldAnalysisFailedException(); - else - return i; - } - } - return bodyLength; - } - - enum SymbolicValueType - { - /// - /// int: Constant (result of ldc.i4) - /// - IntegerConstant, - /// - /// int: State + Constant - /// - State, - /// - /// This pointer (result of ldarg.0) - /// - This, - /// - /// bool: State == Constant - /// - StateEquals, - /// - /// bool: State != Constant - /// - StateInEquals - } - - struct SymbolicValue - { - public readonly int Constant; - public readonly SymbolicValueType Type; - - public SymbolicValue(SymbolicValueType type, int constant = 0) - { - this.Type = type; - this.Constant = constant; - } - - public override string ToString() - { - return string.Format("[SymbolicValue {0}: {1}]", this.Type, this.Constant); - } - } - - SymbolicValue Eval(ILExpression expr) - { - SymbolicValue left, right; - switch (expr.Code) { - case ILCode.Sub: - left = Eval(expr.Arguments[0]); - right = Eval(expr.Arguments[1]); - if (left.Type != SymbolicValueType.State && left.Type != SymbolicValueType.IntegerConstant) - throw new YieldAnalysisFailedException(); - if (right.Type != SymbolicValueType.IntegerConstant) - throw new YieldAnalysisFailedException(); - return new SymbolicValue(left.Type, unchecked ( left.Constant - right.Constant )); - case ILCode.Ldfld: - if (Eval(expr.Arguments[0]).Type != SymbolicValueType.This) - throw new YieldAnalysisFailedException(); - if (GetFieldDefinition(expr.Operand as FieldReference) != stateField) - throw new YieldAnalysisFailedException(); - return new SymbolicValue(SymbolicValueType.State); - case ILCode.Ldloc: - ILVariable loadedVariable = (ILVariable)expr.Operand; - if (loadedVariable == rangeAnalysisStateVariable) - return new SymbolicValue(SymbolicValueType.State); - else if (loadedVariable.IsParameter && loadedVariable.OriginalParameter.Index < 0) - return new SymbolicValue(SymbolicValueType.This); - else - throw new YieldAnalysisFailedException(); - case ILCode.Ldc_I4: - return new SymbolicValue(SymbolicValueType.IntegerConstant, (int)expr.Operand); - case ILCode.Ceq: - case ILCode.Cne: - left = Eval(expr.Arguments[0]); - right = Eval(expr.Arguments[1]); - if (left.Type != SymbolicValueType.State || right.Type != SymbolicValueType.IntegerConstant) - throw new YieldAnalysisFailedException(); - // bool: (state + left.Constant == right.Constant) - // bool: (state == right.Constant - left.Constant) - return new SymbolicValue(expr.Code == ILCode.Ceq ? SymbolicValueType.StateEquals : SymbolicValueType.StateInEquals, unchecked(right.Constant - left.Constant)); - case ILCode.LogicNot: - SymbolicValue val = Eval(expr.Arguments[0]); - if (val.Type == SymbolicValueType.StateEquals) - return new SymbolicValue(SymbolicValueType.StateInEquals, val.Constant); - else if (val.Type == SymbolicValueType.StateInEquals) - return new SymbolicValue(SymbolicValueType.StateEquals, val.Constant); - else - throw new YieldAnalysisFailedException(); - default: - throw new YieldAnalysisFailedException(); - } + rangeAnalysis = null; } #endregion @@ -667,10 +357,10 @@ namespace ICSharpCode.Decompiler.ILAst ILBlock ilMethod = CreateILAst(moveNextMethod); if (ilMethod.Body.Count == 0) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); ILExpression lastReturnArg; if (!ilMethod.Body.Last().Match(ILCode.Ret, out lastReturnArg)) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); // There are two possibilities: if (lastReturnArg.Code == ILCode.Ldloc) { @@ -678,14 +368,14 @@ namespace ICSharpCode.Decompiler.ILAst returnVariable = (ILVariable)lastReturnArg.Operand; returnLabel = ilMethod.Body.ElementAtOrDefault(ilMethod.Body.Count - 2) as ILLabel; if (returnLabel == null) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); } else { // b) the compiler directly returns constants returnVariable = null; returnLabel = null; // In this case, the last return must return false. if (lastReturnArg.Code != ILCode.Ldc_I4 || (int)lastReturnArg.Operand != 0) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); } ILTryCatchBlock tryFaultBlock = ilMethod.Body[0] as ILTryCatchBlock; @@ -694,23 +384,23 @@ namespace ICSharpCode.Decompiler.ILAst if (tryFaultBlock != null) { // there are try-finally blocks if (returnVariable == null) // in this case, we must use a return variable - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); // must be a try-fault block: if (tryFaultBlock.CatchBlocks.Count != 0 || tryFaultBlock.FinallyBlock != null || tryFaultBlock.FaultBlock == null) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); ILBlock faultBlock = tryFaultBlock.FaultBlock; // Ensure the fault block contains the call to Dispose(). if (faultBlock.Body.Count != 2) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); MethodReference disposeMethodRef; ILExpression disposeArg; if (!faultBlock.Body[0].Match(ILCode.Call, out disposeMethodRef, out disposeArg)) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); if (GetMethodDefinition(disposeMethodRef) != disposeMethod || !disposeArg.MatchThis()) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); if (!faultBlock.Body[1].Match(ILCode.Endfinally)) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); body = tryFaultBlock.TryBlock.Body; bodyLength = body.Count; @@ -734,39 +424,22 @@ namespace ICSharpCode.Decompiler.ILAst bodyLength--; ILExpression store0 = body.ElementAtOrDefault(bodyLength - 1) as ILExpression; if (store0 == null || store0.Code != ILCode.Stloc || store0.Operand != returnVariable) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); if (store0.Arguments[0].Code != ILCode.Ldc_I4 || (int)store0.Arguments[0].Operand != 0) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); bodyLength--; // don't conside the stloc instruction to be part of the body } // verify that the last element in the body is a label pointing to the 'ret(false)' returnFalseLabel = body.ElementAtOrDefault(bodyLength - 1) as ILLabel; if (returnFalseLabel == null) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); - InitStateRanges(body[0]); - int pos = AssignStateRanges(body, bodyLength, forDispose: false); - if (pos > 0 && body[pos - 1] is ILLabel) { - pos--; - } else { - // ensure that the first element at body[pos] is a label: - ILLabel newLabel = new ILLabel(); - newLabel.Name = "YieldReturnEntryPoint"; - ranges[newLabel] = ranges[body[pos]]; // give the label the range of the instruction at body[pos] - - body.Insert(pos, newLabel); - bodyLength++; - } - - List> labels = new List>(); - for (int i = pos; i < bodyLength; i++) { - ILLabel label = body[i] as ILLabel; - if (label != null) { - labels.Add(new KeyValuePair(label, ranges[label])); - } - } + var rangeAnalysis = new StateRangeAnalysis(body[0], StateRangeAnalysisMode.IteratorMoveNext, stateField); + int pos = rangeAnalysis.AssignStateRanges(body, bodyLength); + rangeAnalysis.EnsureLabelAtPos(body, ref pos, ref bodyLength); + var labels = rangeAnalysis.CreateLabelRangeMapping(body, pos, bodyLength); ConvertBody(body, pos, bodyLength, labels); } #endregion @@ -797,7 +470,7 @@ namespace ICSharpCode.Decompiler.ILAst // Handle stores to 'state' or 'current' if (GetFieldDefinition(expr.Operand as FieldReference) == stateField) { if (expr.Arguments[1].Code != ILCode.Ldc_I4) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); currentState = (int)expr.Arguments[1].Operand; stateChanges.Add(new SetState(newBody.Count, currentState)); } else if (GetFieldDefinition(expr.Operand as FieldReference) == currentField) { @@ -809,18 +482,18 @@ namespace ICSharpCode.Decompiler.ILAst // handle store+branch to the returnVariable ILExpression br = body.ElementAtOrDefault(++pos) as ILExpression; if (br == null || !(br.Code == ILCode.Br || br.Code == ILCode.Leave) || br.Operand != returnLabel || expr.Arguments[0].Code != ILCode.Ldc_I4) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); int val = (int)expr.Arguments[0].Operand; if (val == 0) { newBody.Add(MakeGoTo(returnFalseLabel)); } else if (val == 1) { newBody.Add(MakeGoTo(labels, currentState)); } else { - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); } } else if (expr != null && expr.Code == ILCode.Ret) { if (expr.Arguments.Count != 1 || expr.Arguments[0].Code != ILCode.Ldc_I4) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); // handle direct return (e.g. in release builds) int val = (int)expr.Arguments[0].Operand; if (val == 0) { @@ -828,24 +501,24 @@ namespace ICSharpCode.Decompiler.ILAst } else if (val == 1) { newBody.Add(MakeGoTo(labels, currentState)); } else { - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); } } else if (expr != null && expr.Code == ILCode.Call && expr.Arguments.Count == 1 && expr.Arguments[0].MatchThis()) { MethodDefinition method = GetMethodDefinition(expr.Operand as MethodReference); if (method == null) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); Interval interval; if (method == disposeMethod) { // Explicit call to dispose is used for "yield break;" within the method. ILExpression br = body.ElementAtOrDefault(++pos) as ILExpression; if (br == null || !(br.Code == ILCode.Br || br.Code == ILCode.Leave) || br.Operand != returnFalseLabel) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); newBody.Add(MakeGoTo(returnFalseLabel)); } else if (finallyMethodToStateInterval.TryGetValue(method, out interval)) { // Call to Finally-method int index = stateChanges.FindIndex(ss => ss.NewState >= interval.Start && ss.NewState <= interval.End); if (index < 0) - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); ILLabel label = new ILLabel(); label.Name = "JumpOutOfTryFinally" + interval.Start + "_" + interval.End; @@ -883,7 +556,7 @@ namespace ICSharpCode.Decompiler.ILAst if (pair.Value.Contains(state)) return MakeGoTo(pair.Key); } - throw new YieldAnalysisFailedException(); + throw new SymbolicAnalysisFailedException(); } ILBlock ConvertFinallyBlock(MethodDefinition finallyMethod) @@ -907,6 +580,11 @@ namespace ICSharpCode.Decompiler.ILAst #region TranslateFieldsToLocalAccess void TranslateFieldsToLocalAccess() + { + TranslateFieldsToLocalAccess(newBody, fieldToParameterMap); + } + + internal static void TranslateFieldsToLocalAccess(List newBody, Dictionary fieldToParameterMap) { var fieldToLocalMap = new DefaultDictionary(f => new ILVariable { Name = f.Name, Type = f.FieldType }); foreach (ILNode node in newBody) { diff --git a/src/Libraries/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs b/src/Libraries/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs index 9260b6ba55..818b72b10b 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs +++ b/src/Libraries/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs @@ -19,8 +19,8 @@ using System.Runtime.InteropServices; // If you need to expose a type to COM, use [ComVisible(true)] on that type. [assembly: ComVisible(false)] -[assembly: AssemblyVersion("2.0.0.1595")] -[assembly: AssemblyInformationalVersion("2.0.0.1595-5773d3d2")] +[assembly: AssemblyVersion("2.1.0.1603")] +[assembly: AssemblyInformationalVersion("2.1.0.1603-1170e2f8")] [assembly: NeutralResourcesLanguage("en-US")] [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly", diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/Async.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/Async.cs new file mode 100644 index 0000000000..ccd1222556 --- /dev/null +++ b/src/Libraries/ICSharpCode.Decompiler/Tests/Async.cs @@ -0,0 +1,144 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#pragma warning disable 1998 +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +public class Async +{ + public async void SimpleVoidMethod() + { + Console.WriteLine("Before"); + await Task.Delay(TimeSpan.FromSeconds(1.0)); + Console.WriteLine("After"); + } + + public async void VoidMethodWithoutAwait() + { + Console.WriteLine("No Await"); + } + + public async Task SimpleVoidTaskMethod() + { + Console.WriteLine("Before"); + await Task.Delay(TimeSpan.FromSeconds(1.0)); + Console.WriteLine("After"); + } + + public async Task TaskMethodWithoutAwait() + { + Console.WriteLine("No Await"); + } + + public async Task SimpleBoolTaskMethod() + { + Console.WriteLine("Before"); + await Task.Delay(TimeSpan.FromSeconds(1.0)); + Console.WriteLine("After"); + return true; + } + + public async void TwoAwaitsWithDifferentAwaiterTypes() + { + Console.WriteLine("Before"); + if (await this.SimpleBoolTaskMethod()) + { + await Task.Delay(TimeSpan.FromSeconds(1.0)); + } + Console.WriteLine("After"); + } + + public async void StreamCopyTo(Stream destination, int bufferSize) + { + byte[] array = new byte[bufferSize]; + int count; + while ((count = await destination.ReadAsync(array, 0, array.Length)) != 0) + { + await destination.WriteAsync(array, 0, count); + } + } + + public async void StreamCopyToWithConfigureAwait(Stream destination, int bufferSize) + { + byte[] array = new byte[bufferSize]; + int count; + while ((count = await destination.ReadAsync(array, 0, array.Length).ConfigureAwait(false)) != 0) + { + await destination.WriteAsync(array, 0, count).ConfigureAwait(false); + } + } + + public async void AwaitInLoopCondition() + { + while (await this.SimpleBoolTaskMethod()) + { + Console.WriteLine("Body"); + } + } + + public async Task AwaitInForEach(IEnumerable> elements) + { + int num = 0; + foreach (Task current in elements) + { + num += await current; + } + return num; + } + + public async Task TaskMethodWithoutAwaitButWithExceptionHandling() + { + try + { + using (new StringWriter()) + { + Console.WriteLine("No Await"); + } + } + catch (Exception) + { + Console.WriteLine("Crash"); + } + } + + public async Task NestedAwait(Task> task) + { + return await(await task); + } + + public async Task AwaitWithStack(Task task) + { + Console.WriteLine("A", 1, await task); + } + + public async Task AwaitWithStack2(Task task) + { + if (await this.SimpleBoolTaskMethod()) + { + Console.WriteLine("A", 1, await task); + } + else + { + int num = 1; + Console.WriteLine("A", 1, num); + } + } +} diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj b/src/Libraries/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj index 52a4f950da..69598ac73f 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/src/Libraries/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj @@ -7,7 +7,7 @@ Library ICSharpCode.Decompiler.Tests ICSharpCode.Decompiler.Tests - v4.0 + v4.5 Properties True False @@ -15,6 +15,7 @@ false False 67,169,1058,728,1720,649 + x86 @@ -62,6 +63,7 @@ + diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs index bdc4f7dd1f..9b3d165893 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs +++ b/src/Libraries/ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs @@ -24,7 +24,7 @@ public class PropertiesAndEvents public event EventHandler AutomaticEvent; [field: NonSerialized] - public event EventHandler AutomaticEventWithInitializer = delegate + public event EventHandler AutomaticEventWithInitializer = delegate(object sender, EventArgs e) { }; diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/TestRunner.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/TestRunner.cs index 8160a7376d..52a03a4623 100644 --- a/src/Libraries/ICSharpCode.Decompiler/Tests/TestRunner.cs +++ b/src/Libraries/ICSharpCode.Decompiler/Tests/TestRunner.cs @@ -34,6 +34,12 @@ namespace ICSharpCode.Decompiler.Tests [TestFixture] public class TestRunner { + [Test] + public void Async() + { + TestFile(@"..\..\Tests\Async.cs"); + } + [Test, Ignore("disambiguating overloads is not yet implemented")] public void CallOverloadedMethod() { From 9345aa7cc9dad00f873e8ae341943b7c2a080b7e Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 5 Jun 2012 19:53:09 +0200 Subject: [PATCH 22/22] update translations --- data/resources/StringResources.de.resx | 17 +- data/resources/StringResources.it.resx | 37 +- data/resources/StringResources.nl.resx | 54 +- data/resources/StringResources.resx | 43 +- data/resources/StringResources.tr.resx | 3191 +++++++++++++++++------- 5 files changed, 2484 insertions(+), 858 deletions(-) diff --git a/data/resources/StringResources.de.resx b/data/resources/StringResources.de.resx index bc5f5117f2..25972a7c0c 100644 --- a/data/resources/StringResources.de.resx +++ b/data/resources/StringResources.de.resx @@ -1498,6 +1498,12 @@ Beispiele: "120", "MainClass", "Main.cs, 120". Kursiv + + Hervorhebungsfarben exportieren + + + Hervorhebungsfarben importieren + Wert @@ -2181,11 +2187,14 @@ Wollen Sie die neue Datei zum Projekt ${CurrentProjectName} hinzufügen? Deaktiviert - Markierungen und Liniale + Markierungen Markierungen und Liniale + + Lineale + Verdeckte Definitionen anzeigen (nur geschweifte Klammern) @@ -5393,6 +5402,12 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension< Kommandozeile hier öffnen + + Ziel-Frameworks wählen + + + Konnte die Portable Class Library Tools nicht finden. + Alle Knoten einklappen diff --git a/data/resources/StringResources.it.resx b/data/resources/StringResources.it.resx index 4642534ac8..fe19da92bd 100644 --- a/data/resources/StringResources.it.resx +++ b/data/resources/StringResources.it.resx @@ -1860,6 +1860,9 @@ Vuoi aggiungere il nuovo file al progetto ${CurrentProjectName}? Stepping + + Decompila codice senza simboli + Usa 'Just My Code' per debug passo-passo @@ -3692,7 +3695,7 @@ ${File} Proprietà Griglia - A&ltezza + &Altezza Abilita modifica in-linea dei ToolStrips @@ -4011,6 +4014,9 @@ Sono ammesse solo lettere, numeri, spazi, '.' o '_'. Il token di chiave pubblica + + Referenzia assembly + Versione Specifica @@ -4056,6 +4062,9 @@ Sono ammesse solo lettere, numeri, spazi, '.' o '_'. Caricamento ${Filename}... + + Chiudi soluzione + Mantieni aperta la vecchia soluzione @@ -4089,6 +4098,13 @@ Sono ammesse solo lettere, numeri, spazi, '.' o '_'. Aggiorna Progetto + + Il progetto '${ProjectName}' usa MSBuild ${OldToolsVersion}, ma questa versione non è installata. +Vuoi aggiornare il progetto a MSBuild ${NewToolsVersion}? Il progetto non può essere aperto senza essere aggiornato. + + + Aggiorna a MSBuild ${NewToolsVersion} + Questa soluzione è stata creata con una versione precedente di SharpDevelop. Potresti volerla aggiornare così da utilizzare le nuove funzionalità del linguaggio o del framework. @@ -4169,7 +4185,7 @@ Vai a 'Opzioni->Stile visuale' e cambia l'attuale ambiente di linguaggio.ASP.NET/IIS (Express) worker process ({0}) non trovato. - Non è stato specificato nessun Url di Progetto o programma esterno. Controlla il web server su Proprietà Progetto - Debug. + Non è stato specificato nessun Url di Progetto o programma esterno. Controlla il web server sulla linguetta Proprietà Progetto - Web. Porta server: @@ -4788,7 +4804,7 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension< Non si può passare ad una funzione senza simboli di debug. - Non puoi passare ad una funzione senza simboli senza attivare le opzioni di decompilazione del codice. + Non puoi passare ad una funzione senza simboli. Ricompila con i simboli o attiva "Decompila codice senza simboli" nelle opzioni. [Metodi esterni] @@ -4946,6 +4962,9 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension< Copia il valore negli Appunti + + Nome + Membro Non-Pubblico @@ -4967,6 +4986,12 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension< Membri statici + + Tipo + + + Valore + Memoria @@ -5006,12 +5031,18 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension< Indirizzo + + (dinamico) + Nessun simbolo caricato. Simboli caricati. + + (in memoria) + Ordine diff --git a/data/resources/StringResources.nl.resx b/data/resources/StringResources.nl.resx index 5660fe197f..c72858459a 100644 --- a/data/resources/StringResources.nl.resx +++ b/data/resources/StringResources.nl.resx @@ -1501,6 +1501,12 @@ Voorbeelden: "120", "MainClass", "Main.cs, 120". Cursief + + Selectie kleuren expoorteren + + + Selectie kleuren importeren + Waarde @@ -2184,11 +2190,14 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}? Geen - Markeringen en Linealen + Markeringen Markeringen en Linealen + + Linealen + Toon &verborgen definities(alleen haakjes) @@ -2355,7 +2364,7 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}? 32 bit Intel-compatibele processor - Doel Framework: + Doel raamwerk: Behandel waarschuwingen als fouten @@ -3046,7 +3055,7 @@ Er kan worden gekozen voor opslag van de instellingen in het .user bestand inpla Bezig met Code Analyse... - Onbekend doel Mono Framework Versie: + Onbekend doel Mono Raamwerk Versie: Code Analyse @@ -4090,7 +4099,7 @@ Alleen letters, getallen, spatie, '.' of '_' zijn toegestaan. Converteer geselecteerde &projecten naar - Wijzig doel framework + Wijzig doel Raamwerk: Versie van geselecteerde projecten wijzigen @@ -4105,7 +4114,7 @@ Alleen letters, getallen, spatie, '.' of '_' zijn toegestaan. <niet wijzigen> - Doel framework + Doel Raamwerk Project opwaarderen @@ -4119,7 +4128,7 @@ Zonder opwaarderen kan het project niet geopend wordenh. Opwaarderen naar MSBuild ${NewToolsVersion} - Deze oplossing werd met een vorige versie van SharpDevelop gemaakt. Door te upgraden kan gebruik gemaakt worden van nieuwe taal of framework mogelijkheden. + Deze oplossing werd met een eerdere versie van SharpDevelop gemaakt. Door te upgraden kan gebruik gemaakt worden van nieuwe taal- of raamwerk mogelijkheden. Momentele ambience niet gevonden. @@ -4427,7 +4436,7 @@ Microsoft.Tools.WindowsInstallerXml.Extenties.NetFxCompiler, WixNetFxExtentieWiX localisatie bestanden - .NET Framework uitbreiding + .NET Raamwerk uitbreiding Geen verschil gevonden. @@ -5383,6 +5392,27 @@ Microsoft.Tools.WindowsInstallerXml.Extenties.NetFxCompiler, WixNetFxExtentie Open hier de commando prompt + + Selecteer doel-raamwerken. + + + Kan Portable Klasse-bibliotheek gereedschap niet vinden. + + + .NET Portable subset + + + Er moeten tenminste twee raamwerken worden geselecteerd. + + + Gekozen profiel: + + + Kies een Portable Bibliotheek profiel. + + + Om de portabele Klassebibliotheek gereedschappen te installeren zonder Visual Studio te installeren, sla het download bestand op (PortableLibraryTools.exe) op uw computer en voer de installatie uit via de commndoregel. Inclusief de /bouwmachine schakeling op de commandoregel. + Alle knooppunten invouwen @@ -6639,6 +6669,12 @@ De hulpbron bestanden zijn hernoemd/verplaatst op de beschreven wijze. Gtk# toepassing + + Bibliotheek, bruikbaar bij Windows, Silverlight, Windows Phone en Xbox. + + + Portable Klassen-bibliotheek + Windows installatie project om een MSI installatie programma te maken. @@ -6790,7 +6826,7 @@ De hulpbron bestanden zijn hernoemd/verplaatst op de beschreven wijze. Ontkoppel - Kan .NET Framework versie van het programma niet krijgen. Ga na of het programma een beheerde assembly is. + Kan .NET Raamwerk versie van het programma niet oproepen. Ga na of het programma een gemanagede assembly is. Kan niet bij proces aanhaken. @@ -6805,7 +6841,7 @@ De hulpbron bestanden zijn hernoemd/verplaatst op de beschreven wijze. Kan SharpDevelop foutopsporing niet starten omdat kernel foutopsporing is aangezet. Om de kernel foutopsporing uit te zetten, dient de schakeling "/debug" uit bestand Boot.ini verwijderd te worden en de computer opnieuw te worden opgestart. - Foutopsporing bij .NET Framework 1.0 programmas is niet ondersteund. + Foutopsporing bij .NET Raamwerk 1.0 programmas is niet ondersteund. Kan actie niet uitvoeren omdat er geen foutopsporing van een proces plaatsvindt. diff --git a/data/resources/StringResources.resx b/data/resources/StringResources.resx index f0096690f8..349f8aafef 100644 --- a/data/resources/StringResources.resx +++ b/data/resources/StringResources.resx @@ -1550,6 +1550,12 @@ Examples: "120", "MainClass", "Main.cs, 120". Italic + + Export highlighting colors + + + Import highlighting colors + Value @@ -2256,11 +2262,14 @@ system. I don't think that it needs translation. None - Markers and Rulers + Markers Markers and Rulers + + Rulers + Show &hidden definitions (brackets only) @@ -5698,6 +5707,32 @@ Removed the end part of the original message ", reason '${Message}'" since this Open command prompt here + + choose target frameworks + Option in the "target framework" combobox in the "project upgrade" view that causes the "select portable profile" dialog to appear + + + Could not find Portable Class Library Tools. + + + .NET Portable Subset + Name for the portable target framework, shown in Project Upgrade view + + + Two or more frameworks must be selected. + Label shown when only 0 or 1 frameworks are selected + + + Selected profile: + Label that shows the selected portable library profile + + + Select Portable Library Profile + Title of the dialog used to pick the target frameworks for a portable library project + + + To install the Portable Class Library Tools without installing Visual Studio, save the download file (PortableLibraryTools.exe) on your computer, and run the installation program from a Command Prompt window. Include the /buildmachine switch on the command line. + Collapse all nodes @@ -7012,6 +7047,12 @@ The resources files have been renamed/moved accordingly. Gtk# Application Name of Gtk# project template. + + Library that can be used on Windows, Silverlight, Windows Phone, and Xbox. + + + Portable Class Library + A windows installer project for creating a MSI installer. diff --git a/data/resources/StringResources.tr.resx b/data/resources/StringResources.tr.resx index 87df334241..fc6118ebe1 100644 --- a/data/resources/StringResources.tr.resx +++ b/data/resources/StringResources.tr.resx @@ -127,13 +127,13 @@ Kurulumu iptal et - Güncelleştirmeyi durdur + Güncellemeyi iptal et - Etkisiz kıl + Etkisiz - Etkinleştir + Etkin Yükle @@ -145,49 +145,49 @@ Güncelle - Bu eklenti için gerekli bir alt parça bulunamadı. Eklentiyi aktifleştirebilmek için gereken alt parçayı yüklemelisiniz. + Bu eklenti için bir bağımlılık bulunamadı. Eklentiyi kullanabilmek için yüklemelisiniz. - Etkisiz kılınmış + Etkisiz - Eklenti SharpDevelop yeniden başlatıldıktan sonra etkinleştirilecektir. + Eklenti SharpDevelop yeniden başlatıldıktan sonra kullanılabilir. Eklenti SharpDevelop yeniden başlatıldıktan sonra yüklenecektir. - Bu eklenti iki kez kurulmuştur. Lütfen birini kaldırın. + Bu eklenti iki kez kurulmuş. Lütfen birini kaldırın. Eklentinin Eklenti Yöneticisi tarafindan kullanılmasi için bir <Identity> si olmalıdır - Eklenti SharpDevelop yeniden başlatıldığında kaldırılacaktır. + Eklenti SharpDevelop yeniden başlatıldığında kaldırılacak. - Eklenti SharpDevelop yeniden başlatıldığında güncellenecektir. + Eklenti SharpDevelop yeniden başlatıldığında güncellenecek. - Eklenti SharpDevelop yeniden başlatıldığında etkisiz hale gelecektir. + Eklenti SharpDevelop yeniden başlatıldığında etkisiz olacak. - Eklenti yöneticisini etkisizleştiremezsiniz çünkü eklentileri yeniden etkinleştirmelisiniz. + Eklenti yöneticisini devre dışı bırakamazsınız çünkü eklentileri yeniden etkinleştirmelisiniz. - ${ProductName} dizinin içine eklenti yükleyemezsiniz,eklentiler otomatik olarak ön yüklemeli olarak algılanacaktır. + ${ProductName} dizini içine eklenti yükleyemezsiniz, eklentiler otomatik ön yüklemeli olarak algılanacaktır. - Seçili eklentilerin kaldırılmasını iptal eder. + Seçili eklenti(ler)in kaldırılmasını iptal eder. - Seçili eklentilerin kurulumunu iptal eder. + Seçili eklenti(ler)in kurulumunu iptal eder. - Seçili eklentilerin güncelleştirilmesini iptal eder. + Seçili eklenti(ler)in güncelleştirilmesini iptal eder. - Seçili eklentiyi etkisiz kılar. + Seçili eklentiyi etkisizleştirir. Seçili eklentiyi etkinleştirir. @@ -196,20 +196,20 @@ Seçim tutarsız, lütfen sadece aynı durumdaki eklentileri seçin. - Eklenti yükleme paketi + Eklenti Yükleme Paketi - SharpDevelop Eklentileri|*.addin;*.saddin|All files|*.* + SharpDevelop Eklentileri|*.addin;*.sdaddin|All files|*.* - Eklenti &Kur + Eklenti Kur Kurulu eklenti bulunmamaktadır. -İnternetten eklenti indirin, 'Eklenti kur' seçeneğine tıklayın ve bunu kurmak için indirdiğiniz dosyayı seçin. +İnternetten eklenti indirin, 'Eklenti kur' seçeneğine tıklayın ve kurmak için indirdiğiniz dosyayı seçin. - Web sayfasını aç + Web Sitesi Aç Seçenekler @@ -221,13 +221,34 @@ Gerekli bağımlılıklar: - Kurulu eklentileri göster + Önyüklenmiş eklentileri göster Eklenti Yöneticisi - Tanımlanamayan dosya biçimi: + Bilinmeyen dosya biçimi: + + + Bu dosya tutarsız satırlar içeriyor. + + + Tutarsız Satırlar + + + Standartlaştırma + + + Hata: + + + Sonrakini bul + + + Öncekini bul + + + Düzenli ifadeler kullanın Sınıf Şemasını Göster @@ -250,20 +271,29 @@ Yardım Modu + + Seçilen veya yüklü bir yardım kataloğu olmadığından, Kütüphane Yöneticisi Yardımı başlatılamıyor. Yardım ayarlarınızı kontrol ediniz(Araçlar> Seçenekler> Araçlar> Microsoft Yardım Görüntüleyicisi). + + + Kütüphane Yöneticisi Yardımı bulunamadı. Doğru yüklenmiş olup olmadığını kontrol ediniz. + Yüklü Yardım Katalogları + + Kütüphane Yöneticisi Yardımını Başlatınız + Microsoft Yardım Görüntüleyici - Çevrimiçi yardım modunda çevrimdışı bir özellik kullanmaya çalıştın. Bu özelliği kullanabilmek için yardım modunu değiştirmelisin. + Çevrimiçi yardım modunda çevrimdışı bir özellik kullanmaya çalıştınız. Bu özelliği kullanabilmek için yardım modunu değiştirmelisiniz. Ara - Ne için: + Bakın: Arama @@ -281,7 +311,7 @@ Çevrimiçi yardımı kullanmak istiyorum - Tek satırdaki bayt + Satır başına bayt değeri Gösterim @@ -290,13 +320,22 @@ Veri - Ofset + Denkleştirme Sayısal sistem + + Ondalık + + + Onaltılık + + + Sekizlik + - Geçerli genişliğe sığdırmak için boyutlandır + Mevcut genişliğe uygun boyutlandır Geri @@ -314,7 +353,7 @@ Ana sayfa - Yer + Konum Yeni Pencere @@ -329,34 +368,37 @@ Başlık - Sonuçlar + Sonuç - Birleşik Parçalar + Birleştirilmiş Düğümler - {0} için olan tüm fonksiyonlar + {0} için tüm fonksiyonlar - Seçili SharpDevelop profil oturumu yeni bir SharpDevelop sürümü ile oluşturulmuş ve açılamıyor. + Seçili SharpDevelop oturum profili yeni bir SharpDevelop sürümü ile oluşturulmuş ve açılamıyor. SharpDevelop Profil Oturumu - Çalıştırılabilir dosya bulunamadığı için proje başlatılamadı, lütfen projenin kendisinin ve tüm bağlantılarının doğruluğundan emin olunuz. + Çalıştırılabilir dosya bulunamadığı için proje başlatılamadı, lütfen projenin kendisinin ve tüm bağlantılarının doğruluğundan emin olunuz! - Açılabilir bir proje bulunamadı. İptal ediliyor... + Başlatılabilir proje bulunamadı. Durduruluyor... + + + Bu proje başlatılamıyor.Yerine Çözüm Başlangıç &#8203;&#8203;projesi profili istiyor musunuz? Analiz için hazırlanıyor... - COM kayıt istemcisine profil kaydı girilemedi. Profilleme başlatılamıyor. + COM kayıt defterine profil kaydı girilemedi. Profilleme başlatılamıyor! - COM kayıt istemcisinden profil kaydı silinemedi! + COM kayıt defterinden profil kaydı silinemedi! Profil @@ -365,28 +407,52 @@ Yinelenen çağrıları birleştir. - İç .NET çağrılarını profilleme. + Dahili .NET çağrıları profili yok. - Verileri sadece bu oturumun sonunda derle. + Verileri sadece bu oturumun sonunda kaydet. - Verilerin derlenmesini hemen oturum açılınca başlat. + Verileri oturum açılınca kaydetmeye başla. Veri Koleksiyonu - Geçici depolama dosyasının boyutu: + Geçici depolama dosyası boyutu: - Olayları takip et + Olayları izle Profilleme + + Aktif proje profili + + + Çalıştırılabilir profil seç + - Veri geçersiz, lütfen tekrar deneyin. + Veri geçersiz, lütfen tekrar deneyin! + + + Komut satırı argümanları: + + + İstediğiniz profildeki çalıştırılabilir yolu seçin. İsteğe bağlı olarak, çalışan bir dizin ve komut satırı argümanlarını da belirtebilirsiniz. + + + Çalıştırılabilir yol: + + + Profilleme başlat + + + Çalıştırılabilir Profil + + + Çalışma dizini: Veri topla @@ -394,41 +460,176 @@ Kapat + + Profil kontrol penceresi + + + Çağrı say + + + Çağrılar: + + + Açık sorgu geçmişi + + + Seçilen veriyi kopyala + + + Yığın izi kopyala + + + Seçili fonksiyon çağrılarını bul + + + Tanıma git + + + Root/Birleştir olarak ayarla + + + Fonksiyonları göster + + + CPU döngüleri: + + + Sorgu çalıştırma + + + Seçilen yeni yolu genişletin + Ad + + Genel bakış + + + Sorgu Geçmişi + Ara: + + Sorgu çubuğunu göster + + + Ebeveynin % + Geçen süre + + Geçen süre/çağrı + + + Geçen süre(özel) + + + Geçen süre(özel)/çağrı + - Süre: + Zaman: + + + Oturum Profilleme Analizcisi + + + En iyi 20 + + + Görüntü yenileniyor, Lütfen bekleyiniz ... + + + Profilci ile çalıştır - Ara... + Aranıyor ... + + + Ayarlayıcı ekle + + + Özelliklerini oluşturmak istediğiniz alanları seçin: + + + INotifyÖzellikleriDeğişti Uygula + + + Özellikler oluştur - Çıkartma yöntemi + Çıkarma yöntemi + + + Seçilen kod kapatılmamış bir döngüde, break ifadesi içeriyor. Lütfen seçiminizi değiştiriniz! + + + Seçilen kod kapatılmamış bir döngüde continue ifadesi içeriyor. Lütfen seçiminizi değiştiriniz! + + + Seçilen kod, etiketi olmayan bir goto deyimi içeriyor. Lütfen seçiminizi değiştiriniz! - Yeni yöntem için bir isim girin + Yeni yöntem için bir ad girin - Geçersiz oturum! Lütfen geçerli bir aralık seçin. + Geçersiz seçim! Lütfen geçerli bir aralık seçin. - Ayırma işlemi sırasında hata oluştu! Yeni bir yöntem açılamadı. + Ayrıştırma sırasında hatalar oluştu!Yeni bir yöntem çıkartılamaz. - {0} içinden çıkarım yöntemi desteklenmemektedir! + {0} içinden çıkartma yöntemi şu anda desteklenmemektedir! + + + Yapılandırıcı ekle + + + Boşluk kontrolü ekle + + + Aralık kontrolü ekle + + + Bununla birlikte bir yapılandırıcı oluşturmak istiyorsanız tüm alanları seçin: Değişken + + {1} deki {0} yöntemini tanıtma + + + Geçersiz Equals() ve GetHashCode() + - Arayüz ekle {0} + {0} arayüz ekle + + + Aşırı yükleme operatörü ekle + + + ${otherMethod} geçersiz ekleme + + + #region ile çevrili + + + Geçersiz ToString() + + + ToString() kullanmak istediğiniz alanları seçiniz: + + + Nitelik dönüştür:{0} + + + {0} uzantı yöntemini dönüştür + + + StyleCop ile mevcut projeyi kontrol et StyleCop ile Kontrol Et @@ -439,17 +640,32 @@ Engelleme listesine ekle + + Kusur + + + Branş/Etiket + + + Bu altsürümün durumu '{0}' olduğundan, dosya / dizin kopyalanamaz. + + + Bu altsürümün durumu '{0}' olduğundan, dosya / dizin taşınamaz. + + + Bu altsürümün durumu '{0}' olduğundan, dosya / dizin silinemez. + - Modifikasyonlara bak + Değişiklikleri kontrol et - Çıkış + Kontrol et Temizle - Gönder + İşle Yama oluştur @@ -464,10 +680,10 @@ Çakışmaları düzelt - ${File} silinme hatası + ${File} silme hatası - Aktar + Dışa Aktar Hızlı sil @@ -475,23 +691,41 @@ Geçmiş + + '{0}' yasaklı listesinden çıkarıldı. + + + Kilitleme + + + Uyumsuzlukları çözülmüş olarak işaretle + Birleştir - Yeni dosyaları otomatik olarak &ekle + Yeni dosyaları kendiliğinden ekle - Kaldırılan dosyaları otomatik olarak sil + Kaldırılan dosyaları kendiliğinden sil + + + Proje dosya(lar)ı değiştiğinde projeyi güncelle + + + Altsürümdeki dosyaları(geçmiş kaydı) yeniden adlandır - Yansürüm Ayarları + Altsürüm seçenekleri + + + Sürüm kontrollü dosyalar için geçmiş sekmesini göster - Yerleştir + Tekrar yerleştir - Yoksayma listesinden kaldır + Yasaklı listesinden kaldır Dosya bu konuma taşındı, gerçekten silmek istiyor musunuz? @@ -503,10 +737,10 @@ Geri al - Bu dosyada yerel değişiklikler yapılmış. Silmek istiyor musunuz? + Bu dosyada bazı değişiklikler yapılmış. Geri almak istiyor musunuz? - Kontrol grafiği + Düzeltme grafiği Dosyaları kaydet @@ -520,27 +754,122 @@ Değiştir + + Bu eylemi yürütmek için TortoiseSVN yüklü olması gerekmektedir. + Güncelle - Kontrolü yenile + Düzeltmeleri güncelle - Katılımınız için teşekkürler. İstediğiniz zaman SharpDevelop seçeneklerini kullanarak çıkabilirsiniz. + Katılımınız için teşekkürler! İstediğiniz zaman SharpDevelop seçeneklerini kullanarak çıkabilirsiniz. - Katılmak istiyorum. Kullanım bilgilerini topla ve gönder + Katılmak istiyorum - Kullanım bilgilerini topla ve gönder + + + Daha sonra SharpDevelop seçeneklerinden ulaşabilirsiniz. Katılmak istemiyorum - Yardım talep ediyoruz! SharpDevelop'ı gelecekte de geliştirebilmek için; En çok kullanılan özelliklerinin hangileri olduğunu bilmek istiyoruz. + Sizden yardım bekliyoruz! SharpDevelop'u geliştirebilmek için; en çok kullanılan özelliklerin hangileri olduğunu bilmek istiyoruz. SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. + + Gizlilik Bildirimi + + + Toplanan verileri göster + + + Veri Toplayıcı Kullanımı + + + SharpDevelop'un başlatıcıya dayalı şekillendirmesine izin verme. + + + Izgara sütun ve satır düzenleme + + + Stil özelliklerini çıkartma + + + Geçerli bir öğe seçilmedi! + + + Özellik/Olay Adı + + + Seçilen kontrolün zaten atanmış bir stili var. +Oluşturulan stili yenisiyle değiştirmek istiyor musunuz? + + + Stil adı: + + + Özellik Değeri + + + Grup içine + + + Kenarı kaldır + + + Gereksiz özellikleri kaldır + + + <yeni olay işleyicisi> + + + Kod tamamlama + + + Olay rengi: + + + Olay işleyici desen adı: + + + XAML vurgulayıcı tarafından kullanılması gereken renkleri seçin: + + + Vurgulama + + + Yok Sayılan eleman rengi: + + + XML ad alanı bildirimi rengi: + + + Özellik rengi: + + + Yeni olay işleyicisi yerleştirildikten sonra kodu değiştirme + + + XAML + - Uzantu tamamlamasını kullan + Uzantı tamamlama biçimi kullan + + + Gelişmiş vurgulama kullan + + + Dosya geçerli kodlama ${encoding} ile veri kaybı olmadan kaydedilemez. + + + + Devam + + + UTF-8 olarak kaydet Proje dll olarak yapılandırılmış ve hiç bir yürütme komutu belirtilmemiş. Proje seçeneklerinden bir yürütme komutu belirtebilirsiniz. @@ -558,10 +887,13 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. Hakkında - Versiyon: + Sürüm: + + + Çeşit - &Nesneyi Kopyala + Nesneyi Kopyala Metni kopyala @@ -570,11 +902,14 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. Metin Değerini Kopyala - Objeyi kes + Nesneyi kes Olay Kaydetme + + Tasarım Görünüşü + Nesneyi yapıştır @@ -587,8 +922,11 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. Favorilerimden çıkar + + TypeLib Kaldır + - Açılmış Bileşkeler + Açılmış Derlemeler İliştirmede hata; işlem no {0}. @@ -597,22 +935,31 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. İşlem - Ekle + İliştir Tür bulunamadı - {0} türü, şu anda açık tümleşkelerin herhangi birinde bulunamadı. + {0} türü, şu anda açık çevirmelerin herhangi birinde bulunamadı. + + + Tipi + + + Tip - Çevir + Tipi - Çevrim türünü belirlemede hata + Tip türü belirlemede hata. + + + Tipi oturum boyunca hatırla? - Çevrim türü nesnenin türüyle uyumsuz. + Tip türü, nesnenin türüyle uyumsuz. Bileşen Kategorileri @@ -624,13 +971,16 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. Arayüzler - COM Nesneleri + Çalışan COM Nesneleri + + + Favori/Son Erişilen Kütüphane Türleri Tür Kütüphaneleri - OK tuşuna bastıktan sonra, eğer parametreli bir kurucu seçerseniz, lütfen parametreleri doldurun ve bu nesnenin nerede oluşturulmasını istiyorsanız, seçili kurucuyu oraya sürükleyin. + Eğer parametrelerle bir kurucu seçerseniz, OK tuşuna bastıktan sonra, lütfen parametreleri doldurun ve bu nesnenin nerede oluşturulmasını istiyorsanız, seçili kurucuyu oraya sürükleyin. Bir Kurucu Seç @@ -639,31 +989,37 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. Kontroller - Nesne oluştur + Nesne Oluştur Uygulama Çalışma Dizini + + ActiveX Dönüşüm Derlemeleri + Dizinler - COM özelliklerini otomatik al + COM özelliklerini kendiliğinden al + + + Başlangıçta Çalışan COM Nesnelerini Al Diğer - Taban nesne adlarını göster + Temel sınıf adlarını göster Göster - Temel sınıf kategorisindeki nesne değişkenlerini göster + Temel sınıf kategorisindeki nesne üyelerini göster - Sadece Public üyeler + Sadece public üyeler Kısa Bilgilendirme @@ -678,7 +1034,7 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. Hepsini sil - &Sil + Sil Olay @@ -690,30 +1046,33 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir. Olay Kaydı - Çık + Artır Herhangi bir olayı kayıt etmiyorsunuz. -Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya sağ tuşa basabilir yada Eylem menüsünden olay kaydetmeyi aktifleştirebilirsiniz. +Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya sağ tuşa basabilir yada Eylem menüsünden olay kaydetmeyi etkinleştirebilirsiniz. Parametreler + + Tüm Günlüğü Durdur + - Kaydetmeyi Kes + Kaydetmeyi Durdur - Saat + Zaman Tüm seviyeler - Tümleşkeler/Türler + Derlemeler/Türler - İçeren + İçerir Bul @@ -722,7 +1081,7 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya İçinde Bul - Bul: + Aranan: Öğe @@ -740,7 +1099,7 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya Bakılıyor: - Aranan + Benzer Bulunamadı @@ -767,7 +1126,7 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya Nesne ağacında arama yaparken İsim yada Değerden en az birini seçin. - {0} ağacından bir boğum seçmek zorundasınız; arama bu boğumdan başlayacak. + {0} ağacından bir düğüm seçmek zorundasınız; arama bu düğümden başlayacak. Öğeyi Göster @@ -785,26 +1144,29 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya Kültür - Global Bileşke İsmi + Genel Derleme İsmi - &Aç + - Umumi Anahtar + Genel Simge Anahtarı - Versiyon + Sürüm - COM özelliklerini otomatik getir + COM özelliklerini kendiliğinden al - Başlangıçta çalışan COM nesnelerini getir + Başlangıçta çalışan COM nesnelerini al Paneller + + Derleme Panelini Göster + Kontrol Panelini Göster @@ -812,7 +1174,7 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya GAC Panelini Göster - Özelliği Getir + Özelliği al Denetleyici herhangi bir ActiveX/COM nesnesini gösterebilir yada işletebilir. @@ -823,10 +1185,10 @@ ActiveX/COM sekmesinden yüklü COM bileşenlerine göz atın. Aç menüsünü kullanarak bir tür kütüphanesi yada kontrol dosyası açın. -To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control to the object tree or design surface. +Bir ActiveX / COM nesnesi oluşturmak / değiştirmek için, nesne ağacı veya tasarım yüzeyine, TürKütüphanesi/Kontrol içinden bir sınıf sürükleyin. - Bu Diyaloğu göster + Bu iletişimi göster Başlarken @@ -835,10 +1197,10 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Tasarım Yüzeyi Kontrolü - Tasarım Kipi + Tasarım Modu - Tümleşkeyi Kapat... + Derlemeyi Kapat... Bul... @@ -847,13 +1209,13 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Nesne Ağacı - Bileşke Aç... + Derleme Aç... Tür İşleyiciler - İşlevi Çağır + Yöntemi Çağır Denetleyici @@ -867,20 +1229,26 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Parametreler + + Üst Düzey Nesneler + Değer + + Eylem + ActiveX Dosyaları - Bileşke Dosyaları + Derleme Dosyaları İzleme... - &Dizinler... + Dizinler... Nesne Ağacı... @@ -889,7 +1257,7 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Açmak için Dosya Seçin - &Seçenekler + Seçenekler Paneller @@ -900,23 +1268,26 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control İzleme... + + Tür Eylemcileri... + Kategoriler - Üyelerin sayısı geçerse + Üye sayısını aştığında - Sayıları hex olarak göster + Onaltılık tamsayılar - Taban nesne kategorilerini göster + Temel sınıf kategorilerini göster - Taban sınıf üyeleri + Temel sınıf üyeleri - Taban nesne adları + Temel sınıf adları Olaylar @@ -934,16 +1305,19 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Üyeleri Göster - İşlevler + Yöntemler - Taban sınıf kategorisindeki nesne üyelerini göster + Temel sınıf kategorisindeki nesne üyelerini göster Nitelikler - Nitelik/Olay erişim işlevleri + Özellik/Olay erişim yöntemleri + + + Sadece public üyeler Çıktı @@ -952,16 +1326,16 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control nesne seç - (metinleri boşluk ile ayr) + (metinleri boşluk ile ayır) değer - Çalışır COM bileşeni ekleme + Çalışan COM Nesneleri Ekleme - Çalışan COM nesneleri eklernirken bekleyin. + Çalışan COM nesneleri eklenirken bekleyin. {0} Bilgisi Alınıyor @@ -970,25 +1344,25 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Lütfen {0} bilgisi alınırken bekleyin - Hatırlanan Bileşkeler Yükleniyor + Hatırlanan Derlemeler Yükleniyor - Daha önceden açılan bileşkeleri yüklerken bekleyin. + Daha önceden açılan derlemeleri yüklerken bekleyin. - Sistem kütüğü + Sistem kaydı - Alanı Ata + Alanı Ayarla - Nitelik Ata + Özelliği Ayarla Bileşen Denetleyicisi - İzleme Seviyesini Ata + İzleme Seviyesini Ayarla İzleme Seviyesi @@ -997,19 +1371,25 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Ad - Tür İşleyiciler, aşağıda işaretli sınıfların, gereksiz detaylarını gizleyip, daha uygun bir şekilde sunar. + Tür eylemcileri, aşağıda işaretli sınıfların, gereksiz detaylarını gizleyip, daha uygun bir şekilde sunar. - Uygulamanın başlatılması bekleniyor. Eğer uygulama başlatılamazsa(yada beklemekten ayaklarınıza kara sular inerse), İptal tuşuna basarak iptal edebilirsiniz. + Uygulamanın başlatılması bekleniyor. Eğer uygulama başlatılamazsa(veya beklemekten sıkılırsanız), iptal tuşuna basarak iptal edebilirsiniz. - Uygulamanın başlaması için bekleniyor + Uygulamanın Başlatılması Bekleniyor + + + Kod Kalite Analizi + + + Açık yönteme referans ekleyin; yeni yöntem eklemek için tab veya enter tuşuna tekrar basın. - Parametre almayan anonim metot yerleştir. + Parametresiz anonim yöntem yerleştir. - Parametre alan anonim metot yerleştir. + Parametreli anonim yöntem yerleştir. SharpDevelop Hakkında @@ -1018,16 +1398,16 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Sürüm - Oluştur + Derleme - ${License} lisansı altında dağıtılmıştır. + ${License} altında dağıtılmıştır. Sürüm Bilgisi - &Kopyala + Kopyala Sürüm @@ -1039,16 +1419,61 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control son projeler - &Tümünü at + Tümünü at - Tümünü &kaydet + Tümünü kaydet - &Kaydet + Kaydet + + + Proje Yapılandırması Ekle + + + Proje Ortamı Ekle + + + Çözüm Yapılandırması Ekle + + + Çözüm Ortamı Ekle + + + Tüm yapılandırmaları/ortamları silemezsiniz. + + + '{0}' Gerçekten kaldırmak istiyor musunuz ? + + + Ayarları kopyala: + + + Tüm projelerin yapılandırmalarını oluştur + + + Adı çoğalt. + + + Proje Yapılandırmalarını Düzenle + + + Proje Ortamlarını Düzenle + + + Çözüm Yapılandırmalarını Düzenle + + + Çözüm Ortamlarını Düzenle + + + <Boş> - Yeni ismi girin: + Yeni ad girin: + + + Ad geçersiz. Git @@ -1057,7 +1482,7 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control Satıra git - Lütfen sıçramak için bir ifade girin. + Lütfen atlama yapmak için bir ifade girin. Satır numaraları, sınıf yada dosya adları girebilirsiniz. Örneğin: "120", "MainClass", "Main.cs, 120". @@ -1073,6 +1498,12 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. İtalik + + Renk vurgulamayı dışa aktar + + + Renk vurgulaması al + Değer @@ -1080,118 +1511,125 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Örnek metin - Yeni dosyayı şu anki projede kullanmak istiyorsanız, dosyayı projeye eklemelisiniz.\nDosyayı ${CurrentProjectName} projesine eklemek istiyor musunuz? + Yeni dosyayı mevcut projede kullanmak istiyorsanız, dosyayı projeye eklemelisiniz. +Yeni dosyayı, ${CurrentProjectName} projesine eklemek istiyor musunuz? Proje içinde dosya oluştur - Tek bir dosya oluştur + Bağımsız dosya oluştur - Dosya projeye eklensin? + Projeye dosya eklensin mi? - &Kategoriler: + Kategoriler: Yeni Dosya - &Dosya Adı + Dosya Adı Öncelikle özellikleri doldur - Bu dosyayı oluşturabilmek için öncelikle bazı özellik değerleri belirtmelisiniz. + Bu dosyayı oluşturabilmek için öncelikle bazı özellikler belirtmelisiniz. + + + Seçilen {0} proje dosyası salt okunur özellikte. Yeni dosya projeye eklenmeyecek. - &Şablonlar: + Şablonlar: + + + Çözüm için dizin oluştur Yeni Proje - &Yer: + Konum: - &Ad: + Ad: Projenin oluşturulacağı yer - &Kategoriler: + Kategoriler: - Düzeni ifadeyi ayrıştırırken hata: + Normal ifadeyi ayrıştırırken hata: Hepsini bul - &Bul + Bul Bul - Sonrakini &bul + Sonrakini bul - Bul: + Aranan: - &Alt-dizinleri de ekle + Alt-klasörleri de ekle - Bu dosya &türlerine bak: + Bu dosya türlerine bak: bütün açık belgeler - Şu anki belge + mevcut belge - Şu anki seçim + mevcut seçim '{0}' dizini bulunamadı. - Arama yapılacak dizini belirtiniz + Arama yapılacak dizini seç - bütün proje + tüm proje tüm çözüm - Hepsine &yer imi koy + Tümünü yer imle - Büyük küçük harf eşleştir + Eşleştir Tüm kelimeyi eşleştir - &Tümünü değiştir + Tümünü değiştir - &Yerine Koy + Değiştir Değiştir - Yerine Konacak: + İle değiştir: - &Burada Ara: + Buraya bak: Kurallı ifadeler @@ -1212,43 +1650,53 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Ara ve Değiştir - &Kullan: + Kullan: Projenin oluşturulacağı dizini seçin. + + Çözüm Adı: + - &Şablonlar: + Şablonlar: Arabellek Seçenekleri - Yeni Grup &ekle + Yeni Grup ekle - Tanımlama + Tanım - Lütfen, dosya uzantıları listesini, noktalı virgül ile ayrılmış bir liste olarak girin(Örnek: .h;.c;.cpp) + Lütfen, dosya uzantılarını, noktalı virgül ile ayrılmış bir liste olarak girin. +(Örnek: .h;.c;.cpp) + + + Uzantıları düzenle - &Tanımlama + Tanım Şablonu Düzenle - &Şablon + Şablon - &Uzantılar + Uzantılar - Anahtar kelime haritalama + Anahtar kelime adresleme + + + Kod şablonu eklemek için Tab tuşuna basın. - Grubu &kaldır + Grup kaldır Şablon @@ -1259,23 +1707,32 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Yapılandırma + + Yapılandırma Düzenleyici + + + <Düzenle> + - Platform + Ortam + + + Çözüm yapılandırması: - &Argümanlar + Argümanlar - &Komut + Komut - Argümanlar için &sor + Argümanlar için sor Çözüm dizini - Çözüm dosyasının adı + Çözüm dosyası adı Geçerli sütun @@ -1287,22 +1744,22 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Geçerli metin - &Nesne dizini + Öğe dizini - Nesne Yolu + Öğe Yolu - Hedef Yolu + Hedef Yol - Nesne uzantısı + Öğe uzantısı Öğe dosya adı - &Proje dizini + Proje dizini Proje dosya adı @@ -1311,67 +1768,70 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. #Develop Başlangıç Dizini - &Hedef dizin + Hedef dizin Hedef uzantı - Hedef Adı + Hedef Ad - &Başlık + Başlık - &Araçlar + Araçlar - &Çıktı Penceresini kullan + Çıktı Penceresi Kullan - &Çalışılan dizin + Çalışılan dizin - Dışsal Araçlar + Harici Araçlar Önbelleği temizle + + Bir karakter eklendiğinde tamamlama listesini göster + - Kod tamamlama detayı ayarları + Kod tamamlama detay ayarları - Aşağıdaki seçenekler dillere özgüdür. bazıları bazı programlama dillerinde yoktur. + Aşağıdaki seçenekler dile özgüdür, bazıları tüm programlama dillerinde kullanılamaz. - Kod tamamlamayı tamamiyle kapatmak için aşağıdaki seçeneği kullanın: + Kod tamamlamayı tamamen kapatmak için aşağıdaki seçeneği kullanın: Virgüle basıldığında ipucunu daha fazla bellek kullanarak yeniden aç - nesneler + Öğeler Kaydet - En son kullanılan üyeleri önceden seç + Son kullanılan üyeleri öncelikli seç - Sadece hata ayıklama durumunda + Sadece hata ayıklama modu - İşlev çağrılarını yazarken ipucunu göster + Yöntem çağrılarını yazarken ipucunu göster - anahtarkelimelerden sonra kod tamamlamayı tetikle + Anahtarkelimelerden sonra kod tamamlamayı çalıştır - Fare ifadenin üstüne gelince ipucunu göster + Fare, ifadenin üstüne gelince ipucunu göster - &Üyeler arasına boş satırlar ekle + Üyeler arasına boş satırlar ekle Kod üretme seçenekleri @@ -1380,31 +1840,70 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Yorum üretme seçenekleri - &Else kapama paranteziyle aynı satırda + Else kapama paranteziyle aynı satırda - &Ek yorumlar üret + Ek yorumlar üret - &Dokümantasyon yorumlarını üret + Belgeleme yorumlarını üret - Kod bloklarına aynı satırda &başla + Aynı satırda kod bloğu başlat Kod Üretimi - Tam tip adlarını &kullan + Tam tür adlarını kullan Kodlama + + Hata ayıklama + + + İstisnalar + + + Yakalanan istisnaları duraklat + + + Adımlama + + + Sembolsüz kod derleme + + + Adımlama için 'Just My Code' özelliğini kullan + + + Tüm özelliklerin üzerinde adımla + + + Ayıklayıcı nitelikleri ile işaretlenmiş kod üzerinden Adımla + + + Alan özelliklerine erişim üzerinden adımla + + + Sembolsüz kod üzerinden adımla + + + Tek satır özellikleri üzerinden Adımla + + + Semboller + + + Sembol ve kaynak kodu yolları: + - &Başlık + Başlık - &Dil + Dil Standart Başlıkları Düzenle @@ -1413,16 +1912,22 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Genel - Dışardan kaydedileni otomatik yükle + Kaydedildiyse kendiliğinden yüklerken değiştir - &Her zaman yedek kopya oluştur + Kayıt için geçici dosyaları kullan + + + Varsayılan dosya kodlama: + + + Dosyalardaki harici değişiklikleri algıla Yükle - Bu belge için &kullanıcı-bazlı ayarları yükle + Bu belge için kullanıcı-bazlı ayarları yükle Yükle/Kaydet @@ -1431,10 +1936,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Kaydet - Unix + Unix(LF) + + + Dosyaları silerken geridönüşüm kutusu kullan - Windows + Windows(CRLF) Biçim @@ -1446,17 +1954,20 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Sözcük kaydır - İnşâ ve Çalıştırma seçenekleri + Derleme ve Çalıştırma seçenekleri - Proje yolu yanlış belirtilmiş. + Geçersiz proje yolu. - Başlangıçta en son açılan çözümü yükle + Başlarken son açılan çözümü yükle Projeler ve Çözümler + + Paralel derlenecek proje sayısı: + Varsayılan proje konumu: @@ -1467,28 +1978,46 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Ayarlar - İnşa hata ile biterse hata sekmesini göster + Derleme hatayla biterse hata listesi göster + + + Çalıştırırken: + + + İlişkili olarak değiştirilmiş proje ve projeleri derle + + + Sadece değiştirilmiş projeleri derle + + + Derlenemedi + + + Bütün projeleri derle + + + Geçerli arabirim dili: Dil seçimi için bir simgeye tıklayın. - Kullanıcı Arabirim Dili + Arabirim Dili - Tercih ettiğiniz &ambiyansı seçin: + Tercih ettiğiniz ortamı seçin: - Proje gözcüsünde dosya &uzantılarını göster + Proje izleyicide dosya uzantılarını göster - Durum çubuğunu &göster + Durum çubuğunu göster - Araç Çubuğunu Göster. + Araç çubuğunu göster. - Menü ve araç çubukları için mavi stili(Ofis 2003 stili) kullan + Menü ve araç çubukları için mavi stili(Ofis 2003 benzeri) kullan Eğer mümkünse projenin ortamını tercih et @@ -1503,40 +2032,46 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Yorum Etiketleri - &Ad + Ad Görev listesi - &Simge listesi + Simge listesi Davranış - Düzeltme imi EOL arkasına &taşınabilsin + Düzeltme imi EOL arkasına taşınabilsin - Sekmeleri boşluklara &dönüştür. + Sekmeleri boşluklara dönüştür. + + + "Tanıma Git" için Ctrl + Tıkla kullan - Süslü ayraçları &otomatik olarak ekle + Küme parantezlerini kendiliğinden ekle Bir şey seçilmediğinde bütün bir satırı kes yada kopyala + + Sanal alanı etkinleştir + - Yazarken fare imlecini &gizle + Yazarken fare imlecini gizle - &Girinti + Girinti - &Girinti boyutu + Girinti boyutu - Otomatik + Kendiliğinden Hiçbiri @@ -1545,7 +2080,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Akıllı - &Fare tekerleği yönü + Fare tekerleği yönü Normal @@ -1560,25 +2095,31 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Sekmeler - &Sekme boyutu + Sekme boyutu - &Otomatik olarak şablon eklenmesi + Kendiliğinden şablon ekleme + + + Akıllı girinti kullan Kod Tamamlama - Yazıtipini örtüşmesiz olarak &oluştur + Yazıtipini kenaryumuşatmalı yap + + + İşaretçi Değiştirmeyi etkinleştir - &Kod tamamlamayı etkinleştir + Kod tamamlamayı etkinleştir - &Çifte arabelleklemeyi etkinleştir. + Çift arabelleklemeyi etkinleştir. - &Karakter katlamayı etkinleştir. + Katlamayı etkinleştir. Yazıtipi @@ -1587,7 +2128,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Dosya kodlama - &Kodlamayı seçin: + Kodlamayı seçin: Boyut: @@ -1599,13 +2140,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Fare tekeri ile yakınlaştırma - &Çabuk SınıfTarayıcısı Panelini Göster + Çabuk SınıfTarayıcı Panelini Göster Metin Yazıtipi: - sütu&nda + sütunda İmleçten Sonra @@ -1613,23 +2154,32 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. İmleçten Önce + + İmleç satırını göster + + + Canlandırmayı etkinleştir + - &EOL işaretleyicilerini göster + Satır sonu işaretçilerini göster + + + Sembolleri vurgula - &Eşleşen parantezleri vurgula + Eşleşen parantezleri vurgula - &Yatay cetveli göster + Yatay cetveli göster - &Geçersiz satırları göster + Geçersiz satırları göster - Satır &işaretleyicisi stili + Satır işaretçisi stili - &Satır numaralarını göster + Satır numaralarını göster Tam Satır @@ -1638,34 +2188,40 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Hiçbiri - İşaretleyiciler ve Cetveller + İşaretleyiciler İşaretleyiciler ve Cetveller + + Cetveller + + + Gizli tanımları (sadece parentezler) göster + - &Boşlukları göster + Boşlukları göster - &Sekmeleri göster + Sekmeleri göster - Hataların &altını çiz + Hataların altını çiz - Sütun cetvelini &göster + Sütun cetvelini göster - Anahtar kelimelerin otomatik düzeltimesine izin ver + Anahtar kelimelerin kendiliğinden düzeltilmesini etkinleştir - end yapılarının otomatik yerleştirilesini aktifleştir + End yapılarının kendiliğinden yerleştirilmesini etkinleştir - kod biçimlendirme + Kod biçimlendirme - VB'e özel seçenekler + VB özel seçenekleri Metin Düzenleyicisi @@ -1686,7 +2242,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Windows Uygulaması - Tümleşkenin oluşturulacağı dizini seçin. + Derlemenin oluşturulacağı dizini seçin. Vurgu @@ -1701,16 +2257,28 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Uygulama - Uygulama &simgesi: + Uygulama simgesi: - Assembly adı: + Derleme adı: {0} geçerli bir simge dosyası değil. + + Uygulama bildirimi + + + Bildirim uygulanamıyor + + + Bildirimi varsayılan yap + + + Bildirim dosyaları + - Çıktı ismi: + Çıktı adı: Çıktı türü: @@ -1719,16 +2287,16 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Proje dosyası: - Proje dizini: + Proje klasörü: Proje Bilgisi - Kök isim boşluğu + Root ad alanı: - Başlangıç nesnesi: + Başlangıç öğesi: Win32 Kaynak Dosyası: @@ -1740,13 +2308,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Otomatik - Taban Çıktı Dizini: + Temel Ara Çıktı Dizini: - Hata Ayıklama Bilgisi + Hata Ayıklama Bilgisi: - DLL Taban Adresi: + DLL Temel Adresi: Hatalar ve Uyarılar @@ -1755,7 +2323,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Dosya Hizalaması: - Tefrika tümleşkesi üret: + Serileştirilmiş derleme üret: Ara Çıktı Yolu: @@ -1773,13 +2341,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Çıktı Yolu: - COM işbirlikteliği için kaydet + COM Çalışabilirliği İçin Kaydet Uyarıları Yoksay: - Hedef İşlemci + Hedef İşlemci: Herhangi bir işlemci @@ -1788,13 +2356,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Intel 64-bit Itanium işlemci - AMD 64-bit işlemci + x86-64 işlemci 32-bit Intel-uyumlu işlemci - Hedef Çatı: + Hedef Çalışma Çerçevesi: Uyarıları hata gibi değerlendir @@ -1806,25 +2374,25 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Hiçbiri - Duruma özel Uyarılar: + Duruma Özel Uyarılar: Uyarı Seviyesi: - &XML belgeleme + XML belgeleme - İnşâ Olayları + Derleme Olayları - İnşa-sonrası komut satırı görevi: + Derleme-sonrası komut satırı olayı: - İnşâ-öncesi komut satırı görevi: + Derleme-öncesi komut satırı olayı: - İnşâ-sonrası görevini çalıştır: + Derleme-sonrası olayını çalıştır: Derleme @@ -1833,7 +2401,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Güvensiz koda izin ver - Aritmetik taşmaları kontrol et + Aritmetik taşmayı/yetersizliği kontrol et Koşullu Derleme Sembolleri: @@ -1842,10 +2410,10 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Genel - mscorlib.dll dosyasını kaynak olarak gösterme + mscorlib.dll referansını reddet - Kodu iyileştir + Kodu eniyile Sayısal taşma kontrollerini kaldır @@ -1854,13 +2422,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. VB Seçenekleri için varsayılan değerler: - &Konfigurasyon + Yapılandırma - Konfigurasyona özel + Özel yapılandırma - Konfigurasyonu değiştirmek şu anki değerleri kaydedecektir. Devam edilsin mi? + Yapılandırmayı değiştirmek mevcut değerleri kaydeder. Devam edilsin mi? Hata Ayıkla @@ -1869,7 +2437,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Komut Satırı argümanları: - Harekete Başla + Eyleme Başla URL yi görüntüle: @@ -1878,13 +2446,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Başlama Seçenekleri - Dış program çalıştır: + Harici program çalıştır: Başlangıç projesi - &Çalışılan dizin: + Çalışılan dizin: Tam hata ayıklama bilgisi @@ -1896,31 +2464,31 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Sadece .pdb dosyaları - Bu proje türü için yüklenmiş proje seçenekleri paneli yok. + Bu proje türü için yüklenmiş proje seçenekleri panelleri yok. - Platform + Ortam - Platforma özel + Ortama özel Lütfen geçerli bir sayı giriniz. - Imports + Dahil edilenler - İthal Ekle + Dahil et - İsimboşluğu: + Ad alanı: - Çıkar + Dahil edilenleri kaldır - Proje genelindeki Imports bildirimleri + Proje genelinde Dahil Edilenler Yayınla @@ -1935,13 +2503,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Daima - İnşâ proje çıkışını güncellediğinde + Derlediğinde proje çıktısını güncelle - Başarılı inşâda + Başarılı derlendi - Dizin Seç + Klasör Seç İmzalama @@ -1950,13 +2518,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Şifre Değiştir... - Güçlü isim anahtarı dosyası seç: + Güçlü bir ad anahtar dosyası seç: Tek Tıklamada imzalama - Tek-Tıkla imzalama şu anda desteklenmiyor. + Tek Tıklamada imzalama şu anda desteklenmiyor. Şifreyi doğrula: @@ -1977,10 +2545,10 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Sadece Gecikme İmzası - Gecikme imzalaması yapıldığında, proje çalışmaz yada üzerinde hata ayıklama yapılamaz + Gecikme imzalaması yapıldığında, proje çalışmaz yada üzerinde hata ayıklama yapılamaz. - Bir anahtar adı girmek zorundasınız. + Bir anahtar adı girmeniz gerekiyor. Anahtar dosyayı oluştururken bir hata oluştu. @@ -1989,10 +2557,10 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Girilen şifreler uyuşmuyor. - Şifre en az 6 harf uzunluğunda olmalıdır. + Şifre en az 6 karakter uzunluğunda olmalıdır. - Assembly'yi imzala + Derlemeyi imzala sn.exe bulunamadı. .NET Framework SDK' nın bilgisayarınıza yüklü olduğundan emin olun. @@ -2002,21 +2570,51 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz. Bütün yapılandırma ayarlarının önündeki küçük tuşla, ayarın nerede saklanacağını seçebilirsiniz. -Yapılandırmaya-özel, ayar, farklı yapılandırma seçenekleri(Hata Ayıklama/Yayım) için farklı değerler alabilmesi demektir. -Ortama-özel, ayar, her bir ortam için farklı değer alabilir demektir. -Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) içinde saklayabilirsiniz. böylelikle bütün geliştirmenler kaynak kontrol sistemlerinde herhangi bir çakışmaya neden olmaksızın farklı değerler kullanabilir. +Özel yapılandırma, farklı yapılandırma seçenekleri(Hata Ayıklama/Yayınlama) için farklı değerlerle ayarlayabilmedir. +Ortama özel, her bir ortam için farklı değer alabilen ayar demektir. +Ayrıca bir ayarı proje dosyası yerine kullanıcı dosyası(.user-file) içinde saklayabilirsiniz; böylelikle bütün geliştiriciler kaynak kontrol sistemlerinde herhangi bir çakışmaya neden olmaksızın farklı değerler kullanabilir. - .user dosyasında sakla + .user-file'de sakla + + + Sınıfa Arayüz Ekle + + + Oluşturulan Ad + + + Yorum Ekle + + + Arayüz Adı + + + Yeni Dosya Adı + + + Genel Kullanıcı Seç + + + Yeni sınıf oluştur: + + + Yararlanılabilir bir sınıf kaynak kodu olmadığı için yöntem doğrudan oluşturulamıyor. Yöntemin bir eklenti yöntemi olarak oluşturulabilmesi için statik bir sınıf seçiniz. + + + Yöntemi tanıtma + + + Mevcut sınıfı kullan: - .NET Assembly Tarayıcısı + .NET Derleme Tarayıcısı Referans Ekle - Özel tümleşke versiyonu seç + Özel derleme sürümü seç Referans Adı @@ -2049,7 +2647,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için &Seç - Tip + Tür Sonlandır @@ -2064,10 +2662,10 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için dosya - Şu anki dosya br metin dosyası değil dolayısıyla sayılamaz. + Mevcut dosya bir metin dosyası değil ve sayılamaz. - Sayılacak Yer + Sayım Yeri Satırlar @@ -2076,7 +2674,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Proje modunda olmalısınız - &Başla + Başla toplam @@ -2084,8 +2682,11 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Sözcükler + + SDK bin klasörlerinden herhangi birinde ${Executable} bulunamıyor. + - ${File} dosyası yüklememiyor. Dosya bulunamadı. + ${File} dosyası yüklenemiyor. Dosya bulunamadı. Yükleme sırasında hata @@ -2105,14 +2706,17 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Kaynak + + Başarısız + - &Ekle + Ekle < Geri - &Gözat... + Gözat... Gözat @@ -2121,13 +2725,13 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için İptal - &Değiştir + Değiştir Konum seç - &Kapat + Kapat Oluştur @@ -2136,10 +2740,13 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Sil - &Sil + Sil + + + Hiçbirini Seçme - &Düzen + Düzenle Hata @@ -2156,8 +2763,23 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Tamamlandı + + Klasör + + + Font Stili + + + Özel + + + Font seç + + + Altıçizili + - &Yardım + Yardım ID @@ -2181,16 +2803,16 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için tüm proje - &Aşağıya Taşı + Aşağıya Taşı - &Yukarıya Taşı + Yukarıya Taşı - Uygulanamaz + N/A - İsim + Ad İleri > @@ -2202,13 +2824,16 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Tamam - &Aç + + + + Seçenekler Yol - Lütfen ekleyin... + Lütfen bekleyin... Önizleme @@ -2216,17 +2841,26 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Soru + + Saltokunur + Yenile - &Kaldır + Kaldır Yeniden Adlandır + + Değiştir + - Yinele + Yeniden dene + + + Hepsini Seç Küçük Simgeler @@ -2250,7 +2884,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Tümüne Evet - Dosya veya dizin adı zaten kullanımda, lütfen bir başka adı seçin. + Dosya veya dizin adı zaten kullanımda, lütfen farklı bir ad seçin. Seçtiğiniz dosya adı kuraldışı karakterler içeriyor. Lütfen başka bir ad seçiniz. @@ -2258,39 +2892,81 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için + + Explorer'da Klasör Aç + Birlikte aç... Program ekle + + Ad Göster: + + + Program: + + + Bu dosya için varsayılan Windows uygulamasını kullan + + + Simge düzenleyici + + + Kaynak düzenleyici + Metin Düzenleyici + + Metin düzenleyici (kodlama seçin) + Tümleşik Web Tarayıcısı + + XML düzenleyici + + + Bu dosyayı açmak için kullanmak istediğiniz programı seçin: + Varsayılan + + Birlikte Aç + + + Varsayılan Olarak Ayarla + Bütün dosyaları göster + + {0}'a yeni kaynak dizisi ekle + <Yeni ekle> - Bu ${Count} kaynak anahtarını dosyadan ve bun(lar)a bağlı yerelleştirilmiş kaynak dosyalarının tümünü silmek istediğinizden emin misiniz? + Kaynak dosyalarındaki ${Count} kaynak anahtarını ve tüm bağımlı yerelleştirilmiş kaynak dosyalarını kalıcı olarak silmek istediğinizden emin misiniz? - "${FileName}" dosyasından "${Key}" kaynak anahtarını ve buna bağlı yerelleştirilmiş kaynak dosyalarını silmek istediğinizden emin misiniz? + "${FileName}" kaynak dosyasındaki "${Key}" kaynak anahtarını ve tüm bağımlı yerelleştirilmiş kaynak dosyalarını kalıcı olarak silmek istediğinizden emin misiniz? - Metin kaynakı düzenle + Metin kaynağı düzenle + + + Bu isimde bir kaynak anahtarı zaten var! Kaynak anahtarı boş olamaz! + + '{0}' kaynak dosyası işlenirken bir hata oluştu. + Kayıp kaynak anahtarlarını bul @@ -2304,10 +2980,10 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Kaynak anahtarı: - "{0}" anahtarı "{1}" dosyasında bulunamadı. + "{0}" kaynak anahtarı "{1}" dosyasında bulunamadı. - Kayıp kaynak anahtarlarına referans + Kayıp kaynak anahtarları referansları ${ResourceKey} 'e referanslar (${ResourceFileName} içindeki) @@ -2316,7 +2992,10 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Bu kaynak anahtarının tanımı bulunamadı ve değiştirilemedi. - Yeni kaynak adı girin: + Yeni kaynak anahtarı adı girin: + + + Seçilen kaynak türü 'string' değildir ve düzenlenemez. Kaynağı ekle @@ -2334,13 +3013,22 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için {0} içindeki kaynak: - {0} cinsinden nesne: + {0} türünde öğe: <Bilinmeyen> + + ICSharpCode.Core ana kaynakları gizle + + + Seçildiğinde, ICSharpCode.Core ana uygulamasının kaynak dosyasında bulunan kaynak anahtarları listelenmez. + + + Çözümün tamamında bulunan kullanılmayan kaynak anahtarı sayısı. + - Kullanılmayan kaynak anahtarı + Kullanılmayan kaynak anahtarları Değer @@ -2348,6 +3036,9 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Kaynak değeri: + + Tüm ad alanlarındaki öğeleri göstermek için Ctrl + Boşluğa basın + Boo Yorumlayıcısı @@ -2355,7 +3046,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için FxCop bulunamadı. Lütfen SharpDevelop seçeneklerinden FxCop kurulum dizinini seçin. - FxCop kayıt dosyası okunamadı + FxCop kayıt dosyası okunamadı: Mono yüklü değil. @@ -2369,32 +3060,38 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Kod Analizi + + FxCop ile mevcut projeyi kontrol et + FxCop ile Kontrol Et Seçtiğiniz dizin bütün bir FxCop kurulumu içermiyor. + + FxCop yolunu seç + - FxCop aşağıdaki dizinde bulunmuşdur: + FxCop aşağıdaki dizinde bulundu: - FxCop bulunamadı. FxCop 'ı yükleyin, 'FxCop Youlunu seç' i tıklayıp SharpDevelevop 'a nereye yüklediğinizi belirtin. + FxCop bulunamadı. FxCop 'ı yükleyin ve SharpDevelevop 'ta 'FxCop yolunu seç' i tıklayıp yükleme konumunu belirtin. FxCop Yolu - Kural tümleşkesi ekle/çıkar + Kural derlemesi ekle/çıkar - FxCop bulunamadı - FxCop 'ı yüklediğinizden emin olun. + FxCop bulunamadı - FxCop 'ın yüklendiğinden emin olun. - Kural tümleşkelerini içeren dizini seçin + Kural derlemelerini içeren dizini seçin - Kod Analizini &etkinleştir(CODE_ANALYSIS sabitini tanımlar) + Kod Analizini Etkinleştir(CODE_ANALYSIS sabitini tanımlar) Mevcut kurallar yükleniyor... @@ -2403,13 +3100,13 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Derlerken Kod Analizini Çalıştır( CODE_ANALYSIS sabitini tanımlar ) - SharpDevelop seçeneklerinden FxCop a yol belirtebilirsiniz. + SharpDevelop seçeneklerinden FxCop yolunu belirtebilirsiniz. Karışık - Uyrarı yada Hata + Uyarı yada Hata Kural @@ -2417,6 +3114,9 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için FxCop çalışıyor + + Mesajı önle + Kapsanmış Kod @@ -2439,23 +3139,32 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Hiç kod kapsama dosyası üretilemedi: - Kod kapsama renkleri + Kod Kapsama Renkleri - Nesneleri &Goster: + Öğeleri Göster: Öğe arkaplanı: - Öğe önalanı + Öğe önplanı: - AaBbCcDdYyZz + AaBbCcXxYyZz + + + Dışla + + + Dahil et Kod kapsama çalıştırılıyor... + + Kod Kapsamayı Göster + Kaynak Kodunu Göster @@ -2463,22 +3172,61 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Ziyaret Sayısını Göster - Kod Kapsamayı Ters çevir + Kod Kapsamaya Geç - Tekrar Edilme Sayısı + Ziyaret Sayısı Tanımlama - Alınan Exception + İstisna yap - Exception göster + İstisna göster + + + Ek seçenekler + + + Bağlantı sağlayıcı + + + Bağlantı ek dosyaları + + + Belirtilen .NET modülleri bağlantısı + + + Hata ayıklama bilgisi üret + + + Kütüphane dosyaları konumları + + + Gömülü .NET kaynak dosyası + + + Önişlemci + + + Takipeden önişlemci sembollerini tanımla + + + Başlık dosyaları yerleşimi + + + Tüm tanımlı önişlemci sembollerini tanımsız yap + + + Takipeden önişlemci sembollerini tanımsız yap + + + Sembol - .NET Resource Dosyası(ikili) + .NET Kaynak Dosyası(ikili) C# Kaynak Dosyası @@ -2490,7 +3238,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Proje - .NET Resource Dosyası + .NET Kaynak Dosyası SharpDevelop Çözümü @@ -2502,12 +3250,12 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için XML Dokümanı - NAnt bulunamadı '{0}'. + NAnt '{0}' bulunamıyor. Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının yerini ayarlayın. - NAnt inşâsı durduruldu. + NAnt derlemesi durduruldu. Projede bir '.build' dosyası yok. @@ -2516,10 +3264,10 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye NAnt Çalıştırılıyor. - NAnt 'ı durdurmak istediğinizden emin misiniz? + NAnt süreci sona erecek. Emin misiniz? - İnşâ Dosyası Oluştur + Derleme Dosyası Oluştur Tanıma Git @@ -2531,7 +3279,7 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye Argümanlar - İnşa Dosyası Üretme + Derleme Dosyası Üretimi Komut @@ -2552,25 +3300,25 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye Logoyu Göster - detaylı çıktı + Detaylı - NAnt özwlliklerini girin. + NAnt özelliklerini gir. - İnşâ dosyalarını yeniden yükler. + Derleme dosyalarını yeniden yükle - Seçili hedefi çalıştırır + Seçili hedefi çalıştır - Şu anki inşayı durdurur + Mevcut derlemeyi durdur - İşleyen bir süreç yok. + Çalışan bir süreç yok. - Projeyi Temizle + Hedefi Temizle Varsayılan Hedefi Çalıştır @@ -2579,7 +3327,10 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye Hedefi Çalıştır - NAnt 'ı Durdur + NAnt'ı Durdur + + + Hata ayıklamak için başlangıç &#8203;&#8203;projesi yok. Unit Testleri @@ -2609,27 +3360,57 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye Daha fazla bilgi - '{0}' dili için herhangi bir imza bulunamadı. + '{0}' dili için bir imza bulunamadı. - Hiçbir ize rastlanmadı. + İmza bulunamadı. PInvoke imzaları ekle... + + C#'tan Python'a + + + VB.NET'ten Python'a + + + Python Konsolu + + + Python Dosyaları + + + Python Proje Dosyaları + + + Satırı Python Konsola Gönder + Python Konsoluna Gönder + + '{0}' türü bulunamıyor. Bir derleme bilgisi eksik olabilir mi? + + + Seçilen eleman sınıfsız veya geçersiz bir üye, bu yüzden türetilmemiş semboller gösterilebilir. + + + İmleç konumu tanım türü bulunamadı. + + + Satırı Ruby Konsoluna Gönder + Ruby Konsoluna Gönder - ${Path} altındaki ${FileNameWithoutPath} dosyası yüklenemiyor. -Dosya varlığını ve izin durumunu kontrol et. + ${Path} yolundaki ${FileNameWithoutPath} dosyası yüklenemiyor. +Dosya varlığını ve izinlerini kontrol edin. - ${Path} altındaki ${FileNameWithoutPath} dosyası kaydedilemiyor. -Başka bir dosya adı seçin veya dizinin var olduğundan ve o konuma dosya yazılmasına izniniz olduğundan emin olun.(belki yazma-koruma problemi olabilir?) + ${Path} yolundaki ${FileNameWithoutPath} dosyası kaydedilemiyor. +Başka bir dosya adı seçin veya dizinin var olduğundan ve o konuma dosya yazmaya izniniz olduğundan emin olun.(belki yazma-koruma problemi olabilir?) Tarayıcı @@ -2638,32 +3419,32 @@ Başka bir dosya adı seçin veya dizinin var olduğundan ve o konuma dosya yaz C# 'dan VB.NET'e - Hata ayıklama yerleştirmesi + Hata ayıklama düzeni - Varsayılan yerleştirme + Varsayılan düzen <Düzenle> - Düzen EKle + Düzeni ekle - Kullanıcı tanımlı sayfa düzeni listesini düzenle: + Kullanıcı tanımlı düzenler listesini şekillendir: - Tertipleri Düzenle + Düzenleri Şekillendir - Düz yerleştirme + Plan düzeni - <Varsayılana Sıfırla> + <Varsayılana ayarla> - Sayfa düzeni yapılandırmasını sıfırlamak istediğinizden emin misiniz? -Not: Bu özel düzenlemeleri etkilemez. + Yapılandırma düzenini sıfırlamak istediğinizden emin misiniz? +Not: Bu işlem özel düzenlemelerinizi etkilemez. Dönüştür @@ -2675,76 +3456,80 @@ Not: Bu özel düzenlemeleri etkilemez. Dönüştürme Sonuçları - ${FileName} dosyasını çevirirken ${ErrorCount} hata. + ${FileName} dosyasını dönüştürürken ${ErrorCount} hata(ları). - Önce kaynak kodundaki hataları düzeltin(sadece hatasız kodlar çevrilebilir). + Önce kaynak kodundaki hataları düzeltin(sadece hatasız kodlar dönüştürülebilir). - ${FileName} çevrilmedi: + ${FileName} dönüştürülmedi: - Parçalayıcı ${ErrorCount} adet hata buldu. + Çözümleyici ${ErrorCount} adet hata buldu. - SharpDevelop Proje Çevirici + SharpDevelop Proje Dönüştürücü - Kaynak Dizin + Kaynak Dizini - {0} zaten var, çevrilemedi. + {0} zaten var, dönüştürülemedi. Hedef dizin - C# dan Boo ya + C#'tan Boo'ya - VB.NET den Boo ya + VB.NET'ten Boo'ya '${FileName}' dosyası açılamıyor. Geçerli bir çözüm veya proje dosyası değil. - SharpDevelop '${SolutionName}' adlı çözümü yükledi, fakat çözüm, '${ProjectName}' isimli projeyi içermiyor. + SharpDevelop '${SolutionName}' çözümünü yükledi; fakat '${ProjectName}' projesini içermiyor. + + + '${ProjectName}' projesini '${SolutionName}'çözümüne ekle '${ProjectName}' için yeni bir çözüm oluştur. - YazdırılacakBelge oluşturulamadı + Belgeyazdır oluşturulamadı - Bu isme sahip bir yazma-korumalı dosya belirtilen konumda zaten var. + Belirtilen konumda bu isimde bir yazma-korumalı dosya zaten var. + - Yüklü proje türünü işletebilecek bir mekanizma yok. + Yüklü proje türü için arkaplan yok. - Proje dosyası bulunmuş olamaz. + Proje dosyası bulunamıyor. - Kaynaklar + Referanslar - Web hizmeti tanımı okunamadı. Url='{0}' + Web servisi tanımı okunamadı. Url='{0}' - Çözüm Birimleri + Çözüm Öğeleri Çözüm - Bu dosya artık yok. + Dosya artık bulunamıyor. Dosyayı yeniden yüklemek istediğinizden emin misiniz ? Tüm değişiklikler kaybedilecek. - ${LanguageBinding} dil bağlaması ${FileName} dosyasını derleyemiyor. + ${LanguageBinding} dil bağlayıcısı ${FileName} dosyasını derleyemiyor. Dosya kaydedildi @@ -2755,17 +3540,20 @@ Not: Bu özel düzenlemeleri etkilemez. Dosya Kaydedildi + + Proje tarayıcı dosyasında gezinin + VB.NET 'den C# 'a - (+${NumOverloads} aşırı yükleme) + (+${NumOverloads} taşmaları) - ${CurrentMethodNumber} taneden ${NumberOfTotalMethods}. + ${NumberOfTotalMethods} ${CurrentMethodNumber} . - ${File} dosyası harici olarak değiştirilmiş, yeniden yüklemek ister misiniz? + ${File} dosyası dışarıdan değiştirilmiş. Yeniden yüklemek ister misiniz? Artan Arama: @@ -2776,6 +3564,12 @@ Not: Bu özel düzenlemeleri etkilemez. (dökümanın sonuna ulaşıldı) + + Artan Ters Arama: + + + ${Filename} dosyasından ${Assembly} için kod tamamlama bilgisi yükleme hatası: + Devam Et @@ -2786,25 +3580,25 @@ Not: Bu özel düzenlemeleri etkilemez. SharpDevelop'u Kapat - SharpDevelop 'da anlaşılamayan bir hata oluştu. Bu hatayı beklemiyorduk, bu hatayı SharpDevelop takımına ileterek bize SharpDevelop'ı geliştirmemizde yardım etmenizi isteriz. + SharpDevelop'ta bilinmeyen bir hata oluştu. Bu hatayı beklemiyorduk; hatayı SharpDevelop takımına ileterek SharpDevelop'u geliştirmemizde yardımcı olmanızı bekliyoruz. - Hataları nasıl en iyi şekilde bildirebilirim: Takım üyeleri için gerekli soruları en aza indirebilmek ve SharpDeveleop'ın kullanıcıları tarafından tespit edilen hataların rapor ve takip edilebilmesi için web tabanlı bir forum kurduk. Hata raporlamada daha kolay kopyala-yapıştır için panoya kopyalanan mesaja ek olarak, sizden hatanın nasıl yeniden oluşturulabileceği konusunda mümkün olduğunca detaylı adım-adım anlatım sunmanızı istiyoruz. + Hata raporlarını en iyi şekilde nasıl bildirebilirsiniz: Takım üyeleri için gerekli soruları en aza indirebilmek ve SharpDeveleop kullanıcıları tarafından tespit edilen hataların raporlanması ve takibi için web tabanlı bir forum kurduk. Hata raporunu forum mesaj panosuna daha kolay kopyala-yapıştıra ek olarak, hatanın nasıl yeniden oluşturulabileceği konusunda mümkün olduğunca detaylı adım-adım anlatım sunmanızı istiyoruz. - SharpDevelop dan çıkmak istediğinizden emin misiniz? Kaydeilmemiş değişiklikler kaybolacak! + SharpDevelop dan çıkmak istediğinizden emin misiniz? Kaydedilmemiş değişiklikler kaybedilecek! Hatayı SharpDevelop Takımına bildir. - SharpDevelop'ı herkes için daha iyi bir program olmasına yardım eden herkese teşekkürler! + SharpDevelop uygulamasının daha iyi olması için yardım eden herkese teşekkürler! - Yönetilmeyen bir exception oluştu + Bilinmeyen istisna oluştu - Form yüklenemiyor. Muhtemel sebep: Bileşenleri başlat işlevi elle değiştirilmiş. + Form yüklenemiyor. Muhtemel sebep: bileşen başlat yöntemi elle değiştirilmiş. '${RootComponent}' bileşeni için kök tasarımcı oluşturulamadı. @@ -2816,16 +3610,16 @@ Not: Bu özel düzenlemeleri etkilemez. Tasarımcı yüklenirken hata: - Tümleşke + Derleme Konum - Uzayalanı + Ad alanı - E&klenilecek bileşenler + Eklenilecek bileşenler Özel @@ -2837,7 +3631,7 @@ Not: Bu özel düzenlemeleri etkilemez. Lütfen geçerli bir dosya adı girin. - Geçerli bir .NET tümleşkesinin dosya adını girin. + Lütfen geçerli bir .NET derlemesi dosya adı girin. Sürüm @@ -2846,16 +3640,16 @@ Not: Bu özel düzenlemeleri etkilemez. GAC - ${Name} tümleşkesi herhangi bir bileşen içermiyor. + ${Name} derlemesi herhangi bir bileşen içermiyor. - &Dosya Adı + Dosya Adı - Bileşenler &Ekle + Bileşenler Ekle - Tümleşke + Derleme Kategoriler @@ -2864,40 +3658,61 @@ Not: Bu özel düzenlemeleri etkilemez. Kenarçubuğunu Yapılandır - İsimboşluğu + Ad alanı - &Yeni + Yeni - Bu kategoriyi çıkarmak istediğinizden emin misiniz? + Bu kategoriyi silmek istediğinizden emin misiniz? Bileşenleri Kaldır - Kategoriden seçili bileşenleri çıkarmak istediğinizden emin misiniz? + Kategoriden seçili bileşenleri silmek istediğinizden emin misiniz? Yeniden Adlandır + + Dışardan al... + + + Yerel kaynak + + + Hayır + + + Önizleme + + + Proje kaynağı + + + Kaynak seç + Üretilmiş kod - Kod görünümünde InitializeComponents işlevini sadeceokunabilir olarak işaretle + Saltokunur kod görünümünde BileşenleriBaşlat yöntemini işaretle Genel + + Visual Studio Stili Olay Eylemcileri Üret + Izgara Özellikleri - &Yükseklik + Yükseklik - Araç Şeritlerinin üstünde düzenlemeye izin ver + Araç çubuklarını düzenlemeyi etkinleştir En iyileştirilmiş kod üretimini kullan @@ -2906,34 +3721,52 @@ Not: Bu özel düzenlemeleri etkilemez. Izgara Seçenekleri - Özellikler tepisisi ayarları + Özellik doldurma ayarları - Özellikleri alfabetik olarak sırala + Özellikleri alfabetik sırala - Izgarayı &Göster + Izgarayı Göster - Akıllı Etiketleri otomatik aç + Akıllı Etiketleri kendiliğinden aç Akıllı Etiketleri Kullan - Izgaraya Uydur + Çizgi Çek - Hizalama Durumu + Hizalama Modu - Izgaraya H&izalan + Izgaraya Hizala - Izgaraya Uydur + Izgaraya Hizala - &Genişlik + Genişlik + + + Yeni olay işleyicilerine "TODO" komutu ekle + + + Özellik atama (küçük sayıların özellikleri için hızlı, fakat büyük sayıların özellikleri için kötü sonuç) + + + Varsayılan yerelleştirme modeli + + + Mevcut değişmeyen formların yerelleştirme modelini terket + + + Yerelleştirme Modeli + + + Özellik yansıması (birkaç özellik için çalışma zamanında yavaş,ama büyük sayıların özellikleri için daha iyi sonuçlar, bilhassa birçok varsayılan değer ile) Windows Form Tasarımcısı @@ -2942,7 +3775,7 @@ Not: Bu özel düzenlemeleri etkilemez. Kategori Adı - Zaten var, başka isim seçin. + Ad zaten var, başka bir tane seçin. Yeni Kategori @@ -2954,15 +3787,21 @@ Not: Bu özel düzenlemeleri etkilemez. Bileşenleri Göster - Kısır döngüye neden olacak bir bileşen eklemeye çalışıyorsunuz. + Bir sonsuz döngüye neden olacak bileşen eklemeye çalışıyorsunuz. - Form Tasarımcısı için bileşen oluştururken hata( bileşen, kurucusunda bir hata oluşturdu). + Form Tasarımcısı için bileşen oluştururken istisna (bir bileşen, kurucuda bir istisna oluşturdu). BU KAYNAK KODUNU ETKİLEMEZ. + + Tasarımcı yüklenemedi. Sözdizimi hataları için kaynak kodunu ve tüm yararlanılabilir referansları kontrol edin. + + + Tasarımcı içeriği temizlemek için çalışırken bir veya daha fazla hata oluştu. Form/kontrol üzerinde bir özel / üçüncü parti bileşende bilinmeyen bir istisna olabilir. + Kenar çubuğu bileşen kütüphanesi yüklenemedi. -Hiçbir Windows form bileşeni erişilemeyecek, lütfen kenar çubuğunu elle ayarlayın( bir kenar çubuğuna sağ tıklayın kategori->Kenar Çubuğu Özelleştir 'i seçin) +Windows Forms bileşenleri yok, lütfen kenar çubuğunu elle ayarlayın( bir kenar çubuğuna sağ tıklayıp kategori->Kenar Çubuğu Özelleştir 'i seçin) Özel Bileşenler @@ -2992,13 +3831,13 @@ Hiçbir Windows form bileşeni erişilemeyecek, lütfen kenar çubuğunu elle ay Git - İsimboşluğu geçersiz karakterler içeriyor. Bir isimboşluğu sadece harf, rakam yada alttan-tire içerebilir. + Ad alanı geçersiz karakterler içeriyor. Bir ad alanı sadece harf, rakam yada alt-tire içerebilir. - Referans adı geçersiz karakterler içeriyor. + Referans ad geçersiz karakterler içeriyor. - İsimboşluğu: + Ad alanı: Parametreler @@ -3013,7 +3852,7 @@ Hiçbir Windows form bileşeni erişilemeyecek, lütfen kenar çubuğunu elle ay Yenile - Elde edilen URI + Erişim URI Servis @@ -3028,25 +3867,34 @@ Hiçbir Windows form bileşeni erişilemeyecek, lütfen kenar çubuğunu elle ay Değer - Mevcut Web Hizmetleri + Yararlanılabilir Web Servisleri Bağla + + Yönetilen + + + İşleme Ekle + Çıktı dizini oluşturulamıyor. -Gerekli erişim hakkınız olduğundan emin olun. +Erişim haklarınızı kontrol edin. Geçersiz proje adı. Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. - Geçersiz proje adı: proje adları '.' ile bitmez. + Geçersiz proje adı: proje adı '.' ile bitmez. Geçersiz proje adı: proje adı harf ile başlamalıdır. + + Proje konumu için geçerli bir yol belirtmeniz gerekir. + SharpDevelop ile ilişkilendirmek istediğiniz dosya türlerini seçin: @@ -3054,16 +3902,16 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Dosya Türü İlişkileri - Uygulama başlangıcında dosya türlerini ilişkilendir. + Uygulama başlarken dosya türlerini ilişkilendir. - Büyük-Küçük harf duyarlı + Büyük-küçük harf duyarlı Sıralama Seçenekleri - Boşklukları yoksay + Boşluk sonlarını yoksay Aynı satırları çıkar @@ -3077,6 +3925,9 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Azalan + + Araç bulunamadı + Kimlik Tanımlama @@ -3084,7 +3935,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Alan: - Lütfen belirtilen url ye erişebilmek için gerekli kimlik bilgilerini verin. + Lütfen belirtilen url'ye erişebilmek için gerekli kimlik bilgilerini verin. Şifre: @@ -3095,59 +3946,83 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Kullanıcı adı: + + Taslak + + + Taslak görünümü geçerli belge için mevcut değil. + Yükleniyor... - &Sıfırla + Sıfırla - Tanımlamayı &Göster + Tanımlamayı Göster - Sıfırlama başarısız. Sebep: Başka bir özelliğin değişmesinden ötürü sıfırlama değeri şu an gerçersiz olabilir. + Sıfırlama başarısız. Sebep: Başka bir özelliğin değişmesinden ötürü sıfırlama değeri şu an geçersiz olabilir. Ayrıştırılıyor - İnşâ İşlemi + Derleme İşlemi - O dosyanın inşa eylemi + O dosyanın derleme işlemi Çıktı dizinine kopyala - Dosyanın çıktı dizinine kopyalanıp kopyalanmayacağını belirtir. + Dosyanın, çıktı dizinine kopyalanıp kopyalanmayacağını belirtir. Özel Araç - Dosyayı çıktıya çeviren aletin adını belirler. + Dosyayı çıktıya dönüştüren aracı belirtir. - Özel Alet İsimBoşluğu + Özel Araç Ad alanı - Çıktısını yerleştiren isimboşluğu özel aracını belirtir. + Çıktıyı yerleştiren özel aracın ad alanını belirtir. + + + Dosyanın tam yolu. + + + Mantıksal Ad + + + Gömülü kaynak adı. Eğer boş bırakılırsa, kendiliğinden ad oluşturulur. - Diğer Adlar + Takma Adlar + + + Bir virgülle ayrılmış takma ad listesi. Eğer gerekiyorsa referans derleme ile çakışan sınıf ve ad alanı isimlerinde takma adlar kullanın, örneğin aynı derlemenin farklı sürümleri. Kültür - Bu referans tarafından desteklenen kültür + Referans tarafından desteklenen kültür + + + Gömülü birlikte çalışma türleri + + + Referans derlemede tanımlı COM çalışma türlerinin hedef derlemede gömülü olup olmadığını belirtir. Yerel kopya - Eğer true ise referans edilen tümleşke çıktı dizinine kopyalanır + Eğer doğru(true) ise; referans derleme, çıktı yoluna kopyalanır (İsim) @@ -3156,16 +4031,22 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Referansın adı - Ortak Anahtar Simgesi + Ortak Anahtar İşareti - Açık anahtar + Ortak anahtar işareti + + + Referans derleme + + + Yanlış(False) olarak ayarlanırsa, Bu referans yalnızca bir derleme bağımlılık isteği belirtir ve referans derleme yapılmaz. - Duruma özel uyarlama + Özel Sürüm - Referansın, tümleşkenin belirli bir sürümüne bağlı olup-olmadığını gösterir. + Bu referansın, derlemenin özel bir sürümüne bağlı olup olmadığını gösterir. URL Davranışı @@ -3177,16 +4058,16 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Sürüm - Projenin büyük, küçük, yeniden gözden geçirme ve inşâ numaları + Referansın büyük, küçük, yeniden gözden geçirme ve derleme numaraları Web Referans URL si - Web refarns URL 'si + Web referans URL 'si - ${combineLocation} dosyası zaten var, var olanın üstüne yazılsın mı? + ${combineLocation} çözüm dosyası zaten var, üstüne yazmak istiyor musunuz? '${type}' türünde bir proje oluşturulamıyor. @@ -3197,17 +4078,35 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. ${projectLocation} proje dosyası zaten var, var olanın üstüne yazılsın mı? + + ${fileNames} dosya(lar) zaten var, üzerine yazmak istiyor musunuz? + - Dosya zaten var + Dosya(lar) zaten var - Yüklüyor ${Filename}... + ${Filename} yükleniyor... + + + Çözümü kapat Eski çözümü açık tut - Çözümü yenile + Çözümü yeniden yükle + + + Bu çözüm dışarıdan değiştirildi. + + + Seçilen projeleri dönüştür: + + + Seçilen çalışma çerçevesini değiştir: + + + Seçilen projenin sürümünü değiştir Derleyici Sürümü @@ -3219,11 +4118,23 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. <değiştirmeyin> - Hedef Çatı + Hedef Çalışmaçerçevesi Proje Yükseltmesi + + '${ProjectName}' projesi MSBuild ${OldToolsVersion} hedefliyor, fakat bu sürüm yüklü değil. +Bu projenin MSBuild ${NewToolsVersion} sürümüne yükseltilmesini istiyor musunuz? +Proje yükseltme olmadan açılamaz. + + + MSBuild ${NewToolsVersion} sürümüne yükselt + + + Bu çözüm SharpDevelop önceki bir sürümü kullanılarak oluşturulmuş. +Eğer yükseltmek isterseniz, yeni bir dil veya yeni çalışmaçerçevesi özelliklerini kullanabilirsiniz. + Şu anki ortam bulunamadı. 'Seçenekler->Görsel Biçim' e gidin ve şu anki dil ortamını değiştirin. @@ -3232,7 +4143,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Olanların hepsini işaretle - Olanların hepsini değiştir. + ${Count} değişimlerini yap. Tüm Testler @@ -3240,14 +4151,29 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Kod Kapsama + + XML çıktı dosyası oluştur + + + Herbir testi etiketle + + + Gölge kopya + Logoyu göster - İlerleme durmunu göster + İlerleme durumunu göster + + + Ayrı bir konu üzerinde testler çalıştır + + + Kod kapsama ile tüm testleri çalıştır - Birimi test tepsisinde çalıştır + Birimi test ortamında çalıştır Şu anki projedeki testleri çalıştır @@ -3258,11 +4184,62 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Hata ayıklayıcı ile çalıştır + + ${Name} test ediliyor... + + + Test + + + Ünite testleri çalıştırılamıyor.'{0}' dosyası bulunamıyor. + + + Web + + + Uygulama zaten var. + + + Uygulama / sanal dizin oluştur + + + Web sunucu seçeneklerini etkisizleştir + + + Yerel IIS veya IIS Express bulunamadı. + + + ASP.NET/IIS(Express) ({0}) çalışan işlemi bulunamadı. + + + Belirtilen harici program veya URL yok. Web sunucusunda Web sekmesi - Proje Özelliklerini kontrol edin. + + + Sunucu portu: + + + Proje Url: + + + Web Sunucusu + + + Hata ayıklayıcı işleme ekleme yapamadı. + + + IIS Express Web sunucusunu kullan + + + Yerel IIS Web sunucusunu kullan + + + Uygulama/sanal dizin oluşturuldu. + - Uzantı Ekle + Uzantıları Ekle - WiX Uzantıları Dosyaları + WiX Uzantı Dosyaları WiX Kütüphane Dosyaları @@ -3276,32 +4253,45 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Uzantılar + + Kültürler: + - ICE'leri bastır + ICE'leri dışla: Uyarılara hata muamelesi yap: - WiX MSBuild uzantı yolu + WiX MSBuild uzantıları yolu: - WiX hedefleri konumu: + WiX hedefleri yolu: - WiX görevleri konumu: + WiX görevleri yolu: - WiX konumu: + WiX araç yolu: + + + WiX Değişkenler: Belgede, '{0}' numaralı diyalog bulunamadı. + + Eklenti, şu formda olmalıdır:Sınıf,Çevirme + +Örneğin: + +Microsoft.Tools.WindowsInstallerXml.Extensions.NetFXCompiler, WixNetFxExtension + Kütüphane - Bağlama + Bağlantılama Ad @@ -3318,6 +4308,9 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Kur dosyaları bulunamadı. WiX dosyaları hata içeriyor. + + Herhangi bir TARGETDIR dizini veya DirectoryRef öğesi bulunamıyor. Mevcut değil veya WiX belgesi WiX 3.0 için değildir veya alanadı "http://schemas.microsoft.com/wix/2006/wi" değildir. + '{0}' projesinde hiçbir WiX(.wxs) dosyası bulunamadı. @@ -3334,7 +4327,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Önişleme - WiX Uzantısı Ekle + WiX uzantısı Ekle WiX Kütüphanesi Ekle @@ -3342,14 +4335,17 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Yükleme Paketi + + Modül Birleştirme + WiX Kütüphanesi - Diyalogları Ayarla + İletişim Kutularını Ayarla - '{0}' içinde '{1}' bulunamadı + '{1}' içinde '{0}' bulunamadı Ekle... @@ -3361,16 +4357,16 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Gerekli olan '{0}' özelliği kayıp. - Wix belgesinde hiçbir kurulum diyaloğu yok. Lütfen imleçi diyalog elemanının içine hareket ettirin yada bir diyalog açmak için Kurulum Diyalogları penceresini kullanın. + Wix belgesinde kurulu bir iletişim kutusu yok. Lütfen imleci bir İletişim Kutusu elemanına hareket ettirin yada İletişim Kutularını Ayarla penceresini kullanın. Yönetici Araçları - Uygulama Verileri + Uygulama Verisi - Uygulama Ortak Verisi + Ortak Uygulama Verisi Ortak Dosyalar 64 @@ -3388,7 +4384,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Yazı tipleri - Yerel Uygulama Verileri + Yerel Uygulama Verisi Resimlerim @@ -3403,13 +4399,13 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Program Dosyaları - Program menüsü + Program Menüsü Gönder - Başlangıç Menüsü + Başlat Menüsü Başlangıç @@ -3445,7 +4441,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. WiX Yerelleştirme Dosyaları - .NET Çatı Uzantısı + .NET Framework Uzantısı Fark bulunamadı @@ -3460,19 +4456,49 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. COM+ ve Mesaj Kuyruğu Uzantısı(pubca) - WiX Hedef Dosyası + WiX Hedefler Dosyası - WiX Görev Dosyası + WiX Görevler Dosyası Visual Studio Uzantısı + + Kopyala + + + Kes + + + Düzeylendir + + + Yapıştır + + + Özellikler + + + Tekrarla + + + Kaldır + + + Araçlar + + + Geri al + + + XAML görünümü + Özel: - Özellik ekle + Nitelik Ekle Özel: @@ -3481,7 +4507,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Eleman Ekle - XSLT &Belirle + XSLT Belirle XSLT Stil Sayfası Belirle @@ -3493,13 +4519,13 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. XPath Sonuçlarını Gizle - XSLT &Aç + XSLT Aç - XSL&T Çalıştır + XSLT Çalıştır - XML Şemasını Seçin + XML Şeması Seç XML 'yi Doğrula @@ -3514,7 +4540,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Şema notlarını göster - XML Ayarları + XML Seçenekleri XML Tamamlama @@ -3535,10 +4561,10 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Şemalar - Şema eklenemiyor. '{0}' isimboşluğu zaten var. + Şema eklenemiyor. '{0}' ad alanı zaten var. - '{0}' şemasının hedef isimboşluğu yok. + '{0}' şemasının bir hedef ad alanı yok. XML Şemaları @@ -3549,11 +4575,29 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Değişiklikler kayıt edilemiyor. + + Nitelik Ekle... + + + Yavru Açıklama Ekle + + + Yavru Eleman Ekle... + + + Yavru Metin Düğümü Ekle + + + Açıklamadan Sonra Ekle + + + Açıklamadan Önce Ekle + - -Dan Sonra Eleman Ekle... + -dan Sonra Eleman Ekle... - -Dan Önce Eleman Ekle... + -dan Önce Eleman Ekle... Metin Düğümünü Sonrasına Yerleştir @@ -3568,16 +4612,16 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. XML Ağacı - İsim boşluğu + Ad alanı - İsim boşlukları + Ad alanları - XPath sorgu sonucu 0 nesne bulundu. + XPath sorgusunda 0 öğe bulundu. - Ön Ek + Önek Sorgulama @@ -3597,35 +4641,59 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. XSLT Çıktısı + + ILSpy belirtilen konumda bulamadı ya da SharpDevelop'un erişim için yeterli hakları yok. + + + ILSpy yolu henüz belirtilmedi. + + + ILSpy aç + + + Bu özellik, ILSpy gerektirir. Henüz kurulu değilse, ücretsiz olarak indirebilirsiniz: + + + ILSpy.exe tam yolu: + + + ILSpy yolunu ayarla + - Dış araçlar kurulumu yüklemeniyor. + Dış araçlar yapılandırma dosyası yüklenemiyor. - Şablon kurulum dosyası yüklenemiyor + Şablon yapılandırma dosyası yüklenemiyor Proje şablonu yüklenirken hata oluştu + + SharpDevelop kapatılmadan önce derleme bitirilmelidir. + + + Derleme iptal edildi. + - İnşâ Başarısız. + Derleme başarısız. - İnşâ başarı ile tamamlandı. + Derleme başarılı oldu. - İnşâ başladı. + Derleme başladı. - ------ İnşâ başladı: Proje: ${Project} Konfigurasyon: ${Config} ------ + ------ Derleme başladı: Proje: ${Project} Yapılandırma: ${Config} ------ - İnşâ Ediliyor + Derleniyor Derleniyor - COM birlikte-işerlik tümleşkesi inşâ ediliyor... + COM birlikte çalışma çevrimi derleniyor... Çalıştır: ${Script} @@ -3637,7 +4705,10 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Ana derleme yapılıyor... - İnşâ tamamlandı -- ${Errors} hata, ${Warnings} uyarı + Derleme tamamlandı -- hata ${Errors}, uyarı ${Warnings} + + + ${Name} atlandı (SharpDevelop içinde değişiklik yapılmadı) SharpDevelop @@ -3645,6 +4716,18 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Değişiklikleri iptal etmek istediğinizden emin misiniz? + + Yerel değişken + + + ad alanı + + + parametre + + + Aşırı yükleme + Geçerli değişiklikleri kaydetmek istiyor musunuz? @@ -3657,17 +4740,26 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Hazır + + Tampon belleklerdeki tüm sık kullanılanları sil. + Sık Kullanılanı Sil - Tümünü etkin/pasif kıl + Tümü etkin/etkisiz - Bir sonraki sık kullanılana git + Sonraki sık kullanılana git - Bir önceki sık kullanılana git + Önceki sık kullanılana git + + + {0} @line {1} + + + Konum Sık Kullanılanlar @@ -3676,13 +4768,13 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Geri - Temel tipler + Temel türler Diğer Üyeleri Göster - Gizli Üyeleri Göster + Private Üyeleri Göster Proje Referanslarını Göster @@ -3691,10 +4783,10 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Protected Üyeleri Göster - Genel Üyeleri Göster + Public Üyeleri Göster - Sınıf Görünümü Seçenekleri + Sınıf Görünüm Ayarları Aramayı Temizle @@ -3703,13 +4795,13 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Ara - Türemiş tipler + Türemiş türler İlet - Hiçbir sonuç bulunamadı. + Arama sonucu olumsuz. Sınıf Görünümü Arama @@ -3718,13 +4810,13 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Sınıflar - Tümüzü Temizle + Tümünü Temizle - Çıktıyı göster: + Çıktısını göster: - Metni Kaydir/ma + Sözcük Kaydırmaya Geç DuraksamaNoktaları @@ -3738,8 +4830,11 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Semboller olmadan bir işleve geçemezsiniz. + + Hata ayıklama sembolleri olmadan bir işlevi değiştiremezsiniz. Ya semboller ile yeniden derleyin yada "Sembolsüz Tekrar Derle" seçeneğini etkinleştirin. + - [Dış İşlevler] + [Dış Yöntemler] Fonksiyon değiştir @@ -3747,6 +4842,9 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Dil + + Modül + Argüman adlarını göster @@ -3754,19 +4852,94 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Argüman değerlerini göster - Dış işlevleri göster + Dış yöntemleri göster + + + Satır numarasını göster + + + Modül adlarını göster + + + Sor + + + Kesme + + + Kesme noktası + + + Kesme noktası vurgusu! + + + Kesme noktası vurgusu satır {1} de {0} . + + + Kesme noktası vurgusu satır {1}de {0} çünkü {2} + + + Koşullu + + + Koşul + + + Devam + + + Kesme noktası etkisiz + + + Kesme noktasını etkin + + + Sözdizimini kontrol et + + + Betik dili + + + Hata Ayıklayıcı Betiği Düzenle + + + Sınırla + + + İz + + + Konsol + + + Kesme Devam - Hatanın önü kesilemedi. Hatası ayıklanan program daha fazla devam edemez. + İstisnaya müdahale edilemedi. Hata ayıklaması yapılan program daha fazla devam edemez. + + + Yakalanan istisnaya müdahale edilemedi. Hata ayıklama sembolleri istisna kaynağı için mevcut olmayabilir. + + + İstisna Detaylarını Gizle + + + --- İç istisna yığını izlemesi sonu --- + + + {0}da - {0} üzerinde {1} içinde : satır {2} + {1} içinde {0} üzerinde:satır {2} - {0} istisnası hata ayıklama için atıldı: + {0} türü bir hata: + + + İstisna Detaylarını Göster Durdur @@ -3774,15 +4947,24 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. İstisna + + Yakalanan istisna + + + Bilinmeyen istisna + - Hata Geçmişi + İstisna geçmişi - Hata + İstisna Zaman + + Göster/Gizle Yakınlaştırma Kontrolü + Yerel @@ -3790,10 +4972,10 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Yerel değişkenler - Taban nesne + Temel sınıf - Hata ayıklayıcı çalışırken değişkenlere göz atamazsınız. + Hata ayıklayıcı çalışırken değişkenleri inceleyemezsiniz. {0} dan {1} e çevrilemez @@ -3807,20 +4989,68 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Değeri panoya yapıştır + + Ad + + + Public üyeler dışında + + + Public Static üyeler dışında + - Gizli üyeler + Private üyeler - Gizli Durağan Üyeler + Private Static Üyeler Hatanın tümünü göster... - Değerleri onaltılık düzende göster + Değerleri onaltılık göster - Durağan üyeler + Static üyeler + + + Tür + + + Değer + + + Hafıza + + + {0} adresi bulunamadı! + + + Ekran bayt boyutu: + + + Adrese atla: + + + Diğer sanal adresler + + + Bellek adresleri eşleştirilemedi! + + + Hata ayıklanamıyor veya işlem yürütülemiyor! + + + Önceki sanal adresler + + + {0} dan {1} e okunuyor - boyut {2}. + + + Mevcut adresleri yinele + + + {1} boyutlu {0} adresi okunamıyor. Yüklü modüller @@ -3828,30 +5058,51 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Adres + + (dinamik) + - Bir Sembol Yüklenmedi. + Semboller yüklenmedi. Semboller yüklendi. + + (hafızada) + Sıra - Proğram + Program Semboller - Zaman Damgası + Zaman Ekleme Sürüm + + Nesne Grafiği + + + Paralel Yığınlar + + + İmleç çalıştır + Geçerli ifadeyi ayarla + + Hata ayıklamayı durdurmak istiyor musunuz? + + + İşlemden ayırsın veya sonlandırsın mı? + Yürütme birimleri @@ -3861,9 +5112,15 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Bir sonraki adıma geçemezsiniz çünkü; bir aktif işlev seçilmemiş + + Mevcut hiçbir çerçeve ile bir iş parçacığını değiştiremezsiniz. + Hata ayıklayıcı çalışırken iş parçacıklarını değiştiremezsiniz. + + Yararlanılabilir derlenmiş kod seçenekleri olmadan, derlenmiş kod parçacığını değiştiremezsiniz. + Dondur @@ -3891,6 +5148,30 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. İş parçacığı değiştirme + + Geçiş Yöntemini Göster + + + İzleme + + + İzleme Ekle + + + Izleme için bir tanım girin: + + + Geçersiz tanım: {0} + + + Yenile + + + Hepsini kaldır + + + İzlemeyi kaldır + Tanım Görünümü @@ -3898,7 +5179,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Hatalar - ${TaskService.Errors} Hata + ${TaskService.Errors} Hataları Hataların listede gösterilip-gösterilmeyeceğini seçin @@ -3910,7 +5191,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Mesajların listede gösterilip-gösterilmeyeceğini seçin - ${TaskService.Warnings} Uyarı + ${TaskService.Warnings} Uyarıları Uyarıların listede gösterilip-gösterilmeyeceğini seçin. @@ -3945,11 +5226,17 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Yardım + + Taslak + + + Bu belge için kullanılabilir bir taslak içeriği yoktur. + Çıktı - İnşâ + Derle Hata Ayıkla @@ -3973,7 +5260,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Tümünü genişlet - ${Count} dosya + ${Count} dosyalar Düz @@ -3997,7 +5284,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Dosya başına - Arama listesi durumunu seç + Liste modu aramayı seç Son aramaları göster @@ -4012,49 +5299,49 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Araçlar - Şu ankini çökert + Mevcudu daralt - Şu ankini aç + Mevcudu genişlet Sonuçları temizle - Bütün hataları göster + Tüm hataları genişlet - Yoksayılanları uzat + Tüm yoksayılanları genişlet - Şu anki başarısızlıkları uzat + Mevcut hataları genişlet - Şu an yoksayılanları göster + Mevcut yoksayılanı genişlet Ağaç - Doğrulama: hatalı + Doğrulama: başarısız ------ XML Doğrulanıyor ------ - Onaylama: başarılı + Doğrulama: başarılı - Test tümleşkelerini kaldırır, otomatik yüklemeyi iptal eder. + Test derlemeleri yüklenemiyor, kendiliğinden yükleme iptal edildi. Tanimlamaya &git - Şu anki seçili projedeki NUnit 'e referans ekle + Mevcut seçili projedeki NUnit 'e referans ekle - Test tümleşkelerini yeniden yükler + Test derlemelerini yeniden yükler Bütün testleri çalıştır @@ -4069,41 +5356,71 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Testleri durdur - Test etmeyi etkinleştirmek için testleri çalıştır yada yenile 'ye tıklayın + Testleri çalıştıra tıkla yada Testi çalıştırmak için yenile Yükleme hatası - '${TestCase}' testi başarısız, çünkü: '${Message}'. + Test durumu '${TestCase}' başarısız. - '${TestCase}' testi çalıştırılmadı. + Test durumu '${TestCase}' yürütülemedi. - Tümleşke Yükle... + Derleme Yükle... - Referans Edilmiş Tümleşkeleri Yükle + Referanslı Derlemeleri Yükle - Standart Tümleşkeleri Yükle + Standart Derlemeleri Yükle - &Kapat + Kapat Bu hariç hepsini kapat - K&aydet + Kaydet - Farklı Ka&ydet... + Farklı Kaydet... Dosya yolunu/adını kopyala + + Explorer'da klasör içeriğini aç + + + Burada komut istemi aç + + + hedef çalışmaçerçevesini seçin + + + Taşınabilir Sınıf Kitaplığı Araçları bulunamadı. + + + .NET Taşınabilir AltSeti + + + İki veya daha fazla çerçevenin seçilmesi gerekir. + + + Seçili profil: + + + Taşınabilir Kitaplık Profili seç + + + Visual Studio yüklemeden Taşınabilir Sınıf Kitaplığı Araçları'nı yüklemek için,bilgisayarınıza dosyayı(PortableLibraryTools.exe)indirip kaydedin ve bir komut istemi penceresinde kurulum programını çalıştırın.Komut satırında /buildmachine anahtarı ekleyin. + + + Bütün düğümleri daralt + Var olan dosyaları ekle @@ -4135,11 +5452,14 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Web Referansı Ekle - İnşâ et + Derle Temizle + + Tümünü daralt + '${FileName}' dosyasını tamamen sil? @@ -4152,38 +5472,56 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Projeden Dışla + + Özel araçları çalıştır + + + Varolan klasör... + + + Hedef dizine klasörü kopyalamak istiyor musunuz? + - Var olan Öğe... + Varolan Öğe... + + + Öğe, Bağımlı Öğe Olarak Mevcut ... - Var olan Proje... + Varolan Proje... - NDoc ile belgelendirme inşâ et + XML açıklamalarından belgelendirme derle - Projenin inşa ayarlarını xml döküman dosyası üret şeklinde değiştirmelisiniz. + Projenin derleme ayarlarını, bir xml belgeleme dosyası üret şeklinde değiştirmelisiniz. Projeyi derlemelisiniz - xml döküman dosyayı yok, projeyi tekrar derlemelisiniz. + xml döküman dosyası yok, projeyi derlemelisiniz. + + + XML açıklama belgeleri oluşturabilmek için 'Sandcastle Yardım Dosyası Derleyicisi'nin kurulu olması gerekir. - Html İhraç + Html Dışa Aktar Projeye dahil et - Derleme + Derle Yerleştir + + Yeni Bağımlı Öğe ... + - Y&eni Dizin + Yeni Klasör Yeni Öğe... @@ -4192,16 +5530,22 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Yeni Proje - Yeni Çözüm Dizini + Yeni Çözüm Klasörü + + + Bu proje bir web projesi değil. - &Aç + + + + Çıktı Klasörü Aç - Yeniden inşâ et + Yeniden derle - Web Referansını Tazele + Web Referansını Yenile Yeniden Adla&ndır @@ -4209,11 +5553,17 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Projeyi Çalıştır + + Projeyi Hata Ayıklamadan Çalıştır + Başlangıç Projesi olarak Ata + + Tarayıcıda görüntüle + - Yeni Dizin + Yeni Klasör {0} projesinden tüm web referanslarını silmek istiyor musunuz? @@ -4222,19 +5572,19 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Tüm web referanslarını sil - Bileşkeler (*.dll)|*.dll + Derlemeler (*.dll)|*.dll - Tümleşke + Derleme Sınıf adı - Derleme + Derle - Tümleşke oluştur + Derleme oluştur ECMA betiği @@ -4243,7 +5593,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Son - Açıkca yakala + Açık yakala Gruplar @@ -4264,10 +5614,10 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Çok satırlı - İsim boşluğu + Ad alanı - Açıkca gözükür + Açıkça görünür Düzenli ifade @@ -4276,7 +5626,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Değiştir - Değiştirme metni + String değiştirme Sonucu değiştir @@ -4306,10 +5656,10 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Regex derlenemedi, çünkü: - Regex oluşturma hatası oluştu, çünkü: + Regex oluşturma hatası, çünkü: - Dosya başarılı bir biçimde olşturuldu: + Dosya başarılı bir biçimde oluşturuldu: Lütfen geçerli bir dosya adı girin @@ -4318,28 +5668,28 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Lütfen bir dosya adı girin - Eşle + eşle eşleşenler - Lütfen bir düzenli ifade girin + Lütfen düzenli bir ifade girin - Rakam + Sayısal karakter - Sayı olmayan karakter + Sayısal olmayan karakter Boşluk olmayan karakter - Kelime benzeri harf değerleri + Sözcük olmayan karakter değeri - Karnı-tok joker + Dolu yıldız Boşluk karakteri @@ -4362,38 +5712,44 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Kaynak yüklenemiyor + + Hata: Kaynak kodu üreteci "{0}" kaynak dosyasını atladı, çünkü oluşturulan sınıf mevcut sınıf "{1}" ile çakışıyor. + + + Kaynak kod üreteci: '{0}' kaynağı için hiçbir kaynak özelliği oluşturamıyor. + İçerik - Dosyaları &ekle... + Dosyaları ekle... - Metin girişi ekle + String girişi ekle Kaynak adı kopyala - &Yeniden adlandır + Yeniden adlandır - Hex Kodu Göster + Onaltılı Yığın Olarak Göster Tür - Bu anahtar daha önceden tanımlandı! Lütfen başka birini seçin. + Bu anahtar daha önceden tanımlandı! Lütfen başka bir tane seçin. Tüm dosyalar (*.*) - Tümleşke dosyaları (*.exe, *.dll) + Çevirme dosyaları (*.exe, *.dll) - Binary(ikili) dosyalar + İkili dosyalar Boo Dosyaları @@ -4411,13 +5767,13 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. C# Dosyaları (*.cs) - CSharp Proje Dosyaları + C# Proje Dosyaları İmleç dosyaları - Çalıştırılabilir Dosyalar(*.exe;*.com;*.pif;*.bat;*.cmd) + Çalıştırılabilir Dosyalar (*.exe;*.com;*.pif;*.bat;*.cmd) Simge Dosyaları (*.ico) @@ -4432,10 +5788,10 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Resim dosyaları - Anahtar dosyalar + Anahtar dosyaları - NAnt İnşâ Dosyaları + NAnt Derleme Dosyaları SharpDevelop 1.1 Proje Dosyaları (*.prjx) @@ -4453,7 +5809,7 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Visual Basic Proje Dosyaları - Xml Dosyaları (*.xml) + XML Dosyaları (*.xml) XML Şema Dosyaları (*.xsd) @@ -4470,41 +5826,65 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Adımlar + + Akış eklendi! + + + ${Name} Temel sınıfları + Bu işlem yerine getirilemez çünkü kaynak kodlarınızda hata var: - Eleman kullanıcı kodunda tanımlanmadığı için adlandırılamıyor. + Eleman kullanıcı kodunda tanımlanmadığı için adı değiştirilemiyor. + + + Düzeltme pozisyonunda eleman adı değiştirilemez. ${Name} 'den türeme sınıflar + + Otomatik özelliği dönüştür + - Changed-event oluştur + Değişmiş olay oluştur - Getirici oluştur + Alıcı oluştur - OnEvent-işlevi oluştur + Olay üzerinde yöntemi oluştur Özellik oluştur - Şu anki işlev + Mevcut yöntem Tanımlama türü + + Otomatik özelliği genişlet + + + Arayüzü Çıkar + + + Temel sınıfları bul + Türetilmiş sınıfları bul + + Türetilmiş semboller bul + Referanslar bulunuyor... - Aşırı yüklemeleri bul + Geçersiz kılmaları bul Referansları bul @@ -4513,37 +5893,46 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Referansları bul - Taban sınıfa git + Temel sınıfa git - Tabana git + Temele git Özelliğe git + + Soyut sınıf gerçekleştir + - Arayüz gerçekle + Arayüz gerçekleştir Arayüz gerçekle(açıktan) - Arayüz gerçekle (örtük) + Arayüz gerçekleştir (örtük) - İsimler ssadece harf,rakam yada alttan tire içerebilir. + İsimler sadece harf,rakam yada alt tire içerebilir. İsimler bir harf veya alt çizgi ile başlamalıdır. - Bütün sayfalar parçalanana değin Bul referansları çalıştırılamaz. + Bütün dosyalar çözümlene kadar Bul referansları çalıştırılamaz. Sınıfı '${FileName}' dosyasına taşı + + ${Name} geçersiz kıl + + + ${Name} referansları + - Kullanılmayan import komutlarını kaldır + Kullanılmayan dahil edilmiş ifadeleri kaldır Yeniden adlandır @@ -4552,13 +5941,13 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Sınıfın yeni adını girin: - &Yeniden adlandır + Yeniden adlandır SharpDevelop {0} özelliğini {1} olarak yeniden adlandırsın mı? - Dosya adını '${FileName}' olarak değiştir + Dosyayı '${FileName}' olarak değiştir Üyenin yeni adını girin @@ -4578,32 +5967,48 @@ Sadece harf,rakam, boşluk, '.' yada '_' kullanabilirsiniz. Lisanslar + + Geçerli belge için herhangi bir araç yok. + XSL-T - Bilinen bütün proje formatları + Bilinen tüm proje formatları + + + Bu SharpDevelop sürümü, Visual Studio .NET 2003 (veya öncesi) kullanılarak oluşturulan projeleri yükleyemiyor. +Dönüşüm için SharpDevelop 3.2 sürümünü kullanmayı deneyin veya varolan kaynak kodu yeni bir proje dosyasına ekleyin. + + + {0} kaydedilemiyor:\n{1} + + + {0} çözüm dosyası kaydedilemiyor. Salt okunur olarak işaretlenmiş. + + + {0} kaydedilemiyor:\n{1}\n\nDosyanın yazılabilir olduğundan emin olun. - Projede kaynak dosyaları vardı. -SharpDevelop 2 kaynakları farklı bir biçimde derler: kaynak adı sadece dosya adı değildir; başında kök isim boşluğu ve dizin adıda vardır. + Projede kaynak dosyaları var. +SharpDevelop 2 kaynakları farklı bir biçimde derler: kaynak adı sadece dosya adı değildir; başında root alanadı ve dizin adıda vardır. Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. - Takip eden dosyalar yeniden adlandırılamadı/taşınamadı: + Takip eden dosyalar kendiliğinden yeniden adlandırılamadı/taşınamadı: '{0}' geçerli bir çözüm dosyası değil. - Microsoft {0} Çözüm dosyası biçimini okuyamıyor. + Microsoft Çözüm dosyası biçimi {0} okunamıyor. Veritabanı - SharpDevelop Raporlama + SharpDevelop Raporları Alanı Kes @@ -4618,13 +6023,13 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Gruplama/Sıralama - Yapıştır Alanı + Alanı Yapıştır Önizlemeyi Göster - Görünür Kesim + Görünür Kısım Temel Ayarlar @@ -4633,31 +6038,31 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Tasarım - AyrıntıKısmı + Ayrıntı Kısmı - SayfaSonu + Sayfa Sonu - SayfaBaşlığı + Sayfa Başlığı - RaporAltBilgi + Rapor AltBilgi - RaporBaşlığı + Rapor Başlığı Raporu yazıcıya yolla - SharpDevelop Rapor Sistemini çalıştırabilmek için en az bir(1) çalışır yazıcıya ihtiyacınız var. + SharpDevelop Raporlarını yürütmek için en az bir kurulu yazıcı olmalı. Bu rapor 'SharpReport' ile oluşturulmamış. - Dosya okunamadı, dosya bozuk (SharpReportFile 'ın biçimi bozuk) + Dosya okunamadı, dosya bozuk (SharpRaporDosyası'nın biçimi bozuk) Mevcut Alanlar @@ -4666,7 +6071,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Düğüm kaldır - Sıralamayı ters-düz et + Sıralamayı tersine çevir Düğümleri Kaldır @@ -4692,23 +6097,32 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Rapor Üretici + + Rapor Gösterici + İlk Sayfa Son Sayfa + + Diğer + - Oluşturulan dosyalar + Oluşturulan sayfalar Pdf Dosyası Oluştur + + Önceki + Yakınlaştır - Çember + Döngü Raporlama - Kontroller @@ -4717,7 +6131,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. VeriAlanı - DataSatırı + VeriSatırı Raporlama - Fonksiyonlar @@ -4726,11 +6140,17 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. SayfaNo - Sayfaların SayfaNumarası + Sayıların Sayfa Numarası Bugün + + Grup Altbilgisi + + + Grup Üstbilgisi + Resim @@ -4743,23 +6163,26 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Dikdörtgen + + Tablo + Etiket - Taban ayarlar + Temel ayarlar Rapor Türü - Dosya adı + Dosya Adı Grafik Birim - Basit rapor ayarları + Temel rapor ayarları Rapor Modeli @@ -4768,25 +6191,43 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Form Sayfası - Veri Çek + Veri Çekme Verileri Bas + + Rapor Adı + Rapor Türü + + Grup Sütunu Seç + + + Gruplama + + + Liste Düzeni + + + Rapor Düzeni + + + Tablo Düzeni + - Veri Modelini Çek + Veri Modeli Çek Komut Metni - [Bu metni silip yerine geçerli bir SQL sorgusu girin] + [Bu metni silip yerine geçerli bir SQL String girin] - İtme Veri Modeli + Veri Modeli Bas Mevcut Alanlar @@ -4798,31 +6239,31 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Sonuçları Kaydet (Şema ve Veriler) - Sonuçları Kaydet(Şema(*.xsd) halinde) + Sonuçları Kaydet(Sadece şema) Sorgu Sonucunu Göster - Sekme &Ekle + Sekme Ekle - Sekmeyi &Sil + Sekmeyi Sil - "${TabHeader}" sekmesini gerçekten silmek istiyor musunuz(bu ayrıca sekmedeki bütün öğeleride silecektir)? + "${TabHeader}" sekmesini gerçekten silmek istiyor musunuz(ayrıca sekmedeki bütün öğelerde silinecektir)? - Öğeyi &Sil + Öğeyi Sil - "${TabItem}" yi gerçekten silmek istiyor musunuz? + "${TabItem}" öğesini gerçekten silmek istiyor musunuz? - Sekmeyi &YenidenAdlandır + Sekmeyi Yeniden Adlandır - Öğeyi &YenidenAdlandır + Öğeyi Yeniden Adlandır Yazarları Göster @@ -4831,13 +6272,13 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Yazarlar - Değişiklikler Günlüğünü Göster + Günlüğü Göster - DeğişimKaydı + Günlük - Bizimle irtibat geçin + Bize Ulaşın Yardım Aranıyor @@ -4849,7 +6290,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Proje Seç - Yer + Konum Değiştirilmiş @@ -4867,31 +6308,34 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Başlangıç Sayfası - YER + INS - ÜYZ + OVR - sat ${Line} süt ${Column} ha ${Character} + satır ${Line} sütun ${Column} ${Character} Çeşitli - Kur + Kurulum Windows Uygulamaları - ConfigurationElement gerçeklemesi yapan sınıf. + Yapılandırma Elemanı Gerçekleştirme Sınıfı. + + + Yapılandırma Elemanı - ConfigurationElementCollection 'den türeme sınıf. + Yapılandırma Eleman Koleksiyonundan türeme sınıf. - Nesne Yığını Ayarları + Yapılandırma Elemanı Koleksiyonu ConfigurationSection gerçeklemesi yapan sınıf @@ -4911,8 +6355,14 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Boş Dosya + + Yeni bir istisna Sınıf oluştur. + + + İstisna + - Bir Gtk# uygulaması için bir pencere + Bir Gtk# uygulaması için pencere Gtk# Penceresi @@ -4930,7 +6380,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Boş bir HTML dosyası oluşturur. - Boş bir arayüz tanımlaması. + Boş bir arayüz tanımlama. Arayüz @@ -4942,22 +6392,22 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Modül - "İnşâ" hedefi boş olan bir MSBuild dosyası oluşturur. + Boş bir "Derleme" hedefi ile bir MSBuild dosyası oluşturur. MSBuild dosyası - "Benim" isim boşluğunu uzatan sınıf için bir şablon. + "My" ad alanını uzatan sınıf için bir şablon. - "Benim" uzantılarım + "My" uzantılar - Yeni bir NAnt inşâ dosyası oluşturur. + Yeni bir NAnt derleme dosyası oluşturur. - NAnt inşâ dosyası + NAnt derleme dosyası '#if TEST ... #endif' ekle @@ -4972,10 +6422,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Eğer doğru ise, kur kodu üretilecek. - Yok etme kodu ekle + Yıkma kodu ekle - Eğer doğru ise, yok etme kodu üretilecek. + Eğer doğru ise, yıkma kodu üretilecek. İçerik @@ -4983,6 +6433,9 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Seçenekler + + Uygulamanız son açılan dosyaları depolamak için Yapılandırma Koleksiyonunu kullanır. + Son açılan dosyalar @@ -4990,10 +6443,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. boş bir kaynak dosyası oluşturur - Kaynak dosyayı boşalt + Boş kaynak dosyası - Bu sınıf sürekli nesnelere kolay erişimi tanımlar. + Bu sınıf kalıcı özelliklere kolay erişimi tanımlar. Eklenti Seçenekleri @@ -5008,31 +6461,31 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Bir #D seçenek paneli. - Ayar Paneli + Seçenek Paneli - Çeşitli olaylar için kullanılabilecek bir komut. + Çeşitli durumlar için kullanılabilecek bir komut. Basit Komut - Bir #D tepsi içeriği (örneğin #D kaşifleri). + Bir #D ortam içeriği (örneğin #D gözcüleri). - Boş Tepsi + Boş Ortam - Bir #D görünüm içeriği ( örneğin metin düzenleyici yada kaynak düzenleyici). + Bir #D görünüm içeriği ( örneğin metin düzenleyici veya kaynak düzenleyici). Boş Görünüm - 'Tek sınıf' türü bir sınıf + Singleton deseni izleyen bir sınıf. - Tek Sınıf + Singleton Sınıf Equals() ve GetHashCode() gerçeklemelerini içeren bir yapı belirlemesi. @@ -5040,8 +6493,14 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Yapı + + Equals() and GetHashCode()içeren bir yapı bildirimi uygulanır. + + + Yapı + - Metin dosyasını boşalt + Boş metin dosyası Yeni bir metin dosyası oluşturur. @@ -5059,10 +6518,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. ASP.NET Web Kontrolü - WEb Sayfası: arkasında kod ile .aspx sayfası + Web Form: arka kod ile .aspx sayfası - ASP.NET Web Sayfası + ASP.NET Web Form + + + Arka kod ile ASP.NET Web İşleyici Oluştur. + + + ASP.NET Web İşleyici ASMX Web Servisi için Bileşen Çatısı @@ -5107,10 +6572,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. WPF Penceresi - WiX için boş parça dosyası + WiX için boş bölüm dosyası - Boş WiX Parça Dosyası + Boş WiX Bölüm Dosyası Boş bir kurulum penceresi oluşturur. @@ -5119,7 +6584,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Boş Kurulum Penceresi - Üzerine bazı kontroller olan kurulum penceresi oluşturur. + Üzerinde bazı varsayılan kontroller olan kurulum penceresi oluşturur. Kur Diyaloğu @@ -5134,16 +6599,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Boş bir kurulum projesi oluşturur. - Boş Kur Projesi + Boş Kurulum Projesi - Uygulamanız için bir uyg.config dosyası oluşturur. Eğer bu proje çalıştırabilir ise MSBuild uygadı.exe.config olarak değiştirir. + Uygulamanız için bir uygulama.config dosyası oluşturulur. Eğer bu proje çalıştırabilir ise MSBuild uygulamaadı.exe.config olarak değiştirir. - Uyg.Ayar Dosyası + Uyg.Config Dosyası - XML dosyasını boşalt + Boş XML dosyası Boş bir XML dosyası oluşturur. @@ -5161,16 +6626,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. XML Kullanıcı Kontrolü - Projeleri olmayan boş bir çözüm olşturur. + Projesiz boş bir çözüm oluşturur. Boş çözüm - Başka uygulamaların içinde kullanılabilen sınıflar oluşturan bir proje. + Başka uygulamalarda kullanılabilen sınıflar oluşturan bir proje. - Sınıf Kütüphanesi + Sınıf Kitaplığı Komut satırı uygulaması oluşturan proje. @@ -5178,6 +6643,12 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Konsol Uygulaması + + Yönetilmeyen(yerli) kodlu komut satırı uygulamasına sahip bir proje oluşturur. + + + Yönetilmeyen konsol projesi + Direct3D arayüzlü uygulama yapabilmek için bir proje. @@ -5185,25 +6656,31 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Direct3D uygulaması - Boş proje + Boş bir proje. Boş Proje - Glade# uygulaması oluşturan proje + Glade# uygulaması oluşturan bir proje Glade# Uygulaması - Gtk# uygulaması oluşturan proje. + Gtk# uygulaması oluşturan bir proje Gtk# Uygulaması + + Windows, Silverlight, Windows Phone ve Xbox kullanılabilir Kitaplığı. + + + Taşınabilir Sınıf Kitaplığı + - Windows Installer oluşturabilmek için bir proje + MSI Installer oluşturabilmek için bir Windows Installer projesi. Kurulum Projesi @@ -5226,6 +6703,12 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Araçlar menüsü girişi + + Bir Silverlight uygulaması oluşturan bir proje. + + + Silverlight Uygulaması + Görev çubuğuna simge koyan bir uygulama oluşturan proje @@ -5242,13 +6725,13 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. ASP.net web uygulaması - ASP.NET Web sayfası projesi + ASP.net Web sayfası projesi - ASP.NET Web Hizmeti oluşturan bir proje. + ASP.NET Web Servisi oluşturan bir proje. - ASP.NET Web hizmeti + ASP.NET Web Servisi Windows arayüzlü bir uygulama oluşturan proje. @@ -5269,10 +6752,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. WPF Uygulaması - Tek seyrüsefer sayfası olan basit bir WPF uygulaması oluşturur. + Tek gezinme sayfası olan basit bir WPF uygulaması oluşturur. - WPF Seyrüsefer Uygulaması + WPF Gezinme Uygulaması Rapor Sihirbazını kullanarak yeni rapor oluştur @@ -5280,20 +6763,23 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Kenarçubuğu Yapılandır... + + Analiz + - İnşâ + Derle - İnşâyı İptal Et + Derlemeyi İptal Et - İptal + Kesme - ${CurrentProjectName} İnşa et + ${CurrentProjectName} Derle - Çözümü İnşâ et + Çözümü Derle ${CurrentProjectName} Temizle @@ -5302,19 +6788,19 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Çözümü Temizle - Konfigürasyon/platform düzenle + Yapılandırmalar/platformlar düzenle ${CurrentProjectName} Yayınla - Çözümü Yaınla + Çözümü Yayınla - ${CurrentProjectName} Yeniden inşa et + ${CurrentProjectName} Yeniden derle - Çözümü Yeniden İnşâ et + Çözümü Yeniden Derle Yapılandırmayı ayarla @@ -5326,10 +6812,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Hata Ayıkla - İşleme Katıl... + İşleme Ekle... - Duraksa + Duraksat Hata ayıklama işlemini duraksat @@ -5338,13 +6824,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Hata ayıklamaya devam et - İşlemin yürütmesine devam eder. + İşlemin yürütülmesine devam edilir. Bırak - Programın .NET Framework sürüm numarası bulunamadı. Programın yönetilen bileşke olup-olmadığını kontrol edin. + Programın .NET Framework sürüm numarası bulunamadı. Programın yönetilen derleme olup olmadığını kontrol edin. + + + İşleme eklenemiyor. İşlem başlatılamıyor. @@ -5353,7 +6842,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Hata ayıklama işlemi sürdüğünden eylem gerçekleştirilemedi. - Çekirdek hata ayıklayıcısı aktif olduğundan SharpDevelop hata ayıklayıcısı başlatılamaz. Çekirdek hata ayıklayıcısını kapatmak için Boot.ini dosyasındaki "/debug"i kaldırın ve bilgisayarı yeniden başlatın. + Çekirdek hata ayıklayıcısı aktif olduğundan SharpDevelop hata ayıklayıcısı başlatılamaz. Çekirdek hata ayıklayıcısını kapatmak için Boot.ini dosyasındaki "/debug" anahtarını kaldırın ve bilgisayarı yeniden başlatın. .NET Framework 1.0 a ait uygulamaların hata ayıklama işlemleri için destek verilmiyor. @@ -5362,28 +6851,34 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Hata ayıklama safhasına geçmediğiniz için bu özelliği kullanamazsınız. - İşleme ara verdiğiniz için bu komutunuz yerine getirilemiyor. + İşleme ara verdiğiniz için bu eylem gerçekleştirilemiyor. - İşlem yürütülüyor olduğu için bu komutunuz yerine getirilemiyor. + İşlem yürütüldüğü için bu eylem gerçekleştirilemiyor. + + + Bütün kesme noktalarını kaldır + + + Önceki derlemeyi çalıştır - Hata ayıklayıcı olmadan çalıştır + Hata ayıklamadan çalıştır Programı normal olarak çalıştırır. - İçeri atla + İçeri gir İçeri gir - Dışa atla + Dışarı çık - Dışına Çık + Dışarı çık Üstünden Atla @@ -5395,28 +6890,28 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. İşlemi durdur - Şu anki süreci durdurur ve hata ayıklamayı sona erdirir. + Mevcut süreci durdurur ve hata ayıklamayı sona erdirir. - Durma İşareti + Kesme noktası İşareti - &Düzen + Düzen - &Kopyala + Kopyala - Seçili kısmı panoya kopyala + Seçimi panoya kopyala - &Kes + Kes - Seçili kısmı panoya taşı + Seçimi panoya taşı - &Sil + Sil Sil @@ -5431,10 +6926,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Bütün katlamaları tersine çevir - Katlamayı ters çevir + Katlamayı tersine çevir - &Biçimlendir + Biçimlendir Büyük harfe çevir @@ -5452,10 +6947,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Küçük Harfe - Öndeki boşlukları kaldır + Öndeki Boşlukları Kaldır - İzleyen Boşlukları Kaldır + Takipeden Boşlukları Kaldır Satırları Sırala... @@ -5473,76 +6968,79 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Yerleştir - &Yapıştır + Yapıştır Yorum olarak kopyala - Metin olarak kopyala + String olarak kopyala Panodan metni yapıştır - &Yinele + Yinele Son geri alma işlemini yinele - Tümünü &Seç + Tümünü Seç - &Geri al + Geri al Son işlemi geri al - &Sözcük Sayısı… + Sözcük Sayısı… - &Dosya + Dosya - Son izlenen dosyalar listesini sil + Son dosyaların listesini sil - Açılan projeler geçmişini sil + Son projeler listesini sil - &Kapat + Kapat - &Dosya + Dosya - &Çözüm + Çözüm - Tüm Belgeleri Ka&pat + Tüm Belgeleri Kapat - Çı&k + Çık - &Yeni + Yeni - &Dosya... + Dosya... Yeni tampon aç + + Proje... + Çözüm... - &Aç + - &Dosya + Dosya Tamponu disk'den aç @@ -5554,58 +7052,61 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Proje/Çözüm Aç - &Yazdır + Yazdır Baskı Önizleme - En son &Dosyalar + En son Dosyalar - En Son P&rojeler + En Son Projeler - Dosyayı &tekrar yükle + Dosyayı tekrar yükle - &Kaydet + Kaydet - Şu anki tamponu kaydet + Mevcut tamponu kaydet - Tümünü K&aydet + Tümünü Kaydet - Şu anki açık bütün tamponları kaydet + Mevcut açık tüm tamponları kaydet - Faklı Kaydet + Farklı Kaydet + + + Kodlama ile kaydet - B&içim + Biçim - &Hizala + Hizala - Dipler + Alt kenarlar - &Ortaya + Merkezler - &Sola + Sol kenarlar - Sağa daya + Sağ kenarlar Izgaraya - Yukarılar + Üst kenarlar Ortalar @@ -5614,10 +7115,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Formda ortala - &Yatay + Yatay - &Düşey + Düşey Yatay Boşluk @@ -5626,7 +7127,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Öne Al - &Kaldır + Kaldır Azalt @@ -5662,19 +7163,19 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Her ikiside - &Yükseklik + Yükseklik - &Genişlik + Genişlik - Izgaraya uydur + Izgara ölçüsü Büyük simgeleri göster - &Özellikler + Özellikler Sekme sırasını göster @@ -5695,10 +7196,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Eşitle - &Yardım + Yardım - &Hakkında... + Hakkında... Yardım içeriği @@ -5707,16 +7208,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Dinamik Yardım - &GPL... + GPL... - &BeniOku... + BeniOku... Kodlama Tarzı Rehberi - &Günün İpucu + Günün İpucu... Yardım Konuları @@ -5725,79 +7226,82 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Web - Bir Öncekine Git + Geriye Git - Seyrüsefer Geçmişini Temizle + Gezinti Geçmişini Temizle - Bir Sonrakine Git + Sonrakine Git - &Proje + Proje Proje Seçenekleri - Yeniden Düzenleme + Yeniden Düzenle - Şu anki projei inşâ eder. + Mevcut projeyi derler. + + + Mevcut çözümdeki tüm projeleri derler. - Etkin projeyi yada tamponu inşâ et(eğer bir proje açık değilse)(otomatik kayıt yapar) + Açık projeyi yada tamponu derle(eğer proje açık değilse)(kendiliğinden kayıt yapar) - Projeyi inşâ edebilmek için hata ayıklayıcıyı durdurmanız gerekir. Hata ayıklamayı durdurmak istiyor musunuz? + Projeyi derleyebilmek için hata ayıklayıcıyı durdurmanız gerekir. Hata ayıklamayı durdurmak istiyor musunuz? Hata Ayıklamayı Durdur - &Çalıştır + Çalıştır Derlenmiş exe 'yi çalıştır(yeniden derler) - &Ara + Ara - Bütün Yer İmlerini Temizle + Tüm Yer İmlerini Temizle - Şu anki tampondaki bütün yer imlerini temizle + Mevcut tampondaki tüm yer imlerini temizler - &Bul... + Bul... - &Sonrakini Bul + Sonrakini Bul - &Secili metnin sonraki eşini bul + Sonraki seçimi bul - Satır Numarasına Git... + Git... - Denkleşen Küme İşaretine Git + Eşleşen Paranteze Git Artan Arama - Bir sonraki yer imi + Sonraki yer imi - Bir sonraki yer imine git + Sonraki yer imine git - Bir Önceki Yer İmi + Önceki Yer İmi - Bir önceki yer imine git + Önceki yer imine git Değiştir... @@ -5809,20 +7313,20 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. Yer imlerini ters çevir - Şu anki satıra yer imi koy/kaldır + Mevcut satıra yer imi koy/kaldır - &Araçlar + Araçlar - &Kodu çevir + Kodu çevir - Bu araç için kullanılacak olan değişkenleri giriniz: + Araç argümanlarını giriniz: - Harici program çalıştırma isteği başarısız oldu. -Program: + Harici program çalıştırma başarısız. +Başlatma hatası: Çıkış Kodu: @@ -5837,28 +7341,28 @@ Program: Yeni GUID ekle - &Seçenekler... + Seçenekler... - Seri XML belgesi + Hızlı XML belgesi - Düzenli İfadeler Alet kutusu + Düzenli İfadeler Araçseti - &Görünüm + Görünüm Hata Ayıklama - &Tam ekran + Tam ekran - Kur + Kurulum - Diyaloglar + İletişim Kutuları Dosyalar @@ -5867,22 +7371,22 @@ Program: Başlangıç sayfasını göster - &Araçlar + Araçlar - &Pencere + Pencere - &Sonraki Pencere + Sonraki Pencere - &Önceki Pencere + Önceki Pencere - &Böl + Böl - SharpDevelop Tarafından Oluşturulmuşdur. + SharpDevelop tarafından düzenlendi. Tarih: @@ -5897,16 +7401,16 @@ Program: Kullanıcı: - Ara Bellek Seçenekleri + Tampon Seçenekleri Bölgeyi yorumla - &Kopyala + Kopyala - K&es + Kes Dosya modu @@ -5915,7 +7419,7 @@ Program: Girinti - &Yapıştır + Yapıştır Yeniden Düzenleme @@ -5924,7 +7428,6 @@ Program: Bölgeyi yorumlama - Bu kaynak kullanılmıyor. Bu kaynağın amacı, çeviri veritabanını kontrol etmektir. Bu yazıda bir satır sonu karakteri -var. + Bu kaynak kullanılamıyor. Bu kaynağın amacı, çeviri veritabanını test etmektir. Bu yazıda bir satır sonu karakteri var. \ No newline at end of file