diff --git a/AddIns/ICSharpCode.SharpDevelop.addin b/AddIns/ICSharpCode.SharpDevelop.addin
index 9b0478883b..c344c8a6d2 100644
--- a/AddIns/ICSharpCode.SharpDevelop.addin
+++ b/AddIns/ICSharpCode.SharpDevelop.addin
@@ -1461,7 +1461,11 @@
-
+
+
+
+
+
diff --git a/src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs
index 3a3469e254..40b5365a8c 100644
--- a/src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs
+++ b/src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs
@@ -592,25 +592,25 @@ m, attributes);
}
void Qualident(
-#line 814 "cs.ATG"
+#line 818 "cs.ATG"
out string qualident) {
Expect(1);
-#line 816 "cs.ATG"
+#line 820 "cs.ATG"
qualidentBuilder.Length = 0; qualidentBuilder.Append(t.val);
while (
-#line 817 "cs.ATG"
+#line 821 "cs.ATG"
DotAndIdent()) {
Expect(14);
Expect(1);
-#line 817 "cs.ATG"
+#line 821 "cs.ATG"
qualidentBuilder.Append('.');
qualidentBuilder.Append(t.val);
}
-#line 820 "cs.ATG"
+#line 824 "cs.ATG"
qualident = qualidentBuilder.ToString();
}
@@ -704,43 +704,43 @@ out expr);
}
void Expr(
-#line 1864 "cs.ATG"
+#line 1868 "cs.ATG"
out Expression expr) {
-#line 1865 "cs.ATG"
+#line 1869 "cs.ATG"
expr = null; Expression expr1 = null, expr2 = null;
UnaryExpr(
-#line 1867 "cs.ATG"
+#line 1871 "cs.ATG"
out expr);
if (StartOf(5)) {
ConditionalOrExpr(
-#line 1870 "cs.ATG"
+#line 1874 "cs.ATG"
ref expr);
if (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 1870 "cs.ATG"
+#line 1874 "cs.ATG"
out expr1);
Expect(9);
Expr(
-#line 1870 "cs.ATG"
+#line 1874 "cs.ATG"
out expr2);
-#line 1870 "cs.ATG"
+#line 1874 "cs.ATG"
expr = new ConditionalExpression(expr, expr1, expr2);
}
} else if (StartOf(6)) {
-#line 1872 "cs.ATG"
+#line 1876 "cs.ATG"
AssignmentOperatorType op; Expression val;
AssignmentOperator(
-#line 1872 "cs.ATG"
+#line 1876 "cs.ATG"
out op);
Expr(
-#line 1872 "cs.ATG"
+#line 1876 "cs.ATG"
out val);
-#line 1872 "cs.ATG"
+#line 1876 "cs.ATG"
expr = new AssignmentExpression(expr, op, val);
} else SynErr(127);
}
@@ -816,76 +816,76 @@ out attribute);
}
void TypeModifier(
-#line 990 "cs.ATG"
+#line 994 "cs.ATG"
Modifiers m) {
switch (la.kind) {
case 87: {
lexer.NextToken();
-#line 992 "cs.ATG"
+#line 996 "cs.ATG"
m.Add(Modifier.New);
break;
}
case 96: {
lexer.NextToken();
-#line 993 "cs.ATG"
+#line 997 "cs.ATG"
m.Add(Modifier.Public);
break;
}
case 95: {
lexer.NextToken();
-#line 994 "cs.ATG"
+#line 998 "cs.ATG"
m.Add(Modifier.Protected);
break;
}
case 82: {
lexer.NextToken();
-#line 995 "cs.ATG"
+#line 999 "cs.ATG"
m.Add(Modifier.Internal);
break;
}
case 94: {
lexer.NextToken();
-#line 996 "cs.ATG"
+#line 1000 "cs.ATG"
m.Add(Modifier.Private);
break;
}
case 117: {
lexer.NextToken();
-#line 997 "cs.ATG"
+#line 1001 "cs.ATG"
m.Add(Modifier.Unsafe);
break;
}
case 47: {
lexer.NextToken();
-#line 998 "cs.ATG"
+#line 1002 "cs.ATG"
m.Add(Modifier.Abstract);
break;
}
case 101: {
lexer.NextToken();
-#line 999 "cs.ATG"
+#line 1003 "cs.ATG"
m.Add(Modifier.Sealed);
break;
}
case 105: {
lexer.NextToken();
-#line 1000 "cs.ATG"
+#line 1004 "cs.ATG"
m.Add(Modifier.Static);
break;
}
case 1: {
lexer.NextToken();
-#line 1001 "cs.ATG"
+#line 1005 "cs.ATG"
if (t.val == "partial") { m.Add(Modifier.Partial); }
break;
}
@@ -915,34 +915,32 @@ Modifiers m, List attributes) {
templates = newType.Templates;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
+ newType.StartLocation = t.Location;
newType.Type = Types.Class;
Expect(1);
-#line 719 "cs.ATG"
+#line 720 "cs.ATG"
newType.Name = t.val;
if (la.kind == 22) {
TypeParameterList(
-#line 722 "cs.ATG"
+#line 723 "cs.ATG"
templates);
}
if (la.kind == 9) {
ClassBase(
-#line 724 "cs.ATG"
+#line 725 "cs.ATG"
out names);
-#line 724 "cs.ATG"
+#line 725 "cs.ATG"
newType.BaseTypes = names;
}
-
-#line 724 "cs.ATG"
- newType.StartLocation = t.EndLocation;
while (
-#line 727 "cs.ATG"
+#line 728 "cs.ATG"
IdentIsWhere()) {
TypeParameterConstraintsClause(
-#line 727 "cs.ATG"
+#line 728 "cs.ATG"
templates);
}
ClassBody();
@@ -950,49 +948,47 @@ templates);
lexer.NextToken();
}
-#line 730 "cs.ATG"
+#line 731 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else if (StartOf(7)) {
-#line 733 "cs.ATG"
+#line 734 "cs.ATG"
m.Check(Modifier.StructsInterfacesEnumsDelegates);
if (la.kind == 107) {
lexer.NextToken();
-#line 734 "cs.ATG"
+#line 735 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
templates = newType.Templates;
+ newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = Types.Struct;
Expect(1);
-#line 740 "cs.ATG"
+#line 742 "cs.ATG"
newType.Name = t.val;
if (la.kind == 22) {
TypeParameterList(
-#line 743 "cs.ATG"
+#line 745 "cs.ATG"
templates);
}
if (la.kind == 9) {
StructInterfaces(
-#line 745 "cs.ATG"
+#line 747 "cs.ATG"
out names);
-#line 745 "cs.ATG"
+#line 747 "cs.ATG"
newType.BaseTypes = names;
}
-
-#line 745 "cs.ATG"
- newType.StartLocation = t.EndLocation;
while (
-#line 748 "cs.ATG"
+#line 750 "cs.ATG"
IdentIsWhere()) {
TypeParameterConstraintsClause(
-#line 748 "cs.ATG"
+#line 750 "cs.ATG"
templates);
}
StructBody();
@@ -1000,45 +996,43 @@ templates);
lexer.NextToken();
}
-#line 752 "cs.ATG"
+#line 754 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else if (la.kind == 81) {
lexer.NextToken();
-#line 756 "cs.ATG"
+#line 758 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
templates = newType.Templates;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
+ newType.StartLocation = t.Location;
newType.Type = Types.Interface;
Expect(1);
-#line 762 "cs.ATG"
+#line 765 "cs.ATG"
newType.Name = t.val;
if (la.kind == 22) {
TypeParameterList(
-#line 765 "cs.ATG"
+#line 768 "cs.ATG"
templates);
}
if (la.kind == 9) {
InterfaceBase(
-#line 767 "cs.ATG"
+#line 770 "cs.ATG"
out names);
-#line 767 "cs.ATG"
+#line 770 "cs.ATG"
newType.BaseTypes = names;
}
-
-#line 767 "cs.ATG"
- newType.StartLocation = t.EndLocation;
while (
-#line 770 "cs.ATG"
+#line 773 "cs.ATG"
IdentIsWhere()) {
TypeParameterConstraintsClause(
-#line 770 "cs.ATG"
+#line 773 "cs.ATG"
templates);
}
InterfaceBody();
@@ -1046,96 +1040,94 @@ templates);
lexer.NextToken();
}
-#line 773 "cs.ATG"
+#line 776 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else if (la.kind == 66) {
lexer.NextToken();
-#line 777 "cs.ATG"
+#line 780 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
+ newType.StartLocation = t.Location;
newType.Type = Types.Enum;
Expect(1);
-#line 782 "cs.ATG"
+#line 786 "cs.ATG"
newType.Name = t.val;
if (la.kind == 9) {
lexer.NextToken();
IntegralType(
-#line 783 "cs.ATG"
+#line 787 "cs.ATG"
out name);
-#line 783 "cs.ATG"
+#line 787 "cs.ATG"
newType.BaseTypes.Add(new TypeReference(name));
}
-
-#line 784 "cs.ATG"
- newType.StartLocation = t.EndLocation;
EnumBody();
if (la.kind == 11) {
lexer.NextToken();
}
-#line 786 "cs.ATG"
+#line 790 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else {
lexer.NextToken();
-#line 790 "cs.ATG"
+#line 794 "cs.ATG"
DelegateDeclaration delegateDeclr = new DelegateDeclaration(m.Modifier, attributes);
templates = delegateDeclr.Templates;
delegateDeclr.StartLocation = t.Location;
if (
-#line 794 "cs.ATG"
+#line 798 "cs.ATG"
NotVoidPointer()) {
Expect(121);
-#line 794 "cs.ATG"
+#line 798 "cs.ATG"
delegateDeclr.ReturnType = new TypeReference("void", 0, null);
} else if (StartOf(8)) {
Type(
-#line 795 "cs.ATG"
+#line 799 "cs.ATG"
out type);
-#line 795 "cs.ATG"
+#line 799 "cs.ATG"
delegateDeclr.ReturnType = type;
} else SynErr(129);
Expect(1);
-#line 797 "cs.ATG"
+#line 801 "cs.ATG"
delegateDeclr.Name = t.val;
if (la.kind == 22) {
TypeParameterList(
-#line 800 "cs.ATG"
+#line 804 "cs.ATG"
templates);
}
Expect(19);
if (StartOf(9)) {
FormalParameterList(
-#line 802 "cs.ATG"
+#line 806 "cs.ATG"
p);
-#line 802 "cs.ATG"
+#line 806 "cs.ATG"
delegateDeclr.Parameters = p;
}
Expect(20);
while (
-#line 806 "cs.ATG"
+#line 810 "cs.ATG"
IdentIsWhere()) {
TypeParameterConstraintsClause(
-#line 806 "cs.ATG"
+#line 810 "cs.ATG"
templates);
}
Expect(11);
-#line 808 "cs.ATG"
+#line 812 "cs.ATG"
delegateDeclr.EndLocation = t.Location;
compilationUnit.AddChild(delegateDeclr);
@@ -1144,90 +1136,90 @@ templates);
}
void TypeParameterList(
-#line 2247 "cs.ATG"
+#line 2251 "cs.ATG"
List templates) {
-#line 2249 "cs.ATG"
+#line 2253 "cs.ATG"
AttributeSection section;
List attributes = new List();
Expect(22);
while (la.kind == 17) {
AttributeSection(
-#line 2253 "cs.ATG"
+#line 2257 "cs.ATG"
out section);
-#line 2253 "cs.ATG"
+#line 2257 "cs.ATG"
attributes.Add(section);
}
Expect(1);
-#line 2254 "cs.ATG"
+#line 2258 "cs.ATG"
templates.Add(new TemplateDefinition(t.val, attributes));
while (la.kind == 13) {
lexer.NextToken();
while (la.kind == 17) {
AttributeSection(
-#line 2255 "cs.ATG"
+#line 2259 "cs.ATG"
out section);
-#line 2255 "cs.ATG"
+#line 2259 "cs.ATG"
attributes.Add(section);
}
Expect(1);
-#line 2256 "cs.ATG"
+#line 2260 "cs.ATG"
templates.Add(new TemplateDefinition(t.val, attributes));
}
Expect(21);
}
void ClassBase(
-#line 823 "cs.ATG"
+#line 827 "cs.ATG"
out List names) {
-#line 825 "cs.ATG"
+#line 829 "cs.ATG"
TypeReference typeRef;
names = new List();
Expect(9);
ClassType(
-#line 829 "cs.ATG"
+#line 833 "cs.ATG"
out typeRef);
-#line 829 "cs.ATG"
+#line 833 "cs.ATG"
if (typeRef != null) { names.Add(typeRef); }
while (la.kind == 13) {
lexer.NextToken();
TypeName(
-#line 830 "cs.ATG"
+#line 834 "cs.ATG"
out typeRef);
-#line 830 "cs.ATG"
+#line 834 "cs.ATG"
if (typeRef != null) { names.Add(typeRef); }
}
}
void TypeParameterConstraintsClause(
-#line 2260 "cs.ATG"
+#line 2264 "cs.ATG"
List templates) {
-#line 2261 "cs.ATG"
+#line 2265 "cs.ATG"
string name = ""; TypeReference type;
Expect(1);
-#line 2263 "cs.ATG"
+#line 2267 "cs.ATG"
if (t.val != "where") Error("where expected");
Expect(1);
-#line 2264 "cs.ATG"
+#line 2268 "cs.ATG"
name = t.val;
Expect(9);
TypeParameterConstraintsClauseBase(
-#line 2266 "cs.ATG"
+#line 2270 "cs.ATG"
out type);
-#line 2267 "cs.ATG"
+#line 2271 "cs.ATG"
TemplateDefinition td = null;
foreach (TemplateDefinition d in templates) {
if (d.Name == name) {
@@ -1240,10 +1232,10 @@ out type);
while (la.kind == 13) {
lexer.NextToken();
TypeParameterConstraintsClauseBase(
-#line 2276 "cs.ATG"
+#line 2280 "cs.ATG"
out type);
-#line 2277 "cs.ATG"
+#line 2281 "cs.ATG"
td = null;
foreach (TemplateDefinition d in templates) {
if (d.Name == name) {
@@ -1258,114 +1250,114 @@ out type);
void ClassBody() {
-#line 834 "cs.ATG"
+#line 838 "cs.ATG"
AttributeSection section;
Expect(15);
while (StartOf(10)) {
-#line 837 "cs.ATG"
+#line 841 "cs.ATG"
List attributes = new List();
Modifiers m = new Modifiers();
while (la.kind == 17) {
AttributeSection(
-#line 840 "cs.ATG"
+#line 844 "cs.ATG"
out section);
-#line 840 "cs.ATG"
+#line 844 "cs.ATG"
attributes.Add(section);
}
while (StartOf(11)) {
MemberModifier(
-#line 841 "cs.ATG"
+#line 845 "cs.ATG"
m);
}
ClassMemberDecl(
-#line 842 "cs.ATG"
+#line 846 "cs.ATG"
m, attributes);
}
Expect(16);
}
void StructInterfaces(
-#line 847 "cs.ATG"
+#line 851 "cs.ATG"
out List names) {
-#line 849 "cs.ATG"
+#line 853 "cs.ATG"
TypeReference typeRef;
names = new List();
Expect(9);
TypeName(
-#line 853 "cs.ATG"
+#line 857 "cs.ATG"
out typeRef);
-#line 853 "cs.ATG"
+#line 857 "cs.ATG"
if (typeRef != null) { names.Add(typeRef); }
while (la.kind == 13) {
lexer.NextToken();
TypeName(
-#line 854 "cs.ATG"
+#line 858 "cs.ATG"
out typeRef);
-#line 854 "cs.ATG"
+#line 858 "cs.ATG"
if (typeRef != null) { names.Add(typeRef); }
}
}
void StructBody() {
-#line 858 "cs.ATG"
+#line 862 "cs.ATG"
AttributeSection section;
Expect(15);
while (StartOf(12)) {
-#line 861 "cs.ATG"
+#line 865 "cs.ATG"
List attributes = new List();
Modifiers m = new Modifiers();
while (la.kind == 17) {
AttributeSection(
-#line 864 "cs.ATG"
+#line 868 "cs.ATG"
out section);
-#line 864 "cs.ATG"
+#line 868 "cs.ATG"
attributes.Add(section);
}
while (StartOf(11)) {
MemberModifier(
-#line 865 "cs.ATG"
+#line 869 "cs.ATG"
m);
}
StructMemberDecl(
-#line 866 "cs.ATG"
+#line 870 "cs.ATG"
m, attributes);
}
Expect(16);
}
void InterfaceBase(
-#line 871 "cs.ATG"
+#line 875 "cs.ATG"
out List names) {
-#line 873 "cs.ATG"
+#line 877 "cs.ATG"
TypeReference typeRef;
names = new List();
Expect(9);
TypeName(
-#line 877 "cs.ATG"
+#line 881 "cs.ATG"
out typeRef);
-#line 877 "cs.ATG"
+#line 881 "cs.ATG"
if (typeRef != null) { names.Add(typeRef); }
while (la.kind == 13) {
lexer.NextToken();
TypeName(
-#line 878 "cs.ATG"
+#line 882 "cs.ATG"
out typeRef);
-#line 878 "cs.ATG"
+#line 882 "cs.ATG"
if (typeRef != null) { names.Add(typeRef); }
}
}
@@ -1379,72 +1371,72 @@ out typeRef);
}
void IntegralType(
-#line 1012 "cs.ATG"
+#line 1016 "cs.ATG"
out string name) {
-#line 1012 "cs.ATG"
+#line 1016 "cs.ATG"
name = "";
switch (la.kind) {
case 100: {
lexer.NextToken();
-#line 1014 "cs.ATG"
+#line 1018 "cs.ATG"
name = "sbyte";
break;
}
case 52: {
lexer.NextToken();
-#line 1015 "cs.ATG"
+#line 1019 "cs.ATG"
name = "byte";
break;
}
case 102: {
lexer.NextToken();
-#line 1016 "cs.ATG"
+#line 1020 "cs.ATG"
name = "short";
break;
}
case 118: {
lexer.NextToken();
-#line 1017 "cs.ATG"
+#line 1021 "cs.ATG"
name = "ushort";
break;
}
case 80: {
lexer.NextToken();
-#line 1018 "cs.ATG"
+#line 1022 "cs.ATG"
name = "int";
break;
}
case 114: {
lexer.NextToken();
-#line 1019 "cs.ATG"
+#line 1023 "cs.ATG"
name = "uint";
break;
}
case 85: {
lexer.NextToken();
-#line 1020 "cs.ATG"
+#line 1024 "cs.ATG"
name = "long";
break;
}
case 115: {
lexer.NextToken();
-#line 1021 "cs.ATG"
+#line 1025 "cs.ATG"
name = "ulong";
break;
}
case 55: {
lexer.NextToken();
-#line 1022 "cs.ATG"
+#line 1026 "cs.ATG"
name = "char";
break;
}
@@ -1454,25 +1446,25 @@ out string name) {
void EnumBody() {
-#line 884 "cs.ATG"
+#line 888 "cs.ATG"
FieldDeclaration f;
Expect(15);
if (la.kind == 1 || la.kind == 17) {
EnumMemberDecl(
-#line 886 "cs.ATG"
+#line 890 "cs.ATG"
out f);
-#line 886 "cs.ATG"
+#line 890 "cs.ATG"
compilationUnit.AddChild(f);
while (
-#line 887 "cs.ATG"
+#line 891 "cs.ATG"
NotFinalComma()) {
Expect(13);
EnumMemberDecl(
-#line 887 "cs.ATG"
+#line 891 "cs.ATG"
out f);
-#line 887 "cs.ATG"
+#line 891 "cs.ATG"
compilationUnit.AddChild(f);
}
if (la.kind == 13) {
@@ -1483,62 +1475,62 @@ out f);
}
void Type(
-#line 892 "cs.ATG"
+#line 896 "cs.ATG"
out TypeReference type) {
-#line 894 "cs.ATG"
+#line 898 "cs.ATG"
string name;
int pointer = 0;
type = null;
if (la.kind == 1 || la.kind == 89 || la.kind == 106) {
ClassType(
-#line 899 "cs.ATG"
+#line 903 "cs.ATG"
out type);
} else if (StartOf(14)) {
SimpleType(
-#line 900 "cs.ATG"
+#line 904 "cs.ATG"
out name);
-#line 900 "cs.ATG"
+#line 904 "cs.ATG"
type = new TypeReference(name);
} else if (la.kind == 121) {
lexer.NextToken();
Expect(6);
-#line 901 "cs.ATG"
+#line 905 "cs.ATG"
pointer = 1; type = new TypeReference("void");
} else SynErr(132);
-#line 902 "cs.ATG"
+#line 906 "cs.ATG"
List r = new List();
while (
-#line 904 "cs.ATG"
+#line 908 "cs.ATG"
IsPointerOrDims()) {
-#line 904 "cs.ATG"
+#line 908 "cs.ATG"
int i = 0;
if (la.kind == 6) {
lexer.NextToken();
-#line 905 "cs.ATG"
+#line 909 "cs.ATG"
++pointer;
} else if (la.kind == 17) {
lexer.NextToken();
while (la.kind == 13) {
lexer.NextToken();
-#line 906 "cs.ATG"
+#line 910 "cs.ATG"
++i;
}
Expect(18);
-#line 906 "cs.ATG"
+#line 910 "cs.ATG"
r.Add(i);
} else SynErr(133);
}
-#line 909 "cs.ATG"
+#line 913 "cs.ATG"
if (type != null) {
type.RankSpecifier = r.ToArray();
type.PointerNestingLevel = pointer;
@@ -1547,28 +1539,28 @@ IsPointerOrDims()) {
}
void FormalParameterList(
-#line 945 "cs.ATG"
+#line 949 "cs.ATG"
List parameter) {
-#line 948 "cs.ATG"
+#line 952 "cs.ATG"
ParameterDeclarationExpression p;
AttributeSection section;
List attributes = new List();
while (la.kind == 17) {
AttributeSection(
-#line 953 "cs.ATG"
+#line 957 "cs.ATG"
out section);
-#line 953 "cs.ATG"
+#line 957 "cs.ATG"
attributes.Add(section);
}
if (StartOf(15)) {
FixedParameter(
-#line 955 "cs.ATG"
+#line 959 "cs.ATG"
out p);
-#line 955 "cs.ATG"
+#line 959 "cs.ATG"
bool paramsFound = false;
p.Attributes = attributes;
parameter.Add(p);
@@ -1576,96 +1568,96 @@ out p);
while (la.kind == 13) {
lexer.NextToken();
-#line 960 "cs.ATG"
+#line 964 "cs.ATG"
attributes = new List(); if (paramsFound) Error("params array must be at end of parameter list");
while (la.kind == 17) {
AttributeSection(
-#line 961 "cs.ATG"
+#line 965 "cs.ATG"
out section);
-#line 961 "cs.ATG"
+#line 965 "cs.ATG"
attributes.Add(section);
}
if (StartOf(15)) {
FixedParameter(
-#line 963 "cs.ATG"
+#line 967 "cs.ATG"
out p);
-#line 963 "cs.ATG"
+#line 967 "cs.ATG"
p.Attributes = attributes; parameter.Add(p);
} else if (la.kind == 93) {
ParameterArray(
-#line 964 "cs.ATG"
+#line 968 "cs.ATG"
out p);
-#line 964 "cs.ATG"
+#line 968 "cs.ATG"
paramsFound = true; p.Attributes = attributes; parameter.Add(p);
} else SynErr(134);
}
} else if (la.kind == 93) {
ParameterArray(
-#line 967 "cs.ATG"
+#line 971 "cs.ATG"
out p);
-#line 967 "cs.ATG"
+#line 971 "cs.ATG"
p.Attributes = attributes; parameter.Add(p);
} else SynErr(135);
}
void ClassType(
-#line 1004 "cs.ATG"
+#line 1008 "cs.ATG"
out TypeReference typeRef) {
-#line 1005 "cs.ATG"
+#line 1009 "cs.ATG"
TypeReference r; typeRef = null;
if (la.kind == 1) {
TypeName(
-#line 1007 "cs.ATG"
+#line 1011 "cs.ATG"
out r);
-#line 1007 "cs.ATG"
+#line 1011 "cs.ATG"
typeRef = r;
} else if (la.kind == 89) {
lexer.NextToken();
-#line 1008 "cs.ATG"
+#line 1012 "cs.ATG"
typeRef = new TypeReference("object");
} else if (la.kind == 106) {
lexer.NextToken();
-#line 1009 "cs.ATG"
+#line 1013 "cs.ATG"
typeRef = new TypeReference("string");
} else SynErr(136);
}
void TypeName(
-#line 2212 "cs.ATG"
+#line 2216 "cs.ATG"
out TypeReference typeRef) {
-#line 2213 "cs.ATG"
+#line 2217 "cs.ATG"
List typeArguments = null;
string alias = null;
string qualident;
if (
-#line 2218 "cs.ATG"
+#line 2222 "cs.ATG"
la.kind == Tokens.Identifier && Peek(1).kind == Tokens.DoubleColon) {
lexer.NextToken();
-#line 2219 "cs.ATG"
+#line 2223 "cs.ATG"
alias = t.val;
Expect(10);
}
Qualident(
-#line 2222 "cs.ATG"
+#line 2226 "cs.ATG"
out qualident);
if (la.kind == 22) {
TypeArgumentList(
-#line 2223 "cs.ATG"
+#line 2227 "cs.ATG"
out typeArguments);
}
-#line 2225 "cs.ATG"
+#line 2229 "cs.ATG"
if (alias == null) {
typeRef = new TypeReference(qualident, typeArguments);
} else if (alias == "global") {
@@ -1678,104 +1670,104 @@ out typeArguments);
}
void MemberModifier(
-#line 1025 "cs.ATG"
+#line 1029 "cs.ATG"
Modifiers m) {
switch (la.kind) {
case 47: {
lexer.NextToken();
-#line 1027 "cs.ATG"
+#line 1031 "cs.ATG"
m.Add(Modifier.Abstract);
break;
}
case 69: {
lexer.NextToken();
-#line 1028 "cs.ATG"
+#line 1032 "cs.ATG"
m.Add(Modifier.Extern);
break;
}
case 82: {
lexer.NextToken();
-#line 1029 "cs.ATG"
+#line 1033 "cs.ATG"
m.Add(Modifier.Internal);
break;
}
case 87: {
lexer.NextToken();
-#line 1030 "cs.ATG"
+#line 1034 "cs.ATG"
m.Add(Modifier.New);
break;
}
case 92: {
lexer.NextToken();
-#line 1031 "cs.ATG"
+#line 1035 "cs.ATG"
m.Add(Modifier.Override);
break;
}
case 94: {
lexer.NextToken();
-#line 1032 "cs.ATG"
+#line 1036 "cs.ATG"
m.Add(Modifier.Private);
break;
}
case 95: {
lexer.NextToken();
-#line 1033 "cs.ATG"
+#line 1037 "cs.ATG"
m.Add(Modifier.Protected);
break;
}
case 96: {
lexer.NextToken();
-#line 1034 "cs.ATG"
+#line 1038 "cs.ATG"
m.Add(Modifier.Public);
break;
}
case 97: {
lexer.NextToken();
-#line 1035 "cs.ATG"
+#line 1039 "cs.ATG"
m.Add(Modifier.Readonly);
break;
}
case 101: {
lexer.NextToken();
-#line 1036 "cs.ATG"
+#line 1040 "cs.ATG"
m.Add(Modifier.Sealed);
break;
}
case 105: {
lexer.NextToken();
-#line 1037 "cs.ATG"
+#line 1041 "cs.ATG"
m.Add(Modifier.Static);
break;
}
case 117: {
lexer.NextToken();
-#line 1038 "cs.ATG"
+#line 1042 "cs.ATG"
m.Add(Modifier.Unsafe);
break;
}
case 120: {
lexer.NextToken();
-#line 1039 "cs.ATG"
+#line 1043 "cs.ATG"
m.Add(Modifier.Virtual);
break;
}
case 122: {
lexer.NextToken();
-#line 1040 "cs.ATG"
+#line 1044 "cs.ATG"
m.Add(Modifier.Volatile);
break;
}
@@ -1784,23 +1776,23 @@ Modifiers m) {
}
void ClassMemberDecl(
-#line 1273 "cs.ATG"
+#line 1277 "cs.ATG"
Modifiers m, List attributes) {
-#line 1274 "cs.ATG"
+#line 1278 "cs.ATG"
Statement stmt = null;
if (StartOf(16)) {
StructMemberDecl(
-#line 1276 "cs.ATG"
+#line 1280 "cs.ATG"
m, attributes);
} else if (la.kind == 26) {
-#line 1277 "cs.ATG"
+#line 1281 "cs.ATG"
m.Check(Modifier.Destructors); Point startPos = t.Location;
lexer.NextToken();
Expect(1);
-#line 1278 "cs.ATG"
+#line 1282 "cs.ATG"
DestructorDeclaration d = new DestructorDeclaration(t.val, m.Modifier, attributes);
d.Modifier = m.Modifier;
d.StartLocation = startPos;
@@ -1808,17 +1800,17 @@ m, attributes);
Expect(19);
Expect(20);
-#line 1282 "cs.ATG"
+#line 1286 "cs.ATG"
d.EndLocation = t.EndLocation;
if (la.kind == 15) {
Block(
-#line 1282 "cs.ATG"
+#line 1286 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
} else SynErr(138);
-#line 1283 "cs.ATG"
+#line 1287 "cs.ATG"
d.Body = (BlockStatement)stmt;
compilationUnit.AddChild(d);
@@ -1826,10 +1818,10 @@ out stmt);
}
void StructMemberDecl(
-#line 1043 "cs.ATG"
+#line 1047 "cs.ATG"
Modifiers m, List attributes) {
-#line 1045 "cs.ATG"
+#line 1049 "cs.ATG"
string qualident = null;
TypeReference type;
Expression expr;
@@ -1840,18 +1832,18 @@ Modifiers m, List attributes) {
if (la.kind == 58) {
-#line 1054 "cs.ATG"
+#line 1058 "cs.ATG"
m.Check(Modifier.Constants);
lexer.NextToken();
-#line 1055 "cs.ATG"
+#line 1059 "cs.ATG"
Point startPos = t.Location;
Type(
-#line 1056 "cs.ATG"
+#line 1060 "cs.ATG"
out type);
Expect(1);
-#line 1056 "cs.ATG"
+#line 1060 "cs.ATG"
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier | Modifier.Const);
fd.StartLocation = startPos;
VariableDeclaration f = new VariableDeclaration(t.val);
@@ -1859,58 +1851,58 @@ out type);
Expect(3);
Expr(
-#line 1061 "cs.ATG"
+#line 1065 "cs.ATG"
out expr);
-#line 1061 "cs.ATG"
+#line 1065 "cs.ATG"
f.Initializer = expr;
while (la.kind == 13) {
lexer.NextToken();
Expect(1);
-#line 1062 "cs.ATG"
+#line 1066 "cs.ATG"
f = new VariableDeclaration(t.val);
fd.Fields.Add(f);
Expect(3);
Expr(
-#line 1065 "cs.ATG"
+#line 1069 "cs.ATG"
out expr);
-#line 1065 "cs.ATG"
+#line 1069 "cs.ATG"
f.Initializer = expr;
}
Expect(11);
-#line 1066 "cs.ATG"
+#line 1070 "cs.ATG"
fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd);
} else if (
-#line 1069 "cs.ATG"
+#line 1073 "cs.ATG"
NotVoidPointer()) {
-#line 1069 "cs.ATG"
+#line 1073 "cs.ATG"
m.Check(Modifier.PropertysEventsMethods);
Expect(121);
-#line 1070 "cs.ATG"
+#line 1074 "cs.ATG"
Point startPos = t.Location;
Qualident(
-#line 1071 "cs.ATG"
+#line 1075 "cs.ATG"
out qualident);
if (la.kind == 22) {
TypeParameterList(
-#line 1073 "cs.ATG"
+#line 1077 "cs.ATG"
templates);
}
Expect(19);
if (StartOf(9)) {
FormalParameterList(
-#line 1076 "cs.ATG"
+#line 1080 "cs.ATG"
p);
}
Expect(20);
-#line 1076 "cs.ATG"
+#line 1080 "cs.ATG"
MethodDeclaration methodDeclaration = new MethodDeclaration(qualident,
m.Modifier,
new TypeReference("void"),
@@ -1923,31 +1915,31 @@ p);
compilationUnit.BlockStart(methodDeclaration);
while (
-#line 1089 "cs.ATG"
+#line 1093 "cs.ATG"
IdentIsWhere()) {
TypeParameterConstraintsClause(
-#line 1089 "cs.ATG"
+#line 1093 "cs.ATG"
templates);
}
if (la.kind == 15) {
Block(
-#line 1091 "cs.ATG"
+#line 1095 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
} else SynErr(140);
-#line 1091 "cs.ATG"
+#line 1095 "cs.ATG"
compilationUnit.BlockEnd();
methodDeclaration.Body = (BlockStatement)stmt;
} else if (la.kind == 67) {
-#line 1095 "cs.ATG"
+#line 1099 "cs.ATG"
m.Check(Modifier.PropertysEventsMethods);
lexer.NextToken();
-#line 1096 "cs.ATG"
+#line 1100 "cs.ATG"
EventDeclaration eventDecl = new EventDeclaration(m.Modifier, attributes);
eventDecl.StartLocation = t.Location;
compilationUnit.AddChild(eventDecl);
@@ -1956,103 +1948,103 @@ out stmt);
EventRemoveRegion removeBlock = null;
Type(
-#line 1103 "cs.ATG"
+#line 1107 "cs.ATG"
out type);
-#line 1103 "cs.ATG"
+#line 1107 "cs.ATG"
eventDecl.TypeReference = type;
if (
-#line 1105 "cs.ATG"
+#line 1109 "cs.ATG"
IsVarDecl()) {
VariableDeclarator(
-#line 1105 "cs.ATG"
+#line 1109 "cs.ATG"
variableDeclarators);
while (la.kind == 13) {
lexer.NextToken();
VariableDeclarator(
-#line 1106 "cs.ATG"
+#line 1110 "cs.ATG"
variableDeclarators);
}
Expect(11);
-#line 1106 "cs.ATG"
+#line 1110 "cs.ATG"
eventDecl.VariableDeclarators = variableDeclarators; eventDecl.EndLocation = t.EndLocation;
} else if (la.kind == 1) {
Qualident(
-#line 1107 "cs.ATG"
+#line 1111 "cs.ATG"
out qualident);
-#line 1107 "cs.ATG"
+#line 1111 "cs.ATG"
eventDecl.Name = qualident; eventDecl.EndLocation = t.EndLocation;
Expect(15);
-#line 1108 "cs.ATG"
+#line 1112 "cs.ATG"
eventDecl.BodyStart = t.Location;
EventAccessorDecls(
-#line 1109 "cs.ATG"
+#line 1113 "cs.ATG"
out addBlock, out removeBlock);
Expect(16);
-#line 1110 "cs.ATG"
+#line 1114 "cs.ATG"
eventDecl.BodyEnd = t.EndLocation;
} else SynErr(141);
-#line 1111 "cs.ATG"
+#line 1115 "cs.ATG"
compilationUnit.BlockEnd();
eventDecl.AddRegion = addBlock;
eventDecl.RemoveRegion = removeBlock;
} else if (
-#line 1118 "cs.ATG"
+#line 1122 "cs.ATG"
IdentAndLPar()) {
-#line 1118 "cs.ATG"
+#line 1122 "cs.ATG"
m.Check(Modifier.Constructors | Modifier.StaticConstructors);
Expect(1);
-#line 1119 "cs.ATG"
+#line 1123 "cs.ATG"
string name = t.val; Point startPos = t.Location;
Expect(19);
if (StartOf(9)) {
-#line 1119 "cs.ATG"
+#line 1123 "cs.ATG"
m.Check(Modifier.Constructors);
FormalParameterList(
-#line 1120 "cs.ATG"
+#line 1124 "cs.ATG"
p);
}
Expect(20);
-#line 1122 "cs.ATG"
+#line 1126 "cs.ATG"
ConstructorInitializer init = null;
if (la.kind == 9) {
-#line 1123 "cs.ATG"
+#line 1127 "cs.ATG"
m.Check(Modifier.Constructors);
ConstructorInitializer(
-#line 1124 "cs.ATG"
+#line 1128 "cs.ATG"
out init);
}
-#line 1126 "cs.ATG"
+#line 1130 "cs.ATG"
ConstructorDeclaration cd = new ConstructorDeclaration(name, m.Modifier, p, init, attributes);
cd.StartLocation = startPos;
cd.EndLocation = t.EndLocation;
if (la.kind == 15) {
Block(
-#line 1131 "cs.ATG"
+#line 1135 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
} else SynErr(142);
-#line 1131 "cs.ATG"
+#line 1135 "cs.ATG"
cd.Body = (BlockStatement)stmt; compilationUnit.AddChild(cd);
} else if (la.kind == 68 || la.kind == 78) {
-#line 1134 "cs.ATG"
+#line 1138 "cs.ATG"
m.Check(Modifier.Operators);
if (m.isNone) Error("at least one modifier must be set");
bool isImplicit = true;
@@ -2062,37 +2054,37 @@ out stmt);
} else {
lexer.NextToken();
-#line 1138 "cs.ATG"
+#line 1142 "cs.ATG"
isImplicit = false;
}
Expect(90);
Type(
-#line 1139 "cs.ATG"
+#line 1143 "cs.ATG"
out type);
-#line 1139 "cs.ATG"
+#line 1143 "cs.ATG"
TypeReference operatorType = type;
Expect(19);
Type(
-#line 1140 "cs.ATG"
+#line 1144 "cs.ATG"
out type);
Expect(1);
-#line 1140 "cs.ATG"
+#line 1144 "cs.ATG"
string varName = t.val;
Expect(20);
if (la.kind == 15) {
Block(
-#line 1140 "cs.ATG"
+#line 1144 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
-#line 1140 "cs.ATG"
+#line 1144 "cs.ATG"
stmt = null;
} else SynErr(143);
-#line 1143 "cs.ATG"
+#line 1147 "cs.ATG"
List parameters = new List();
parameters.Add(new ParameterDeclarationExpression(type, varName));
OperatorDeclaration operatorDeclaration = new OperatorDeclaration(m.Modifier,
@@ -2106,58 +2098,58 @@ out stmt);
} else if (StartOf(17)) {
TypeDecl(
-#line 1156 "cs.ATG"
+#line 1160 "cs.ATG"
m, attributes);
} else if (StartOf(8)) {
Type(
-#line 1157 "cs.ATG"
+#line 1161 "cs.ATG"
out type);
-#line 1157 "cs.ATG"
+#line 1161 "cs.ATG"
Point startPos = t.Location;
if (la.kind == 90) {
-#line 1159 "cs.ATG"
+#line 1163 "cs.ATG"
OverloadableOperatorType op;
m.Check(Modifier.Operators);
if (m.isNone) Error("at least one modifier must be set");
lexer.NextToken();
OverloadableOperator(
-#line 1163 "cs.ATG"
+#line 1167 "cs.ATG"
out op);
-#line 1163 "cs.ATG"
+#line 1167 "cs.ATG"
TypeReference firstType, secondType = null; string secondName = null;
Expect(19);
Type(
-#line 1164 "cs.ATG"
+#line 1168 "cs.ATG"
out firstType);
Expect(1);
-#line 1164 "cs.ATG"
+#line 1168 "cs.ATG"
string firstName = t.val;
if (la.kind == 13) {
lexer.NextToken();
Type(
-#line 1165 "cs.ATG"
+#line 1169 "cs.ATG"
out secondType);
Expect(1);
-#line 1165 "cs.ATG"
+#line 1169 "cs.ATG"
secondName = t.val;
} else if (la.kind == 20) {
} else SynErr(144);
Expect(20);
if (la.kind == 15) {
Block(
-#line 1173 "cs.ATG"
+#line 1177 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
} else SynErr(145);
-#line 1175 "cs.ATG"
+#line 1179 "cs.ATG"
List parameters = new List();
parameters.Add(new ParameterDeclarationExpression(firstType, firstName));
if (secondType != null) {
@@ -2172,43 +2164,43 @@ out stmt);
compilationUnit.AddChild(operatorDeclaration);
} else if (
-#line 1190 "cs.ATG"
+#line 1194 "cs.ATG"
IsVarDecl()) {
-#line 1190 "cs.ATG"
+#line 1194 "cs.ATG"
m.Check(Modifier.Fields);
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
fd.StartLocation = startPos;
VariableDeclarator(
-#line 1194 "cs.ATG"
+#line 1198 "cs.ATG"
variableDeclarators);
while (la.kind == 13) {
lexer.NextToken();
VariableDeclarator(
-#line 1195 "cs.ATG"
+#line 1199 "cs.ATG"
variableDeclarators);
}
Expect(11);
-#line 1196 "cs.ATG"
+#line 1200 "cs.ATG"
fd.EndLocation = t.EndLocation; fd.Fields = variableDeclarators; compilationUnit.AddChild(fd);
} else if (la.kind == 109) {
-#line 1199 "cs.ATG"
+#line 1203 "cs.ATG"
m.Check(Modifier.Indexers);
lexer.NextToken();
Expect(17);
FormalParameterList(
-#line 1200 "cs.ATG"
+#line 1204 "cs.ATG"
p);
Expect(18);
-#line 1200 "cs.ATG"
+#line 1204 "cs.ATG"
Point endLocation = t.EndLocation;
Expect(15);
-#line 1201 "cs.ATG"
+#line 1205 "cs.ATG"
IndexerDeclaration indexer = new IndexerDeclaration(type, p, m.Modifier, attributes);
indexer.StartLocation = startPos;
indexer.EndLocation = endLocation;
@@ -2217,11 +2209,11 @@ p);
PropertySetRegion setRegion;
AccessorDecls(
-#line 1208 "cs.ATG"
+#line 1212 "cs.ATG"
out getRegion, out setRegion);
Expect(16);
-#line 1209 "cs.ATG"
+#line 1213 "cs.ATG"
indexer.BodyEnd = t.EndLocation;
indexer.GetRegion = getRegion;
indexer.SetRegion = setRegion;
@@ -2229,30 +2221,30 @@ out getRegion, out setRegion);
} else if (la.kind == 1) {
Qualident(
-#line 1214 "cs.ATG"
+#line 1218 "cs.ATG"
out qualident);
-#line 1214 "cs.ATG"
+#line 1218 "cs.ATG"
Point qualIdentEndLocation = t.EndLocation;
if (la.kind == 15 || la.kind == 19 || la.kind == 22) {
if (la.kind == 19 || la.kind == 22) {
-#line 1217 "cs.ATG"
+#line 1221 "cs.ATG"
m.Check(Modifier.PropertysEventsMethods);
if (la.kind == 22) {
TypeParameterList(
-#line 1219 "cs.ATG"
+#line 1223 "cs.ATG"
templates);
}
Expect(19);
if (StartOf(9)) {
FormalParameterList(
-#line 1220 "cs.ATG"
+#line 1224 "cs.ATG"
p);
}
Expect(20);
-#line 1221 "cs.ATG"
+#line 1225 "cs.ATG"
MethodDeclaration methodDeclaration = new MethodDeclaration(qualident,
m.Modifier,
type,
@@ -2264,26 +2256,26 @@ p);
compilationUnit.AddChild(methodDeclaration);
while (
-#line 1231 "cs.ATG"
+#line 1235 "cs.ATG"
IdentIsWhere()) {
TypeParameterConstraintsClause(
-#line 1231 "cs.ATG"
+#line 1235 "cs.ATG"
templates);
}
if (la.kind == 15) {
Block(
-#line 1232 "cs.ATG"
+#line 1236 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
} else SynErr(146);
-#line 1232 "cs.ATG"
+#line 1236 "cs.ATG"
methodDeclaration.Body = (BlockStatement)stmt;
} else {
lexer.NextToken();
-#line 1235 "cs.ATG"
+#line 1239 "cs.ATG"
PropertyDeclaration pDecl = new PropertyDeclaration(qualident, type, m.Modifier, attributes);
pDecl.StartLocation = startPos;
pDecl.EndLocation = qualIdentEndLocation;
@@ -2292,11 +2284,11 @@ out stmt);
PropertySetRegion setRegion;
AccessorDecls(
-#line 1242 "cs.ATG"
+#line 1246 "cs.ATG"
out getRegion, out setRegion);
Expect(16);
-#line 1244 "cs.ATG"
+#line 1248 "cs.ATG"
pDecl.GetRegion = getRegion;
pDecl.SetRegion = setRegion;
pDecl.BodyEnd = t.EndLocation;
@@ -2305,17 +2297,17 @@ out getRegion, out setRegion);
}
} else if (la.kind == 14) {
-#line 1252 "cs.ATG"
+#line 1256 "cs.ATG"
m.Check(Modifier.Indexers);
lexer.NextToken();
Expect(109);
Expect(17);
FormalParameterList(
-#line 1253 "cs.ATG"
+#line 1257 "cs.ATG"
p);
Expect(18);
-#line 1254 "cs.ATG"
+#line 1258 "cs.ATG"
IndexerDeclaration indexer = new IndexerDeclaration(type, p, m.Modifier, attributes);
indexer.StartLocation = startPos;
indexer.EndLocation = t.EndLocation;
@@ -2325,14 +2317,14 @@ p);
Expect(15);
-#line 1261 "cs.ATG"
+#line 1265 "cs.ATG"
Point bodyStart = t.Location;
AccessorDecls(
-#line 1262 "cs.ATG"
+#line 1266 "cs.ATG"
out getRegion, out setRegion);
Expect(16);
-#line 1263 "cs.ATG"
+#line 1267 "cs.ATG"
indexer.BodyStart = bodyStart;
indexer.BodyEnd = t.EndLocation;
indexer.GetRegion = getRegion;
@@ -2346,7 +2338,7 @@ out getRegion, out setRegion);
void InterfaceMemberDecl() {
-#line 1290 "cs.ATG"
+#line 1294 "cs.ATG"
TypeReference type;
AttributeSection section;
@@ -2361,51 +2353,51 @@ out getRegion, out setRegion);
while (la.kind == 17) {
AttributeSection(
-#line 1303 "cs.ATG"
+#line 1307 "cs.ATG"
out section);
-#line 1303 "cs.ATG"
+#line 1307 "cs.ATG"
attributes.Add(section);
}
if (la.kind == 87) {
lexer.NextToken();
-#line 1304 "cs.ATG"
+#line 1308 "cs.ATG"
mod = Modifier.New; startLocation = t.Location;
}
if (
-#line 1307 "cs.ATG"
+#line 1311 "cs.ATG"
NotVoidPointer()) {
Expect(121);
-#line 1307 "cs.ATG"
+#line 1311 "cs.ATG"
if (startLocation.X == -1) startLocation = t.Location;
Expect(1);
-#line 1307 "cs.ATG"
+#line 1311 "cs.ATG"
name = t.val;
if (la.kind == 22) {
TypeParameterList(
-#line 1308 "cs.ATG"
+#line 1312 "cs.ATG"
templates);
}
Expect(19);
if (StartOf(9)) {
FormalParameterList(
-#line 1309 "cs.ATG"
+#line 1313 "cs.ATG"
parameters);
}
Expect(20);
while (
-#line 1310 "cs.ATG"
+#line 1314 "cs.ATG"
IdentIsWhere()) {
TypeParameterConstraintsClause(
-#line 1310 "cs.ATG"
+#line 1314 "cs.ATG"
templates);
}
Expect(11);
-#line 1312 "cs.ATG"
+#line 1316 "cs.ATG"
MethodDeclaration md = new MethodDeclaration(name, mod, new TypeReference("void"), parameters, attributes);
md.StartLocation = startLocation;
md.EndLocation = t.EndLocation;
@@ -2415,39 +2407,39 @@ templates);
} else if (StartOf(18)) {
if (StartOf(8)) {
Type(
-#line 1319 "cs.ATG"
+#line 1323 "cs.ATG"
out type);
-#line 1319 "cs.ATG"
+#line 1323 "cs.ATG"
if (startLocation.X == -1) startLocation = t.Location;
if (la.kind == 1) {
lexer.NextToken();
-#line 1321 "cs.ATG"
+#line 1325 "cs.ATG"
name = t.val; Point qualIdentEndLocation = t.EndLocation;
if (la.kind == 19 || la.kind == 22) {
if (la.kind == 22) {
TypeParameterList(
-#line 1325 "cs.ATG"
+#line 1329 "cs.ATG"
templates);
}
Expect(19);
if (StartOf(9)) {
FormalParameterList(
-#line 1326 "cs.ATG"
+#line 1330 "cs.ATG"
parameters);
}
Expect(20);
while (
-#line 1328 "cs.ATG"
+#line 1332 "cs.ATG"
IdentIsWhere()) {
TypeParameterConstraintsClause(
-#line 1328 "cs.ATG"
+#line 1332 "cs.ATG"
templates);
}
Expect(11);
-#line 1329 "cs.ATG"
+#line 1333 "cs.ATG"
MethodDeclaration md = new MethodDeclaration(name, mod, type, parameters, attributes);
md.StartLocation = startLocation;
md.EndLocation = t.EndLocation;
@@ -2456,72 +2448,72 @@ templates);
} else if (la.kind == 15) {
-#line 1336 "cs.ATG"
+#line 1340 "cs.ATG"
PropertyDeclaration pd = new PropertyDeclaration(name, type, mod, attributes); compilationUnit.AddChild(pd);
lexer.NextToken();
-#line 1337 "cs.ATG"
+#line 1341 "cs.ATG"
Point bodyStart = t.Location;
InterfaceAccessors(
-#line 1337 "cs.ATG"
+#line 1341 "cs.ATG"
out getBlock, out setBlock);
Expect(16);
-#line 1337 "cs.ATG"
+#line 1341 "cs.ATG"
pd.GetRegion = getBlock; pd.SetRegion = setBlock; pd.StartLocation = startLocation; pd.EndLocation = qualIdentEndLocation; pd.BodyStart = bodyStart; pd.BodyEnd = t.EndLocation;
} else SynErr(150);
} else if (la.kind == 109) {
lexer.NextToken();
Expect(17);
FormalParameterList(
-#line 1340 "cs.ATG"
+#line 1344 "cs.ATG"
parameters);
Expect(18);
-#line 1340 "cs.ATG"
+#line 1344 "cs.ATG"
Point bracketEndLocation = t.EndLocation;
-#line 1340 "cs.ATG"
+#line 1344 "cs.ATG"
IndexerDeclaration id = new IndexerDeclaration(type, parameters, mod, attributes); compilationUnit.AddChild(id);
Expect(15);
-#line 1341 "cs.ATG"
+#line 1345 "cs.ATG"
Point bodyStart = t.Location;
InterfaceAccessors(
-#line 1341 "cs.ATG"
+#line 1345 "cs.ATG"
out getBlock, out setBlock);
Expect(16);
-#line 1341 "cs.ATG"
+#line 1345 "cs.ATG"
id.GetRegion = getBlock; id.SetRegion = setBlock; id.StartLocation = startLocation; id.EndLocation = bracketEndLocation; id.BodyStart = bodyStart; id.BodyEnd = t.EndLocation;
} else SynErr(151);
} else {
lexer.NextToken();
-#line 1344 "cs.ATG"
+#line 1348 "cs.ATG"
if (startLocation.X == -1) startLocation = t.Location;
Type(
-#line 1344 "cs.ATG"
+#line 1348 "cs.ATG"
out type);
Expect(1);
-#line 1344 "cs.ATG"
+#line 1348 "cs.ATG"
EventDeclaration ed = new EventDeclaration(type, t.val, mod, attributes);
compilationUnit.AddChild(ed);
Expect(11);
-#line 1347 "cs.ATG"
+#line 1351 "cs.ATG"
ed.StartLocation = startLocation; ed.EndLocation = t.EndLocation;
}
} else SynErr(152);
}
void EnumMemberDecl(
-#line 1352 "cs.ATG"
+#line 1356 "cs.ATG"
out FieldDeclaration f) {
-#line 1354 "cs.ATG"
+#line 1358 "cs.ATG"
Expression expr = null;
List attributes = new List();
AttributeSection section = null;
@@ -2529,15 +2521,15 @@ out FieldDeclaration f) {
while (la.kind == 17) {
AttributeSection(
-#line 1360 "cs.ATG"
+#line 1364 "cs.ATG"
out section);
-#line 1360 "cs.ATG"
+#line 1364 "cs.ATG"
attributes.Add(section);
}
Expect(1);
-#line 1361 "cs.ATG"
+#line 1365 "cs.ATG"
f = new FieldDeclaration(attributes);
varDecl = new VariableDeclaration(t.val);
f.Fields.Add(varDecl);
@@ -2546,92 +2538,92 @@ out section);
if (la.kind == 3) {
lexer.NextToken();
Expr(
-#line 1366 "cs.ATG"
+#line 1370 "cs.ATG"
out expr);
-#line 1366 "cs.ATG"
+#line 1370 "cs.ATG"
varDecl.Initializer = expr;
}
}
void SimpleType(
-#line 934 "cs.ATG"
+#line 938 "cs.ATG"
out string name) {
-#line 935 "cs.ATG"
+#line 939 "cs.ATG"
name = String.Empty;
if (StartOf(19)) {
IntegralType(
-#line 937 "cs.ATG"
+#line 941 "cs.ATG"
out name);
} else if (la.kind == 73) {
lexer.NextToken();
-#line 938 "cs.ATG"
+#line 942 "cs.ATG"
name = "float";
} else if (la.kind == 64) {
lexer.NextToken();
-#line 939 "cs.ATG"
+#line 943 "cs.ATG"
name = "double";
} else if (la.kind == 60) {
lexer.NextToken();
-#line 940 "cs.ATG"
+#line 944 "cs.ATG"
name = "decimal";
} else if (la.kind == 50) {
lexer.NextToken();
-#line 941 "cs.ATG"
+#line 945 "cs.ATG"
name = "bool";
} else SynErr(153);
}
void NonArrayType(
-#line 916 "cs.ATG"
+#line 920 "cs.ATG"
out TypeReference type) {
-#line 918 "cs.ATG"
+#line 922 "cs.ATG"
string name;
int pointer = 0;
type = null;
if (la.kind == 1 || la.kind == 89 || la.kind == 106) {
ClassType(
-#line 923 "cs.ATG"
+#line 927 "cs.ATG"
out type);
} else if (StartOf(14)) {
SimpleType(
-#line 924 "cs.ATG"
+#line 928 "cs.ATG"
out name);
-#line 924 "cs.ATG"
+#line 928 "cs.ATG"
type = new TypeReference(name);
} else if (la.kind == 121) {
lexer.NextToken();
Expect(6);
-#line 925 "cs.ATG"
+#line 929 "cs.ATG"
pointer = 1; type = new TypeReference("void");
} else SynErr(154);
while (
-#line 928 "cs.ATG"
+#line 932 "cs.ATG"
IsPointer()) {
Expect(6);
-#line 929 "cs.ATG"
+#line 933 "cs.ATG"
++pointer;
}
-#line 931 "cs.ATG"
+#line 935 "cs.ATG"
if (type != null) { type.PointerNestingLevel = pointer; }
}
void FixedParameter(
-#line 971 "cs.ATG"
+#line 975 "cs.ATG"
out ParameterDeclarationExpression p) {
-#line 973 "cs.ATG"
+#line 977 "cs.ATG"
TypeReference type;
ParamModifier mod = ParamModifier.In;
@@ -2639,46 +2631,46 @@ out ParameterDeclarationExpression p) {
if (la.kind == 98) {
lexer.NextToken();
-#line 978 "cs.ATG"
+#line 982 "cs.ATG"
mod = ParamModifier.Ref;
} else {
lexer.NextToken();
-#line 979 "cs.ATG"
+#line 983 "cs.ATG"
mod = ParamModifier.Out;
}
}
Type(
-#line 981 "cs.ATG"
+#line 985 "cs.ATG"
out type);
Expect(1);
-#line 981 "cs.ATG"
+#line 985 "cs.ATG"
p = new ParameterDeclarationExpression(type, t.val, mod);
}
void ParameterArray(
-#line 984 "cs.ATG"
+#line 988 "cs.ATG"
out ParameterDeclarationExpression p) {
-#line 985 "cs.ATG"
+#line 989 "cs.ATG"
TypeReference type;
Expect(93);
Type(
-#line 987 "cs.ATG"
+#line 991 "cs.ATG"
out type);
Expect(1);
-#line 987 "cs.ATG"
+#line 991 "cs.ATG"
p = new ParameterDeclarationExpression(type, t.val, ParamModifier.Params);
}
void Block(
-#line 1470 "cs.ATG"
+#line 1474 "cs.ATG"
out Statement stmt) {
Expect(15);
-#line 1472 "cs.ATG"
+#line 1476 "cs.ATG"
BlockStatement blockStmt = new BlockStatement();
blockStmt.StartLocation = t.EndLocation;
compilationUnit.BlockStart(blockStmt);
@@ -2689,7 +2681,7 @@ out Statement stmt) {
}
Expect(16);
-#line 1479 "cs.ATG"
+#line 1483 "cs.ATG"
stmt = blockStmt;
blockStmt.EndLocation = t.EndLocation;
compilationUnit.BlockEnd();
@@ -2697,34 +2689,34 @@ out Statement stmt) {
}
void VariableDeclarator(
-#line 1463 "cs.ATG"
+#line 1467 "cs.ATG"
List fieldDeclaration) {
-#line 1464 "cs.ATG"
+#line 1468 "cs.ATG"
Expression expr = null;
Expect(1);
-#line 1466 "cs.ATG"
+#line 1470 "cs.ATG"
VariableDeclaration f = new VariableDeclaration(t.val);
if (la.kind == 3) {
lexer.NextToken();
VariableInitializer(
-#line 1467 "cs.ATG"
+#line 1471 "cs.ATG"
out expr);
-#line 1467 "cs.ATG"
+#line 1471 "cs.ATG"
f.Initializer = expr;
}
-#line 1467 "cs.ATG"
+#line 1471 "cs.ATG"
fieldDeclaration.Add(f);
}
void EventAccessorDecls(
-#line 1412 "cs.ATG"
+#line 1416 "cs.ATG"
out EventAddRegion addBlock, out EventRemoveRegion removeBlock) {
-#line 1413 "cs.ATG"
+#line 1417 "cs.ATG"
AttributeSection section;
List attributes = new List();
Statement stmt;
@@ -2733,102 +2725,102 @@ out EventAddRegion addBlock, out EventRemoveRegion removeBlock) {
while (la.kind == 17) {
AttributeSection(
-#line 1420 "cs.ATG"
+#line 1424 "cs.ATG"
out section);
-#line 1420 "cs.ATG"
+#line 1424 "cs.ATG"
attributes.Add(section);
}
if (
-#line 1422 "cs.ATG"
+#line 1426 "cs.ATG"
IdentIsAdd()) {
-#line 1422 "cs.ATG"
+#line 1426 "cs.ATG"
addBlock = new EventAddRegion(attributes);
AddAccessorDecl(
-#line 1423 "cs.ATG"
+#line 1427 "cs.ATG"
out stmt);
-#line 1423 "cs.ATG"
+#line 1427 "cs.ATG"
attributes = new List(); addBlock.Block = (BlockStatement)stmt;
while (la.kind == 17) {
AttributeSection(
-#line 1424 "cs.ATG"
+#line 1428 "cs.ATG"
out section);
-#line 1424 "cs.ATG"
+#line 1428 "cs.ATG"
attributes.Add(section);
}
RemoveAccessorDecl(
-#line 1425 "cs.ATG"
+#line 1429 "cs.ATG"
out stmt);
-#line 1425 "cs.ATG"
+#line 1429 "cs.ATG"
removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt;
} else if (
-#line 1426 "cs.ATG"
+#line 1430 "cs.ATG"
IdentIsRemove()) {
RemoveAccessorDecl(
-#line 1427 "cs.ATG"
+#line 1431 "cs.ATG"
out stmt);
-#line 1427 "cs.ATG"
+#line 1431 "cs.ATG"
removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; attributes = new List();
while (la.kind == 17) {
AttributeSection(
-#line 1428 "cs.ATG"
+#line 1432 "cs.ATG"
out section);
-#line 1428 "cs.ATG"
+#line 1432 "cs.ATG"
attributes.Add(section);
}
AddAccessorDecl(
-#line 1429 "cs.ATG"
+#line 1433 "cs.ATG"
out stmt);
-#line 1429 "cs.ATG"
+#line 1433 "cs.ATG"
addBlock = new EventAddRegion(attributes); addBlock.Block = (BlockStatement)stmt;
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1430 "cs.ATG"
+#line 1434 "cs.ATG"
Error("add or remove accessor declaration expected");
} else SynErr(155);
}
void ConstructorInitializer(
-#line 1501 "cs.ATG"
+#line 1505 "cs.ATG"
out ConstructorInitializer ci) {
-#line 1502 "cs.ATG"
+#line 1506 "cs.ATG"
Expression expr; ci = new ConstructorInitializer();
Expect(9);
if (la.kind == 49) {
lexer.NextToken();
-#line 1506 "cs.ATG"
+#line 1510 "cs.ATG"
ci.ConstructorInitializerType = ConstructorInitializerType.Base;
} else if (la.kind == 109) {
lexer.NextToken();
-#line 1507 "cs.ATG"
+#line 1511 "cs.ATG"
ci.ConstructorInitializerType = ConstructorInitializerType.This;
} else SynErr(156);
Expect(19);
if (StartOf(21)) {
Argument(
-#line 1510 "cs.ATG"
+#line 1514 "cs.ATG"
out expr);
-#line 1510 "cs.ATG"
+#line 1514 "cs.ATG"
if (expr != null) { ci.Arguments.Add(expr); }
while (la.kind == 13) {
lexer.NextToken();
Argument(
-#line 1510 "cs.ATG"
+#line 1514 "cs.ATG"
out expr);
-#line 1510 "cs.ATG"
+#line 1514 "cs.ATG"
if (expr != null) { ci.Arguments.Add(expr); }
}
}
@@ -2836,161 +2828,161 @@ out expr);
}
void OverloadableOperator(
-#line 1522 "cs.ATG"
+#line 1526 "cs.ATG"
out OverloadableOperatorType op) {
-#line 1523 "cs.ATG"
+#line 1527 "cs.ATG"
op = OverloadableOperatorType.None;
switch (la.kind) {
case 4: {
lexer.NextToken();
-#line 1525 "cs.ATG"
+#line 1529 "cs.ATG"
op = OverloadableOperatorType.Add;
break;
}
case 5: {
lexer.NextToken();
-#line 1526 "cs.ATG"
+#line 1530 "cs.ATG"
op = OverloadableOperatorType.Subtract;
break;
}
case 23: {
lexer.NextToken();
-#line 1528 "cs.ATG"
+#line 1532 "cs.ATG"
op = OverloadableOperatorType.Not;
break;
}
case 26: {
lexer.NextToken();
-#line 1529 "cs.ATG"
+#line 1533 "cs.ATG"
op = OverloadableOperatorType.BitNot;
break;
}
case 30: {
lexer.NextToken();
-#line 1531 "cs.ATG"
+#line 1535 "cs.ATG"
op = OverloadableOperatorType.Increment;
break;
}
case 31: {
lexer.NextToken();
-#line 1532 "cs.ATG"
+#line 1536 "cs.ATG"
op = OverloadableOperatorType.Decrement;
break;
}
case 111: {
lexer.NextToken();
-#line 1534 "cs.ATG"
+#line 1538 "cs.ATG"
op = OverloadableOperatorType.True;
break;
}
case 70: {
lexer.NextToken();
-#line 1535 "cs.ATG"
+#line 1539 "cs.ATG"
op = OverloadableOperatorType.False;
break;
}
case 6: {
lexer.NextToken();
-#line 1537 "cs.ATG"
+#line 1541 "cs.ATG"
op = OverloadableOperatorType.Multiply;
break;
}
case 7: {
lexer.NextToken();
-#line 1538 "cs.ATG"
+#line 1542 "cs.ATG"
op = OverloadableOperatorType.Divide;
break;
}
case 8: {
lexer.NextToken();
-#line 1539 "cs.ATG"
+#line 1543 "cs.ATG"
op = OverloadableOperatorType.Modulus;
break;
}
case 27: {
lexer.NextToken();
-#line 1541 "cs.ATG"
+#line 1545 "cs.ATG"
op = OverloadableOperatorType.BitwiseAnd;
break;
}
case 28: {
lexer.NextToken();
-#line 1542 "cs.ATG"
+#line 1546 "cs.ATG"
op = OverloadableOperatorType.BitwiseOr;
break;
}
case 29: {
lexer.NextToken();
-#line 1543 "cs.ATG"
+#line 1547 "cs.ATG"
op = OverloadableOperatorType.ExclusiveOr;
break;
}
case 36: {
lexer.NextToken();
-#line 1545 "cs.ATG"
+#line 1549 "cs.ATG"
op = OverloadableOperatorType.ShiftLeft;
break;
}
case 32: {
lexer.NextToken();
-#line 1546 "cs.ATG"
+#line 1550 "cs.ATG"
op = OverloadableOperatorType.Equality;
break;
}
case 33: {
lexer.NextToken();
-#line 1547 "cs.ATG"
+#line 1551 "cs.ATG"
op = OverloadableOperatorType.InEquality;
break;
}
case 22: {
lexer.NextToken();
-#line 1548 "cs.ATG"
+#line 1552 "cs.ATG"
op = OverloadableOperatorType.LessThan;
break;
}
case 34: {
lexer.NextToken();
-#line 1549 "cs.ATG"
+#line 1553 "cs.ATG"
op = OverloadableOperatorType.GreaterThanOrEqual;
break;
}
case 35: {
lexer.NextToken();
-#line 1550 "cs.ATG"
+#line 1554 "cs.ATG"
op = OverloadableOperatorType.LessThanOrEqual;
break;
}
case 21: {
lexer.NextToken();
-#line 1551 "cs.ATG"
+#line 1555 "cs.ATG"
op = OverloadableOperatorType.GreaterThan;
if (la.kind == 21) {
lexer.NextToken();
-#line 1551 "cs.ATG"
+#line 1555 "cs.ATG"
op = OverloadableOperatorType.ShiftRight;
}
break;
@@ -3000,10 +2992,10 @@ out OverloadableOperatorType op) {
}
void AccessorDecls(
-#line 1370 "cs.ATG"
+#line 1374 "cs.ATG"
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
-#line 1372 "cs.ATG"
+#line 1376 "cs.ATG"
List attributes = new List();
AttributeSection section;
getBlock = null;
@@ -3011,136 +3003,136 @@ out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
while (la.kind == 17) {
AttributeSection(
-#line 1378 "cs.ATG"
+#line 1382 "cs.ATG"
out section);
-#line 1378 "cs.ATG"
+#line 1382 "cs.ATG"
attributes.Add(section);
}
if (
-#line 1380 "cs.ATG"
+#line 1384 "cs.ATG"
IdentIsGet()) {
GetAccessorDecl(
-#line 1381 "cs.ATG"
+#line 1385 "cs.ATG"
out getBlock, attributes);
if (la.kind == 1 || la.kind == 17) {
-#line 1382 "cs.ATG"
+#line 1386 "cs.ATG"
attributes = new List();
while (la.kind == 17) {
AttributeSection(
-#line 1383 "cs.ATG"
+#line 1387 "cs.ATG"
out section);
-#line 1383 "cs.ATG"
+#line 1387 "cs.ATG"
attributes.Add(section);
}
SetAccessorDecl(
-#line 1384 "cs.ATG"
+#line 1388 "cs.ATG"
out setBlock, attributes);
}
} else if (
-#line 1386 "cs.ATG"
+#line 1390 "cs.ATG"
IdentIsSet()) {
SetAccessorDecl(
-#line 1387 "cs.ATG"
+#line 1391 "cs.ATG"
out setBlock, attributes);
if (la.kind == 1 || la.kind == 17) {
-#line 1388 "cs.ATG"
+#line 1392 "cs.ATG"
attributes = new List();
while (la.kind == 17) {
AttributeSection(
-#line 1389 "cs.ATG"
+#line 1393 "cs.ATG"
out section);
-#line 1389 "cs.ATG"
+#line 1393 "cs.ATG"
attributes.Add(section);
}
GetAccessorDecl(
-#line 1390 "cs.ATG"
+#line 1394 "cs.ATG"
out getBlock, attributes);
}
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1392 "cs.ATG"
+#line 1396 "cs.ATG"
Error("get or set accessor declaration expected");
} else SynErr(158);
}
void InterfaceAccessors(
-#line 1434 "cs.ATG"
+#line 1438 "cs.ATG"
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
-#line 1436 "cs.ATG"
+#line 1440 "cs.ATG"
AttributeSection section;
List attributes = new List();
getBlock = null; setBlock = null;
while (la.kind == 17) {
AttributeSection(
-#line 1441 "cs.ATG"
+#line 1445 "cs.ATG"
out section);
-#line 1441 "cs.ATG"
+#line 1445 "cs.ATG"
attributes.Add(section);
}
if (
-#line 1443 "cs.ATG"
+#line 1447 "cs.ATG"
IdentIsGet()) {
Expect(1);
-#line 1443 "cs.ATG"
+#line 1447 "cs.ATG"
getBlock = new PropertyGetRegion(null, attributes);
} else if (
-#line 1444 "cs.ATG"
+#line 1448 "cs.ATG"
IdentIsSet()) {
Expect(1);
-#line 1444 "cs.ATG"
+#line 1448 "cs.ATG"
setBlock = new PropertySetRegion(null, attributes);
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1445 "cs.ATG"
+#line 1449 "cs.ATG"
Error("set or get expected");
} else SynErr(159);
Expect(11);
-#line 1447 "cs.ATG"
+#line 1451 "cs.ATG"
attributes = new List();
if (la.kind == 1 || la.kind == 17) {
while (la.kind == 17) {
AttributeSection(
-#line 1449 "cs.ATG"
+#line 1453 "cs.ATG"
out section);
-#line 1449 "cs.ATG"
+#line 1453 "cs.ATG"
attributes.Add(section);
}
if (
-#line 1451 "cs.ATG"
+#line 1455 "cs.ATG"
IdentIsGet()) {
Expect(1);
-#line 1451 "cs.ATG"
+#line 1455 "cs.ATG"
if (getBlock != null) Error("get already declared");
else getBlock = new PropertyGetRegion(null, attributes);
} else if (
-#line 1454 "cs.ATG"
+#line 1458 "cs.ATG"
IdentIsSet()) {
Expect(1);
-#line 1454 "cs.ATG"
+#line 1458 "cs.ATG"
if (setBlock != null) Error("set already declared");
else setBlock = new PropertySetRegion(null, attributes);
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1457 "cs.ATG"
+#line 1461 "cs.ATG"
Error("set or get expected");
} else SynErr(160);
Expect(11);
@@ -3148,183 +3140,183 @@ IdentIsSet()) {
}
void GetAccessorDecl(
-#line 1396 "cs.ATG"
+#line 1400 "cs.ATG"
out PropertyGetRegion getBlock, List attributes) {
-#line 1397 "cs.ATG"
+#line 1401 "cs.ATG"
Statement stmt = null;
Expect(1);
-#line 1400 "cs.ATG"
+#line 1404 "cs.ATG"
if (t.val != "get") Error("get expected");
if (la.kind == 15) {
Block(
-#line 1401 "cs.ATG"
+#line 1405 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
} else SynErr(161);
-#line 1401 "cs.ATG"
+#line 1405 "cs.ATG"
getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes);
}
void SetAccessorDecl(
-#line 1404 "cs.ATG"
+#line 1408 "cs.ATG"
out PropertySetRegion setBlock, List attributes) {
-#line 1405 "cs.ATG"
+#line 1409 "cs.ATG"
Statement stmt = null;
Expect(1);
-#line 1408 "cs.ATG"
+#line 1412 "cs.ATG"
if (t.val != "set") Error("set expected");
if (la.kind == 15) {
Block(
-#line 1409 "cs.ATG"
+#line 1413 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
} else SynErr(162);
-#line 1409 "cs.ATG"
+#line 1413 "cs.ATG"
setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
}
void AddAccessorDecl(
-#line 1485 "cs.ATG"
+#line 1489 "cs.ATG"
out Statement stmt) {
-#line 1486 "cs.ATG"
+#line 1490 "cs.ATG"
stmt = null;
Expect(1);
-#line 1489 "cs.ATG"
+#line 1493 "cs.ATG"
if (t.val != "add") Error("add expected");
Block(
-#line 1490 "cs.ATG"
+#line 1494 "cs.ATG"
out stmt);
}
void RemoveAccessorDecl(
-#line 1493 "cs.ATG"
+#line 1497 "cs.ATG"
out Statement stmt) {
-#line 1494 "cs.ATG"
+#line 1498 "cs.ATG"
stmt = null;
Expect(1);
-#line 1497 "cs.ATG"
+#line 1501 "cs.ATG"
if (t.val != "remove") Error("remove expected");
Block(
-#line 1498 "cs.ATG"
+#line 1502 "cs.ATG"
out stmt);
}
void VariableInitializer(
-#line 1514 "cs.ATG"
+#line 1518 "cs.ATG"
out Expression initializerExpression) {
-#line 1515 "cs.ATG"
+#line 1519 "cs.ATG"
TypeReference type = null; Expression expr = null; initializerExpression = null;
if (StartOf(4)) {
Expr(
-#line 1517 "cs.ATG"
+#line 1521 "cs.ATG"
out initializerExpression);
} else if (la.kind == 15) {
ArrayInitializer(
-#line 1518 "cs.ATG"
+#line 1522 "cs.ATG"
out initializerExpression);
} else if (la.kind == 104) {
lexer.NextToken();
Type(
-#line 1519 "cs.ATG"
+#line 1523 "cs.ATG"
out type);
Expect(17);
Expr(
-#line 1519 "cs.ATG"
+#line 1523 "cs.ATG"
out expr);
Expect(18);
-#line 1519 "cs.ATG"
+#line 1523 "cs.ATG"
initializerExpression = new StackAllocExpression(type, expr);
} else SynErr(163);
}
void Statement() {
-#line 1623 "cs.ATG"
+#line 1627 "cs.ATG"
TypeReference type;
Expression expr;
Statement stmt = null;
Point startPos = la.Location;
if (
-#line 1631 "cs.ATG"
+#line 1635 "cs.ATG"
IsLabel()) {
Expect(1);
-#line 1631 "cs.ATG"
+#line 1635 "cs.ATG"
compilationUnit.AddChild(new LabelStatement(t.val));
Expect(9);
Statement();
} else if (la.kind == 58) {
lexer.NextToken();
Type(
-#line 1634 "cs.ATG"
+#line 1638 "cs.ATG"
out type);
-#line 1634 "cs.ATG"
+#line 1638 "cs.ATG"
LocalVariableDeclaration var = new LocalVariableDeclaration(type, Modifier.Const); string ident = null; var.StartLocation = t.Location;
Expect(1);
-#line 1635 "cs.ATG"
+#line 1639 "cs.ATG"
ident = t.val;
Expect(3);
Expr(
-#line 1636 "cs.ATG"
+#line 1640 "cs.ATG"
out expr);
-#line 1636 "cs.ATG"
+#line 1640 "cs.ATG"
var.Variables.Add(new VariableDeclaration(ident, expr));
while (la.kind == 13) {
lexer.NextToken();
Expect(1);
-#line 1637 "cs.ATG"
+#line 1641 "cs.ATG"
ident = t.val;
Expect(3);
Expr(
-#line 1637 "cs.ATG"
+#line 1641 "cs.ATG"
out expr);
-#line 1637 "cs.ATG"
+#line 1641 "cs.ATG"
var.Variables.Add(new VariableDeclaration(ident, expr));
}
Expect(11);
-#line 1638 "cs.ATG"
+#line 1642 "cs.ATG"
compilationUnit.AddChild(var);
} else if (
-#line 1640 "cs.ATG"
+#line 1644 "cs.ATG"
IsLocalVarDecl()) {
LocalVariableDecl(
-#line 1640 "cs.ATG"
+#line 1644 "cs.ATG"
out stmt);
Expect(11);
-#line 1640 "cs.ATG"
+#line 1644 "cs.ATG"
compilationUnit.AddChild(stmt);
} else if (StartOf(22)) {
EmbeddedStatement(
-#line 1641 "cs.ATG"
+#line 1645 "cs.ATG"
out stmt);
-#line 1641 "cs.ATG"
+#line 1645 "cs.ATG"
compilationUnit.AddChild(stmt);
} else SynErr(164);
-#line 1647 "cs.ATG"
+#line 1651 "cs.ATG"
if (stmt != null) {
stmt.StartLocation = startPos;
stmt.EndLocation = t.EndLocation;
@@ -3333,10 +3325,10 @@ out stmt);
}
void Argument(
-#line 1554 "cs.ATG"
+#line 1558 "cs.ATG"
out Expression argumentexpr) {
-#line 1556 "cs.ATG"
+#line 1560 "cs.ATG"
Expression expr;
FieldDirection fd = FieldDirection.None;
@@ -3344,48 +3336,48 @@ out Expression argumentexpr) {
if (la.kind == 98) {
lexer.NextToken();
-#line 1561 "cs.ATG"
+#line 1565 "cs.ATG"
fd = FieldDirection.Ref;
} else {
lexer.NextToken();
-#line 1562 "cs.ATG"
+#line 1566 "cs.ATG"
fd = FieldDirection.Out;
}
}
Expr(
-#line 1564 "cs.ATG"
+#line 1568 "cs.ATG"
out expr);
-#line 1564 "cs.ATG"
+#line 1568 "cs.ATG"
argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr;
}
void ArrayInitializer(
-#line 1583 "cs.ATG"
+#line 1587 "cs.ATG"
out Expression outExpr) {
-#line 1585 "cs.ATG"
+#line 1589 "cs.ATG"
Expression expr = null;
ArrayInitializerExpression initializer = new ArrayInitializerExpression();
Expect(15);
if (StartOf(23)) {
VariableInitializer(
-#line 1590 "cs.ATG"
+#line 1594 "cs.ATG"
out expr);
-#line 1590 "cs.ATG"
+#line 1594 "cs.ATG"
if (expr != null) { initializer.CreateExpressions.Add(expr); }
while (
-#line 1590 "cs.ATG"
+#line 1594 "cs.ATG"
NotFinalComma()) {
Expect(13);
VariableInitializer(
-#line 1590 "cs.ATG"
+#line 1594 "cs.ATG"
out expr);
-#line 1590 "cs.ATG"
+#line 1594 "cs.ATG"
if (expr != null) { initializer.CreateExpressions.Add(expr); }
}
if (la.kind == 13) {
@@ -3394,84 +3386,84 @@ out expr);
}
Expect(16);
-#line 1591 "cs.ATG"
+#line 1595 "cs.ATG"
outExpr = initializer;
}
void AssignmentOperator(
-#line 1567 "cs.ATG"
+#line 1571 "cs.ATG"
out AssignmentOperatorType op) {
-#line 1568 "cs.ATG"
+#line 1572 "cs.ATG"
op = AssignmentOperatorType.None;
switch (la.kind) {
case 3: {
lexer.NextToken();
-#line 1570 "cs.ATG"
+#line 1574 "cs.ATG"
op = AssignmentOperatorType.Assign;
break;
}
case 37: {
lexer.NextToken();
-#line 1571 "cs.ATG"
+#line 1575 "cs.ATG"
op = AssignmentOperatorType.Add;
break;
}
case 38: {
lexer.NextToken();
-#line 1572 "cs.ATG"
+#line 1576 "cs.ATG"
op = AssignmentOperatorType.Subtract;
break;
}
case 39: {
lexer.NextToken();
-#line 1573 "cs.ATG"
+#line 1577 "cs.ATG"
op = AssignmentOperatorType.Multiply;
break;
}
case 40: {
lexer.NextToken();
-#line 1574 "cs.ATG"
+#line 1578 "cs.ATG"
op = AssignmentOperatorType.Divide;
break;
}
case 41: {
lexer.NextToken();
-#line 1575 "cs.ATG"
+#line 1579 "cs.ATG"
op = AssignmentOperatorType.Modulus;
break;
}
case 42: {
lexer.NextToken();
-#line 1576 "cs.ATG"
+#line 1580 "cs.ATG"
op = AssignmentOperatorType.BitwiseAnd;
break;
}
case 43: {
lexer.NextToken();
-#line 1577 "cs.ATG"
+#line 1581 "cs.ATG"
op = AssignmentOperatorType.BitwiseOr;
break;
}
case 44: {
lexer.NextToken();
-#line 1578 "cs.ATG"
+#line 1582 "cs.ATG"
op = AssignmentOperatorType.ExclusiveOr;
break;
}
case 45: {
lexer.NextToken();
-#line 1579 "cs.ATG"
+#line 1583 "cs.ATG"
op = AssignmentOperatorType.ShiftLeft;
break;
}
@@ -3479,7 +3471,7 @@ out AssignmentOperatorType op) {
lexer.NextToken();
Expect(34);
-#line 1580 "cs.ATG"
+#line 1584 "cs.ATG"
op = AssignmentOperatorType.ShiftRight;
break;
}
@@ -3488,66 +3480,66 @@ out AssignmentOperatorType op) {
}
void LocalVariableDecl(
-#line 1594 "cs.ATG"
+#line 1598 "cs.ATG"
out Statement stmt) {
-#line 1596 "cs.ATG"
+#line 1600 "cs.ATG"
TypeReference type;
VariableDeclaration var = null;
LocalVariableDeclaration localVariableDeclaration;
Type(
-#line 1601 "cs.ATG"
+#line 1605 "cs.ATG"
out type);
-#line 1601 "cs.ATG"
+#line 1605 "cs.ATG"
localVariableDeclaration = new LocalVariableDeclaration(type); localVariableDeclaration.StartLocation = t.Location;
LocalVariableDeclarator(
-#line 1602 "cs.ATG"
+#line 1606 "cs.ATG"
out var);
-#line 1602 "cs.ATG"
+#line 1606 "cs.ATG"
localVariableDeclaration.Variables.Add(var);
while (la.kind == 13) {
lexer.NextToken();
LocalVariableDeclarator(
-#line 1603 "cs.ATG"
+#line 1607 "cs.ATG"
out var);
-#line 1603 "cs.ATG"
+#line 1607 "cs.ATG"
localVariableDeclaration.Variables.Add(var);
}
-#line 1604 "cs.ATG"
+#line 1608 "cs.ATG"
stmt = localVariableDeclaration;
}
void LocalVariableDeclarator(
-#line 1607 "cs.ATG"
+#line 1611 "cs.ATG"
out VariableDeclaration var) {
-#line 1608 "cs.ATG"
+#line 1612 "cs.ATG"
Expression expr = null;
Expect(1);
-#line 1611 "cs.ATG"
+#line 1615 "cs.ATG"
var = new VariableDeclaration(t.val);
if (la.kind == 3) {
lexer.NextToken();
VariableInitializer(
-#line 1611 "cs.ATG"
+#line 1615 "cs.ATG"
out expr);
-#line 1611 "cs.ATG"
+#line 1615 "cs.ATG"
var.Initializer = expr;
}
}
void EmbeddedStatement(
-#line 1654 "cs.ATG"
+#line 1658 "cs.ATG"
out Statement statement) {
-#line 1656 "cs.ATG"
+#line 1660 "cs.ATG"
TypeReference type = null;
Expression expr = null;
Statement embeddedStatement = null;
@@ -3555,156 +3547,156 @@ out Statement statement) {
if (la.kind == 15) {
Block(
-#line 1662 "cs.ATG"
+#line 1666 "cs.ATG"
out statement);
} else if (la.kind == 11) {
lexer.NextToken();
-#line 1664 "cs.ATG"
+#line 1668 "cs.ATG"
statement = new EmptyStatement();
} else if (
-#line 1666 "cs.ATG"
+#line 1670 "cs.ATG"
UnCheckedAndLBrace()) {
-#line 1666 "cs.ATG"
+#line 1670 "cs.ATG"
Statement block; bool isChecked = true;
if (la.kind == 56) {
lexer.NextToken();
} else if (la.kind == 116) {
lexer.NextToken();
-#line 1667 "cs.ATG"
+#line 1671 "cs.ATG"
isChecked = false;
} else SynErr(166);
Block(
-#line 1668 "cs.ATG"
+#line 1672 "cs.ATG"
out block);
-#line 1668 "cs.ATG"
+#line 1672 "cs.ATG"
statement = isChecked ? (Statement)new CheckedStatement(block) : (Statement)new UncheckedStatement(block);
} else if (la.kind == 77) {
lexer.NextToken();
-#line 1670 "cs.ATG"
+#line 1674 "cs.ATG"
Statement elseStatement = null;
Expect(19);
Expr(
-#line 1671 "cs.ATG"
+#line 1675 "cs.ATG"
out expr);
Expect(20);
EmbeddedStatement(
-#line 1672 "cs.ATG"
+#line 1676 "cs.ATG"
out embeddedStatement);
if (la.kind == 65) {
lexer.NextToken();
EmbeddedStatement(
-#line 1673 "cs.ATG"
+#line 1677 "cs.ATG"
out elseStatement);
}
-#line 1674 "cs.ATG"
+#line 1678 "cs.ATG"
statement = elseStatement != null ? (Statement)new IfElseStatement(expr, embeddedStatement, elseStatement) : (Statement)new IfElseStatement(expr, embeddedStatement);
} else if (la.kind == 108) {
lexer.NextToken();
-#line 1675 "cs.ATG"
+#line 1679 "cs.ATG"
ArrayList switchSections = new ArrayList(); SwitchSection switchSection;
Expect(19);
Expr(
-#line 1676 "cs.ATG"
+#line 1680 "cs.ATG"
out expr);
Expect(20);
Expect(15);
while (la.kind == 53 || la.kind == 61) {
SwitchSection(
-#line 1677 "cs.ATG"
+#line 1681 "cs.ATG"
out switchSection);
-#line 1677 "cs.ATG"
+#line 1681 "cs.ATG"
switchSections.Add(switchSection);
}
Expect(16);
-#line 1678 "cs.ATG"
+#line 1682 "cs.ATG"
statement = new SwitchStatement(expr, switchSections);
} else if (la.kind == 123) {
lexer.NextToken();
Expect(19);
Expr(
-#line 1680 "cs.ATG"
+#line 1684 "cs.ATG"
out expr);
Expect(20);
EmbeddedStatement(
-#line 1682 "cs.ATG"
+#line 1686 "cs.ATG"
out embeddedStatement);
-#line 1682 "cs.ATG"
+#line 1686 "cs.ATG"
statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start);
} else if (la.kind == 63) {
lexer.NextToken();
EmbeddedStatement(
-#line 1683 "cs.ATG"
+#line 1687 "cs.ATG"
out embeddedStatement);
Expect(123);
Expect(19);
Expr(
-#line 1684 "cs.ATG"
+#line 1688 "cs.ATG"
out expr);
Expect(20);
Expect(11);
-#line 1684 "cs.ATG"
+#line 1688 "cs.ATG"
statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.End);
} else if (la.kind == 74) {
lexer.NextToken();
-#line 1685 "cs.ATG"
+#line 1689 "cs.ATG"
ArrayList initializer = null; ArrayList iterator = null;
Expect(19);
if (StartOf(4)) {
ForInitializer(
-#line 1686 "cs.ATG"
+#line 1690 "cs.ATG"
out initializer);
}
Expect(11);
if (StartOf(4)) {
Expr(
-#line 1687 "cs.ATG"
+#line 1691 "cs.ATG"
out expr);
}
Expect(11);
if (StartOf(4)) {
ForIterator(
-#line 1688 "cs.ATG"
+#line 1692 "cs.ATG"
out iterator);
}
Expect(20);
EmbeddedStatement(
-#line 1689 "cs.ATG"
+#line 1693 "cs.ATG"
out embeddedStatement);
-#line 1689 "cs.ATG"
+#line 1693 "cs.ATG"
statement = new ForStatement(initializer, expr, iterator, embeddedStatement);
} else if (la.kind == 75) {
lexer.NextToken();
Expect(19);
Type(
-#line 1690 "cs.ATG"
+#line 1694 "cs.ATG"
out type);
Expect(1);
-#line 1690 "cs.ATG"
+#line 1694 "cs.ATG"
string varName = t.val; Point start = t.Location;
Expect(79);
Expr(
-#line 1691 "cs.ATG"
+#line 1695 "cs.ATG"
out expr);
Expect(20);
EmbeddedStatement(
-#line 1692 "cs.ATG"
+#line 1696 "cs.ATG"
out embeddedStatement);
-#line 1692 "cs.ATG"
+#line 1696 "cs.ATG"
statement = new ForeachStatement(type, varName , expr, embeddedStatement);
statement.EndLocation = t.EndLocation;
@@ -3712,34 +3704,34 @@ out embeddedStatement);
lexer.NextToken();
Expect(11);
-#line 1696 "cs.ATG"
+#line 1700 "cs.ATG"
statement = new BreakStatement();
} else if (la.kind == 59) {
lexer.NextToken();
Expect(11);
-#line 1697 "cs.ATG"
+#line 1701 "cs.ATG"
statement = new ContinueStatement();
} else if (la.kind == 76) {
GotoStatement(
-#line 1698 "cs.ATG"
+#line 1702 "cs.ATG"
out statement);
} else if (
-#line 1699 "cs.ATG"
+#line 1703 "cs.ATG"
IsYieldStatement()) {
Expect(1);
if (la.kind == 99) {
lexer.NextToken();
Expr(
-#line 1699 "cs.ATG"
+#line 1703 "cs.ATG"
out expr);
-#line 1699 "cs.ATG"
+#line 1703 "cs.ATG"
statement = new YieldStatement(new ReturnStatement(expr));
} else if (la.kind == 51) {
lexer.NextToken();
-#line 1700 "cs.ATG"
+#line 1704 "cs.ATG"
statement = new YieldStatement(new BreakStatement());
} else SynErr(167);
Expect(11);
@@ -3747,513 +3739,513 @@ out expr);
lexer.NextToken();
if (StartOf(4)) {
Expr(
-#line 1701 "cs.ATG"
+#line 1705 "cs.ATG"
out expr);
}
Expect(11);
-#line 1701 "cs.ATG"
+#line 1705 "cs.ATG"
statement = new ReturnStatement(expr);
} else if (la.kind == 110) {
lexer.NextToken();
if (StartOf(4)) {
Expr(
-#line 1702 "cs.ATG"
+#line 1706 "cs.ATG"
out expr);
}
Expect(11);
-#line 1702 "cs.ATG"
+#line 1706 "cs.ATG"
statement = new ThrowStatement(expr);
} else if (StartOf(4)) {
StatementExpr(
-#line 1704 "cs.ATG"
+#line 1708 "cs.ATG"
out statement);
Expect(11);
} else if (la.kind == 112) {
TryStatement(
-#line 1706 "cs.ATG"
+#line 1710 "cs.ATG"
out statement);
} else if (la.kind == 84) {
lexer.NextToken();
Expect(19);
Expr(
-#line 1708 "cs.ATG"
+#line 1712 "cs.ATG"
out expr);
Expect(20);
EmbeddedStatement(
-#line 1709 "cs.ATG"
+#line 1713 "cs.ATG"
out embeddedStatement);
-#line 1709 "cs.ATG"
+#line 1713 "cs.ATG"
statement = new LockStatement(expr, embeddedStatement);
} else if (la.kind == 119) {
-#line 1711 "cs.ATG"
+#line 1715 "cs.ATG"
Statement resourceAcquisitionStmt = null;
lexer.NextToken();
Expect(19);
ResourceAcquisition(
-#line 1713 "cs.ATG"
+#line 1717 "cs.ATG"
out resourceAcquisitionStmt);
Expect(20);
EmbeddedStatement(
-#line 1714 "cs.ATG"
+#line 1718 "cs.ATG"
out embeddedStatement);
-#line 1714 "cs.ATG"
+#line 1718 "cs.ATG"
statement = new UsingStatement(resourceAcquisitionStmt, embeddedStatement);
} else if (la.kind == 117) {
lexer.NextToken();
Block(
-#line 1716 "cs.ATG"
+#line 1720 "cs.ATG"
out embeddedStatement);
-#line 1716 "cs.ATG"
+#line 1720 "cs.ATG"
statement = new UnsafeStatement(embeddedStatement);
} else if (la.kind == 72) {
lexer.NextToken();
Expect(19);
Type(
-#line 1719 "cs.ATG"
+#line 1723 "cs.ATG"
out type);
-#line 1719 "cs.ATG"
+#line 1723 "cs.ATG"
if (type.PointerNestingLevel == 0) Error("can only fix pointer types");
ArrayList pointerDeclarators = new ArrayList(1);
Expect(1);
-#line 1722 "cs.ATG"
+#line 1726 "cs.ATG"
string identifier = t.val;
Expect(3);
Expr(
-#line 1723 "cs.ATG"
+#line 1727 "cs.ATG"
out expr);
-#line 1723 "cs.ATG"
+#line 1727 "cs.ATG"
pointerDeclarators.Add(new VariableDeclaration(identifier, expr));
while (la.kind == 13) {
lexer.NextToken();
Expect(1);
-#line 1725 "cs.ATG"
+#line 1729 "cs.ATG"
identifier = t.val;
Expect(3);
Expr(
-#line 1726 "cs.ATG"
+#line 1730 "cs.ATG"
out expr);
-#line 1726 "cs.ATG"
+#line 1730 "cs.ATG"
pointerDeclarators.Add(new VariableDeclaration(identifier, expr));
}
Expect(20);
EmbeddedStatement(
-#line 1728 "cs.ATG"
+#line 1732 "cs.ATG"
out embeddedStatement);
-#line 1728 "cs.ATG"
+#line 1732 "cs.ATG"
statement = new FixedStatement(type, pointerDeclarators, embeddedStatement);
} else SynErr(168);
}
void SwitchSection(
-#line 1750 "cs.ATG"
+#line 1754 "cs.ATG"
out SwitchSection stmt) {
-#line 1752 "cs.ATG"
+#line 1756 "cs.ATG"
SwitchSection switchSection = new SwitchSection();
CaseLabel label;
SwitchLabel(
-#line 1756 "cs.ATG"
+#line 1760 "cs.ATG"
out label);
-#line 1756 "cs.ATG"
+#line 1760 "cs.ATG"
switchSection.SwitchLabels.Add(label);
while (la.kind == 53 || la.kind == 61) {
SwitchLabel(
-#line 1758 "cs.ATG"
+#line 1762 "cs.ATG"
out label);
-#line 1758 "cs.ATG"
+#line 1762 "cs.ATG"
switchSection.SwitchLabels.Add(label);
}
-#line 1760 "cs.ATG"
+#line 1764 "cs.ATG"
compilationUnit.BlockStart(switchSection);
Statement();
while (StartOf(20)) {
Statement();
}
-#line 1763 "cs.ATG"
+#line 1767 "cs.ATG"
compilationUnit.BlockEnd();
stmt = switchSection;
}
void ForInitializer(
-#line 1731 "cs.ATG"
+#line 1735 "cs.ATG"
out ArrayList initializer) {
-#line 1733 "cs.ATG"
+#line 1737 "cs.ATG"
Statement stmt;
initializer = new ArrayList();
if (
-#line 1737 "cs.ATG"
+#line 1741 "cs.ATG"
IsLocalVarDecl()) {
LocalVariableDecl(
-#line 1737 "cs.ATG"
+#line 1741 "cs.ATG"
out stmt);
-#line 1737 "cs.ATG"
+#line 1741 "cs.ATG"
initializer.Add(stmt);
} else if (StartOf(4)) {
StatementExpr(
-#line 1738 "cs.ATG"
+#line 1742 "cs.ATG"
out stmt);
-#line 1738 "cs.ATG"
+#line 1742 "cs.ATG"
initializer.Add(stmt);
while (la.kind == 13) {
lexer.NextToken();
StatementExpr(
-#line 1738 "cs.ATG"
+#line 1742 "cs.ATG"
out stmt);
-#line 1738 "cs.ATG"
+#line 1742 "cs.ATG"
initializer.Add(stmt);
}
-#line 1738 "cs.ATG"
+#line 1742 "cs.ATG"
initializer.Add(stmt);
} else SynErr(169);
}
void ForIterator(
-#line 1741 "cs.ATG"
+#line 1745 "cs.ATG"
out ArrayList iterator) {
-#line 1743 "cs.ATG"
+#line 1747 "cs.ATG"
Statement stmt;
iterator = new ArrayList();
StatementExpr(
-#line 1747 "cs.ATG"
+#line 1751 "cs.ATG"
out stmt);
-#line 1747 "cs.ATG"
+#line 1751 "cs.ATG"
iterator.Add(stmt);
while (la.kind == 13) {
lexer.NextToken();
StatementExpr(
-#line 1747 "cs.ATG"
+#line 1751 "cs.ATG"
out stmt);
-#line 1747 "cs.ATG"
+#line 1751 "cs.ATG"
iterator.Add(stmt);
}
}
void GotoStatement(
-#line 1818 "cs.ATG"
+#line 1822 "cs.ATG"
out Statement stmt) {
-#line 1819 "cs.ATG"
+#line 1823 "cs.ATG"
Expression expr; stmt = null;
Expect(76);
if (la.kind == 1) {
lexer.NextToken();
-#line 1823 "cs.ATG"
+#line 1827 "cs.ATG"
stmt = new GotoStatement(t.val);
Expect(11);
} else if (la.kind == 53) {
lexer.NextToken();
Expr(
-#line 1824 "cs.ATG"
+#line 1828 "cs.ATG"
out expr);
Expect(11);
-#line 1824 "cs.ATG"
+#line 1828 "cs.ATG"
stmt = new GotoCaseStatement(expr);
} else if (la.kind == 61) {
lexer.NextToken();
Expect(11);
-#line 1825 "cs.ATG"
+#line 1829 "cs.ATG"
stmt = new GotoCaseStatement(null);
} else SynErr(170);
}
void StatementExpr(
-#line 1845 "cs.ATG"
+#line 1849 "cs.ATG"
out Statement stmt) {
-#line 1850 "cs.ATG"
+#line 1854 "cs.ATG"
bool mustBeAssignment = la.kind == Tokens.Plus || la.kind == Tokens.Minus ||
la.kind == Tokens.Not || la.kind == Tokens.BitwiseComplement ||
la.kind == Tokens.Times || la.kind == Tokens.BitwiseAnd || IsTypeCast();
Expression expr = null;
UnaryExpr(
-#line 1856 "cs.ATG"
+#line 1860 "cs.ATG"
out expr);
if (StartOf(6)) {
-#line 1859 "cs.ATG"
+#line 1863 "cs.ATG"
AssignmentOperatorType op; Expression val;
AssignmentOperator(
-#line 1859 "cs.ATG"
+#line 1863 "cs.ATG"
out op);
Expr(
-#line 1859 "cs.ATG"
+#line 1863 "cs.ATG"
out val);
-#line 1859 "cs.ATG"
+#line 1863 "cs.ATG"
expr = new AssignmentExpression(expr, op, val);
} else if (la.kind == 11 || la.kind == 13 || la.kind == 20) {
-#line 1860 "cs.ATG"
+#line 1864 "cs.ATG"
if (mustBeAssignment) Error("error in assignment.");
} else SynErr(171);
-#line 1861 "cs.ATG"
+#line 1865 "cs.ATG"
stmt = new StatementExpression(expr);
}
void TryStatement(
-#line 1775 "cs.ATG"
+#line 1779 "cs.ATG"
out Statement tryStatement) {
-#line 1777 "cs.ATG"
+#line 1781 "cs.ATG"
Statement blockStmt = null, finallyStmt = null;
ArrayList catchClauses = null;
Expect(112);
Block(
-#line 1781 "cs.ATG"
+#line 1785 "cs.ATG"
out blockStmt);
if (la.kind == 54) {
CatchClauses(
-#line 1783 "cs.ATG"
+#line 1787 "cs.ATG"
out catchClauses);
if (la.kind == 71) {
lexer.NextToken();
Block(
-#line 1783 "cs.ATG"
+#line 1787 "cs.ATG"
out finallyStmt);
}
} else if (la.kind == 71) {
lexer.NextToken();
Block(
-#line 1784 "cs.ATG"
+#line 1788 "cs.ATG"
out finallyStmt);
} else SynErr(172);
-#line 1787 "cs.ATG"
+#line 1791 "cs.ATG"
tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
}
void ResourceAcquisition(
-#line 1829 "cs.ATG"
+#line 1833 "cs.ATG"
out Statement stmt) {
-#line 1831 "cs.ATG"
+#line 1835 "cs.ATG"
stmt = null;
Expression expr;
if (
-#line 1836 "cs.ATG"
+#line 1840 "cs.ATG"
IsLocalVarDecl()) {
LocalVariableDecl(
-#line 1836 "cs.ATG"
+#line 1840 "cs.ATG"
out stmt);
} else if (StartOf(4)) {
Expr(
-#line 1837 "cs.ATG"
+#line 1841 "cs.ATG"
out expr);
-#line 1841 "cs.ATG"
+#line 1845 "cs.ATG"
stmt = new StatementExpression(expr);
} else SynErr(173);
}
void SwitchLabel(
-#line 1768 "cs.ATG"
+#line 1772 "cs.ATG"
out CaseLabel label) {
-#line 1769 "cs.ATG"
+#line 1773 "cs.ATG"
Expression expr = null; label = null;
if (la.kind == 53) {
lexer.NextToken();
Expr(
-#line 1771 "cs.ATG"
+#line 1775 "cs.ATG"
out expr);
Expect(9);
-#line 1771 "cs.ATG"
+#line 1775 "cs.ATG"
label = new CaseLabel(expr);
} else if (la.kind == 61) {
lexer.NextToken();
Expect(9);
-#line 1772 "cs.ATG"
+#line 1776 "cs.ATG"
label = new CaseLabel();
} else SynErr(174);
}
void CatchClauses(
-#line 1792 "cs.ATG"
+#line 1796 "cs.ATG"
out ArrayList catchClauses) {
-#line 1794 "cs.ATG"
+#line 1798 "cs.ATG"
catchClauses = new ArrayList();
Expect(54);
-#line 1797 "cs.ATG"
+#line 1801 "cs.ATG"
string identifier;
Statement stmt;
TypeReference typeRef;
if (la.kind == 15) {
Block(
-#line 1803 "cs.ATG"
+#line 1807 "cs.ATG"
out stmt);
-#line 1803 "cs.ATG"
+#line 1807 "cs.ATG"
catchClauses.Add(new CatchClause(stmt));
} else if (la.kind == 19) {
lexer.NextToken();
ClassType(
-#line 1805 "cs.ATG"
+#line 1809 "cs.ATG"
out typeRef);
-#line 1805 "cs.ATG"
+#line 1809 "cs.ATG"
identifier = null;
if (la.kind == 1) {
lexer.NextToken();
-#line 1806 "cs.ATG"
+#line 1810 "cs.ATG"
identifier = t.val;
}
Expect(20);
Block(
-#line 1807 "cs.ATG"
+#line 1811 "cs.ATG"
out stmt);
-#line 1808 "cs.ATG"
+#line 1812 "cs.ATG"
catchClauses.Add(new CatchClause(typeRef, identifier, stmt));
while (
-#line 1809 "cs.ATG"
+#line 1813 "cs.ATG"
IsTypedCatch()) {
Expect(54);
Expect(19);
ClassType(
-#line 1809 "cs.ATG"
+#line 1813 "cs.ATG"
out typeRef);
-#line 1809 "cs.ATG"
+#line 1813 "cs.ATG"
identifier = null;
if (la.kind == 1) {
lexer.NextToken();
-#line 1810 "cs.ATG"
+#line 1814 "cs.ATG"
identifier = t.val;
}
Expect(20);
Block(
-#line 1811 "cs.ATG"
+#line 1815 "cs.ATG"
out stmt);
-#line 1812 "cs.ATG"
+#line 1816 "cs.ATG"
catchClauses.Add(new CatchClause(typeRef, identifier, stmt));
}
if (la.kind == 54) {
lexer.NextToken();
Block(
-#line 1814 "cs.ATG"
+#line 1818 "cs.ATG"
out stmt);
-#line 1814 "cs.ATG"
+#line 1818 "cs.ATG"
catchClauses.Add(new CatchClause(stmt));
}
} else SynErr(175);
}
void UnaryExpr(
-#line 1877 "cs.ATG"
+#line 1881 "cs.ATG"
out Expression uExpr) {
-#line 1879 "cs.ATG"
+#line 1883 "cs.ATG"
TypeReference type = null;
Expression expr;
ArrayList expressions = new ArrayList();
uExpr = null;
while (StartOf(24) ||
-#line 1903 "cs.ATG"
+#line 1907 "cs.ATG"
IsTypeCast()) {
if (la.kind == 4) {
lexer.NextToken();
-#line 1888 "cs.ATG"
+#line 1892 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Plus));
} else if (la.kind == 5) {
lexer.NextToken();
-#line 1889 "cs.ATG"
+#line 1893 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Minus));
} else if (la.kind == 23) {
lexer.NextToken();
-#line 1890 "cs.ATG"
+#line 1894 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Not));
} else if (la.kind == 26) {
lexer.NextToken();
-#line 1891 "cs.ATG"
+#line 1895 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitNot));
} else if (la.kind == 6) {
lexer.NextToken();
-#line 1892 "cs.ATG"
+#line 1896 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Star));
} else if (la.kind == 30) {
lexer.NextToken();
-#line 1893 "cs.ATG"
+#line 1897 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Increment));
} else if (la.kind == 31) {
lexer.NextToken();
-#line 1894 "cs.ATG"
+#line 1898 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Decrement));
} else if (la.kind == 27) {
lexer.NextToken();
-#line 1895 "cs.ATG"
+#line 1899 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitWiseAnd));
} else {
Expect(19);
Type(
-#line 1903 "cs.ATG"
+#line 1907 "cs.ATG"
out type);
Expect(20);
-#line 1903 "cs.ATG"
+#line 1907 "cs.ATG"
expressions.Add(new CastExpression(type));
}
}
PrimaryExpr(
-#line 1907 "cs.ATG"
+#line 1911 "cs.ATG"
out expr);
-#line 1907 "cs.ATG"
+#line 1911 "cs.ATG"
for (int i = 0; i < expressions.Count; ++i) {
Expression nextExpression = i + 1 < expressions.Count ? (Expression)expressions[i + 1] : expr;
if (expressions[i] is CastExpression) {
@@ -4271,33 +4263,33 @@ out expr);
}
void ConditionalOrExpr(
-#line 2090 "cs.ATG"
+#line 2094 "cs.ATG"
ref Expression outExpr) {
-#line 2091 "cs.ATG"
+#line 2095 "cs.ATG"
Expression expr;
ConditionalAndExpr(
-#line 2093 "cs.ATG"
+#line 2097 "cs.ATG"
ref outExpr);
while (la.kind == 25) {
lexer.NextToken();
UnaryExpr(
-#line 2093 "cs.ATG"
+#line 2097 "cs.ATG"
out expr);
ConditionalAndExpr(
-#line 2093 "cs.ATG"
+#line 2097 "cs.ATG"
ref expr);
-#line 2093 "cs.ATG"
+#line 2097 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalOr, expr);
}
}
void PrimaryExpr(
-#line 1924 "cs.ATG"
+#line 1928 "cs.ATG"
out Expression pexpr) {
-#line 1926 "cs.ATG"
+#line 1930 "cs.ATG"
TypeReference type = null;
List typeList = null;
bool isArrayCreation = false;
@@ -4307,340 +4299,340 @@ out Expression pexpr) {
if (la.kind == 111) {
lexer.NextToken();
-#line 1934 "cs.ATG"
+#line 1938 "cs.ATG"
pexpr = new PrimitiveExpression(true, "true");
} else if (la.kind == 70) {
lexer.NextToken();
-#line 1935 "cs.ATG"
+#line 1939 "cs.ATG"
pexpr = new PrimitiveExpression(false, "false");
} else if (la.kind == 88) {
lexer.NextToken();
-#line 1936 "cs.ATG"
+#line 1940 "cs.ATG"
pexpr = new PrimitiveExpression(null, "null");
} else if (la.kind == 2) {
lexer.NextToken();
-#line 1937 "cs.ATG"
+#line 1941 "cs.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
} else if (
-#line 1938 "cs.ATG"
+#line 1942 "cs.ATG"
la.kind == Tokens.Identifier && Peek(1).kind == Tokens.DoubleColon) {
TypeName(
-#line 1939 "cs.ATG"
+#line 1943 "cs.ATG"
out type);
-#line 1939 "cs.ATG"
+#line 1943 "cs.ATG"
pexpr = new TypeReferenceExpression(type);
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1941 "cs.ATG"
+#line 1945 "cs.ATG"
pexpr = new IdentifierExpression(t.val);
} else if (la.kind == 19) {
lexer.NextToken();
Expr(
-#line 1943 "cs.ATG"
+#line 1947 "cs.ATG"
out expr);
Expect(20);
-#line 1943 "cs.ATG"
+#line 1947 "cs.ATG"
pexpr = new ParenthesizedExpression(expr);
} else if (StartOf(25)) {
-#line 1945 "cs.ATG"
+#line 1949 "cs.ATG"
string val = null;
switch (la.kind) {
case 50: {
lexer.NextToken();
-#line 1947 "cs.ATG"
+#line 1951 "cs.ATG"
val = "bool";
break;
}
case 52: {
lexer.NextToken();
-#line 1948 "cs.ATG"
+#line 1952 "cs.ATG"
val = "byte";
break;
}
case 55: {
lexer.NextToken();
-#line 1949 "cs.ATG"
+#line 1953 "cs.ATG"
val = "char";
break;
}
case 60: {
lexer.NextToken();
-#line 1950 "cs.ATG"
+#line 1954 "cs.ATG"
val = "decimal";
break;
}
case 64: {
lexer.NextToken();
-#line 1951 "cs.ATG"
+#line 1955 "cs.ATG"
val = "double";
break;
}
case 73: {
lexer.NextToken();
-#line 1952 "cs.ATG"
+#line 1956 "cs.ATG"
val = "float";
break;
}
case 80: {
lexer.NextToken();
-#line 1953 "cs.ATG"
+#line 1957 "cs.ATG"
val = "int";
break;
}
case 85: {
lexer.NextToken();
-#line 1954 "cs.ATG"
+#line 1958 "cs.ATG"
val = "long";
break;
}
case 89: {
lexer.NextToken();
-#line 1955 "cs.ATG"
+#line 1959 "cs.ATG"
val = "object";
break;
}
case 100: {
lexer.NextToken();
-#line 1956 "cs.ATG"
+#line 1960 "cs.ATG"
val = "sbyte";
break;
}
case 102: {
lexer.NextToken();
-#line 1957 "cs.ATG"
+#line 1961 "cs.ATG"
val = "short";
break;
}
case 106: {
lexer.NextToken();
-#line 1958 "cs.ATG"
+#line 1962 "cs.ATG"
val = "string";
break;
}
case 114: {
lexer.NextToken();
-#line 1959 "cs.ATG"
+#line 1963 "cs.ATG"
val = "uint";
break;
}
case 115: {
lexer.NextToken();
-#line 1960 "cs.ATG"
+#line 1964 "cs.ATG"
val = "ulong";
break;
}
case 118: {
lexer.NextToken();
-#line 1961 "cs.ATG"
+#line 1965 "cs.ATG"
val = "ushort";
break;
}
}
-#line 1962 "cs.ATG"
+#line 1966 "cs.ATG"
t.val = "";
Expect(14);
Expect(1);
-#line 1962 "cs.ATG"
+#line 1966 "cs.ATG"
pexpr = new FieldReferenceExpression(new TypeReferenceExpression(val), t.val);
} else if (la.kind == 109) {
lexer.NextToken();
-#line 1964 "cs.ATG"
+#line 1968 "cs.ATG"
pexpr = new ThisReferenceExpression();
} else if (la.kind == 49) {
lexer.NextToken();
-#line 1966 "cs.ATG"
+#line 1970 "cs.ATG"
Expression retExpr = new BaseReferenceExpression();
if (la.kind == 14) {
lexer.NextToken();
Expect(1);
-#line 1968 "cs.ATG"
+#line 1972 "cs.ATG"
retExpr = new FieldReferenceExpression(retExpr, t.val);
} else if (la.kind == 17) {
lexer.NextToken();
Expr(
-#line 1969 "cs.ATG"
+#line 1973 "cs.ATG"
out expr);
-#line 1969 "cs.ATG"
+#line 1973 "cs.ATG"
ArrayList indices = new ArrayList(); if (expr != null) { indices.Add(expr); }
while (la.kind == 13) {
lexer.NextToken();
Expr(
-#line 1970 "cs.ATG"
+#line 1974 "cs.ATG"
out expr);
-#line 1970 "cs.ATG"
+#line 1974 "cs.ATG"
if (expr != null) { indices.Add(expr); }
}
Expect(18);
-#line 1971 "cs.ATG"
+#line 1975 "cs.ATG"
retExpr = new IndexerExpression(retExpr, indices);
} else SynErr(176);
-#line 1972 "cs.ATG"
+#line 1976 "cs.ATG"
pexpr = retExpr;
} else if (la.kind == 87) {
lexer.NextToken();
NonArrayType(
-#line 1973 "cs.ATG"
+#line 1977 "cs.ATG"
out type);
-#line 1973 "cs.ATG"
+#line 1977 "cs.ATG"
ArrayList parameters = new ArrayList();
if (la.kind == 19) {
lexer.NextToken();
-#line 1978 "cs.ATG"
+#line 1982 "cs.ATG"
ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters);
if (StartOf(21)) {
Argument(
-#line 1979 "cs.ATG"
+#line 1983 "cs.ATG"
out expr);
-#line 1979 "cs.ATG"
+#line 1983 "cs.ATG"
if (expr != null) { parameters.Add(expr); }
while (la.kind == 13) {
lexer.NextToken();
Argument(
-#line 1980 "cs.ATG"
+#line 1984 "cs.ATG"
out expr);
-#line 1980 "cs.ATG"
+#line 1984 "cs.ATG"
if (expr != null) { parameters.Add(expr); }
}
}
Expect(20);
-#line 1982 "cs.ATG"
+#line 1986 "cs.ATG"
pexpr = oce;
} else if (la.kind == 17) {
-#line 1984 "cs.ATG"
+#line 1988 "cs.ATG"
isArrayCreation = true; ArrayCreateExpression ace = new ArrayCreateExpression(type); pexpr = ace;
lexer.NextToken();
-#line 1985 "cs.ATG"
+#line 1989 "cs.ATG"
int dims = 0;
ArrayList rank = new ArrayList();
ArrayList parameterExpression = new ArrayList();
if (StartOf(4)) {
Expr(
-#line 1989 "cs.ATG"
+#line 1993 "cs.ATG"
out expr);
-#line 1989 "cs.ATG"
+#line 1993 "cs.ATG"
if (expr != null) { parameterExpression.Add(expr); }
while (la.kind == 13) {
lexer.NextToken();
Expr(
-#line 1991 "cs.ATG"
+#line 1995 "cs.ATG"
out expr);
-#line 1991 "cs.ATG"
+#line 1995 "cs.ATG"
if (expr != null) { parameterExpression.Add(expr); }
}
Expect(18);
-#line 1993 "cs.ATG"
+#line 1997 "cs.ATG"
parameters.Add(new ArrayCreationParameter(parameterExpression));
ace.Parameters = parameters;
while (
-#line 1996 "cs.ATG"
+#line 2000 "cs.ATG"
IsDims()) {
Expect(17);
-#line 1996 "cs.ATG"
+#line 2000 "cs.ATG"
dims =0;
while (la.kind == 13) {
lexer.NextToken();
-#line 1997 "cs.ATG"
+#line 2001 "cs.ATG"
dims++;
}
-#line 1997 "cs.ATG"
+#line 2001 "cs.ATG"
rank.Add(dims);
parameters.Add(new ArrayCreationParameter(dims));
Expect(18);
}
-#line 2001 "cs.ATG"
+#line 2005 "cs.ATG"
if (rank.Count > 0) {
ace.Rank = (int[])rank.ToArray(typeof (int));
}
if (la.kind == 15) {
ArrayInitializer(
-#line 2005 "cs.ATG"
+#line 2009 "cs.ATG"
out expr);
-#line 2005 "cs.ATG"
+#line 2009 "cs.ATG"
ace.ArrayInitializer = (ArrayInitializerExpression)expr;
}
} else if (la.kind == 13 || la.kind == 18) {
while (la.kind == 13) {
lexer.NextToken();
-#line 2007 "cs.ATG"
+#line 2011 "cs.ATG"
dims++;
}
-#line 2008 "cs.ATG"
+#line 2012 "cs.ATG"
parameters.Add(new ArrayCreationParameter(dims));
Expect(18);
while (
-#line 2010 "cs.ATG"
+#line 2014 "cs.ATG"
IsDims()) {
Expect(17);
-#line 2010 "cs.ATG"
+#line 2014 "cs.ATG"
dims =0;
while (la.kind == 13) {
lexer.NextToken();
-#line 2010 "cs.ATG"
+#line 2014 "cs.ATG"
dims++;
}
-#line 2010 "cs.ATG"
+#line 2014 "cs.ATG"
parameters.Add(new ArrayCreationParameter(dims));
Expect(18);
}
ArrayInitializer(
-#line 2010 "cs.ATG"
+#line 2014 "cs.ATG"
out expr);
-#line 2010 "cs.ATG"
+#line 2014 "cs.ATG"
ace.ArrayInitializer = (ArrayInitializerExpression)expr; ace.Parameters = parameters;
} else SynErr(177);
} else SynErr(178);
@@ -4648,192 +4640,192 @@ out expr);
lexer.NextToken();
Expect(19);
if (
-#line 2016 "cs.ATG"
+#line 2020 "cs.ATG"
NotVoidPointer()) {
Expect(121);
-#line 2016 "cs.ATG"
+#line 2020 "cs.ATG"
type = new TypeReference("void");
} else if (StartOf(8)) {
Type(
-#line 2017 "cs.ATG"
+#line 2021 "cs.ATG"
out type);
} else SynErr(179);
Expect(20);
-#line 2018 "cs.ATG"
+#line 2022 "cs.ATG"
pexpr = new TypeOfExpression(type);
} else if (la.kind == 103) {
lexer.NextToken();
Expect(19);
Type(
-#line 2019 "cs.ATG"
+#line 2023 "cs.ATG"
out type);
Expect(20);
-#line 2019 "cs.ATG"
+#line 2023 "cs.ATG"
pexpr = new SizeOfExpression(type);
} else if (la.kind == 56) {
lexer.NextToken();
Expect(19);
Expr(
-#line 2020 "cs.ATG"
+#line 2024 "cs.ATG"
out expr);
Expect(20);
-#line 2020 "cs.ATG"
+#line 2024 "cs.ATG"
pexpr = new CheckedExpression(expr);
} else if (la.kind == 116) {
lexer.NextToken();
Expect(19);
Expr(
-#line 2021 "cs.ATG"
+#line 2025 "cs.ATG"
out expr);
Expect(20);
-#line 2021 "cs.ATG"
+#line 2025 "cs.ATG"
pexpr = new UncheckedExpression(expr);
} else if (la.kind == 62) {
lexer.NextToken();
AnonymousMethodExpr(
-#line 2022 "cs.ATG"
+#line 2026 "cs.ATG"
out expr);
-#line 2022 "cs.ATG"
+#line 2026 "cs.ATG"
pexpr = expr;
} else SynErr(180);
while (StartOf(26) ||
-#line 2043 "cs.ATG"
+#line 2047 "cs.ATG"
IsGenericFollowedBy(Tokens.Dot) && IsTypeReferenceExpression(pexpr) ||
-#line 2051 "cs.ATG"
+#line 2055 "cs.ATG"
IsGenericFollowedBy(Tokens.OpenParenthesis)) {
if (la.kind == 30 || la.kind == 31) {
if (la.kind == 30) {
lexer.NextToken();
-#line 2026 "cs.ATG"
+#line 2030 "cs.ATG"
pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostIncrement);
} else if (la.kind == 31) {
lexer.NextToken();
-#line 2027 "cs.ATG"
+#line 2031 "cs.ATG"
pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostDecrement);
} else SynErr(181);
} else if (la.kind == 46) {
lexer.NextToken();
Expect(1);
-#line 2030 "cs.ATG"
+#line 2034 "cs.ATG"
pexpr = new PointerReferenceExpression(pexpr, t.val);
} else if (la.kind == 14) {
lexer.NextToken();
Expect(1);
-#line 2031 "cs.ATG"
+#line 2035 "cs.ATG"
pexpr = new FieldReferenceExpression(pexpr, t.val);
} else if (
-#line 2043 "cs.ATG"
+#line 2047 "cs.ATG"
IsGenericFollowedBy(Tokens.Dot) && IsTypeReferenceExpression(pexpr)) {
TypeArgumentList(
-#line 2044 "cs.ATG"
+#line 2048 "cs.ATG"
out typeList);
Expect(14);
Expect(1);
-#line 2045 "cs.ATG"
+#line 2049 "cs.ATG"
pexpr = new FieldReferenceExpression(GetTypeReferenceExpression(pexpr, typeList), t.val);
} else if (la.kind == 19) {
lexer.NextToken();
-#line 2047 "cs.ATG"
+#line 2051 "cs.ATG"
ArrayList parameters = new ArrayList();
if (StartOf(21)) {
Argument(
-#line 2048 "cs.ATG"
+#line 2052 "cs.ATG"
out expr);
-#line 2048 "cs.ATG"
+#line 2052 "cs.ATG"
if (expr != null) {parameters.Add(expr);}
while (la.kind == 13) {
lexer.NextToken();
Argument(
-#line 2049 "cs.ATG"
+#line 2053 "cs.ATG"
out expr);
-#line 2049 "cs.ATG"
+#line 2053 "cs.ATG"
if (expr != null) {parameters.Add(expr);}
}
}
Expect(20);
-#line 2050 "cs.ATG"
+#line 2054 "cs.ATG"
pexpr = new InvocationExpression(pexpr, parameters);
} else if (
-#line 2051 "cs.ATG"
+#line 2055 "cs.ATG"
IsGenericFollowedBy(Tokens.OpenParenthesis)) {
TypeArgumentList(
-#line 2051 "cs.ATG"
+#line 2055 "cs.ATG"
out typeList);
Expect(19);
-#line 2052 "cs.ATG"
+#line 2056 "cs.ATG"
ArrayList parameters = new ArrayList();
if (StartOf(21)) {
Argument(
-#line 2053 "cs.ATG"
+#line 2057 "cs.ATG"
out expr);
-#line 2053 "cs.ATG"
+#line 2057 "cs.ATG"
if (expr != null) {parameters.Add(expr);}
while (la.kind == 13) {
lexer.NextToken();
Argument(
-#line 2054 "cs.ATG"
+#line 2058 "cs.ATG"
out expr);
-#line 2054 "cs.ATG"
+#line 2058 "cs.ATG"
if (expr != null) {parameters.Add(expr);}
}
}
Expect(20);
-#line 2055 "cs.ATG"
+#line 2059 "cs.ATG"
pexpr = new InvocationExpression(pexpr, parameters, typeList);
} else {
-#line 2057 "cs.ATG"
+#line 2061 "cs.ATG"
if (isArrayCreation) Error("element access not allow on array creation");
ArrayList indices = new ArrayList();
lexer.NextToken();
Expr(
-#line 2060 "cs.ATG"
+#line 2064 "cs.ATG"
out expr);
-#line 2060 "cs.ATG"
+#line 2064 "cs.ATG"
if (expr != null) { indices.Add(expr); }
while (la.kind == 13) {
lexer.NextToken();
Expr(
-#line 2061 "cs.ATG"
+#line 2065 "cs.ATG"
out expr);
-#line 2061 "cs.ATG"
+#line 2065 "cs.ATG"
if (expr != null) { indices.Add(expr); }
}
Expect(18);
-#line 2062 "cs.ATG"
+#line 2066 "cs.ATG"
pexpr = new IndexerExpression(pexpr, indices);
}
}
}
void AnonymousMethodExpr(
-#line 2066 "cs.ATG"
+#line 2070 "cs.ATG"
out Expression outExpr) {
-#line 2068 "cs.ATG"
+#line 2072 "cs.ATG"
AnonymousMethodExpression expr = new AnonymousMethodExpression();
expr.StartLocation = t.Location;
Statement stmt;
@@ -4843,336 +4835,336 @@ out Expression outExpr) {
Expect(19);
if (StartOf(9)) {
FormalParameterList(
-#line 2076 "cs.ATG"
+#line 2080 "cs.ATG"
p);
-#line 2076 "cs.ATG"
+#line 2080 "cs.ATG"
expr.Parameters = p;
}
Expect(20);
-#line 2080 "cs.ATG"
+#line 2084 "cs.ATG"
if (compilationUnit != null) {
Block(
-#line 2081 "cs.ATG"
+#line 2085 "cs.ATG"
out stmt);
-#line 2081 "cs.ATG"
+#line 2085 "cs.ATG"
expr.Body = (BlockStatement)stmt;
-#line 2082 "cs.ATG"
+#line 2086 "cs.ATG"
} else {
Expect(15);
-#line 2084 "cs.ATG"
+#line 2088 "cs.ATG"
lexer.SkipCurrentBlock();
Expect(16);
-#line 2086 "cs.ATG"
+#line 2090 "cs.ATG"
}
-#line 2087 "cs.ATG"
+#line 2091 "cs.ATG"
expr.EndLocation = t.Location;
}
void TypeArgumentList(
-#line 2236 "cs.ATG"
+#line 2240 "cs.ATG"
out List types) {
-#line 2238 "cs.ATG"
+#line 2242 "cs.ATG"
types = new List();
TypeReference type = null;
Expect(22);
Type(
-#line 2242 "cs.ATG"
+#line 2246 "cs.ATG"
out type);
-#line 2242 "cs.ATG"
+#line 2246 "cs.ATG"
types.Add(type);
while (la.kind == 13) {
lexer.NextToken();
Type(
-#line 2243 "cs.ATG"
+#line 2247 "cs.ATG"
out type);
-#line 2243 "cs.ATG"
+#line 2247 "cs.ATG"
types.Add(type);
}
Expect(21);
}
void ConditionalAndExpr(
-#line 2096 "cs.ATG"
+#line 2100 "cs.ATG"
ref Expression outExpr) {
-#line 2097 "cs.ATG"
+#line 2101 "cs.ATG"
Expression expr;
InclusiveOrExpr(
-#line 2099 "cs.ATG"
+#line 2103 "cs.ATG"
ref outExpr);
while (la.kind == 24) {
lexer.NextToken();
UnaryExpr(
-#line 2099 "cs.ATG"
+#line 2103 "cs.ATG"
out expr);
InclusiveOrExpr(
-#line 2099 "cs.ATG"
+#line 2103 "cs.ATG"
ref expr);
-#line 2099 "cs.ATG"
+#line 2103 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalAnd, expr);
}
}
void InclusiveOrExpr(
-#line 2102 "cs.ATG"
+#line 2106 "cs.ATG"
ref Expression outExpr) {
-#line 2103 "cs.ATG"
+#line 2107 "cs.ATG"
Expression expr;
ExclusiveOrExpr(
-#line 2105 "cs.ATG"
+#line 2109 "cs.ATG"
ref outExpr);
while (la.kind == 28) {
lexer.NextToken();
UnaryExpr(
-#line 2105 "cs.ATG"
+#line 2109 "cs.ATG"
out expr);
ExclusiveOrExpr(
-#line 2105 "cs.ATG"
+#line 2109 "cs.ATG"
ref expr);
-#line 2105 "cs.ATG"
+#line 2109 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr);
}
}
void ExclusiveOrExpr(
-#line 2108 "cs.ATG"
+#line 2112 "cs.ATG"
ref Expression outExpr) {
-#line 2109 "cs.ATG"
+#line 2113 "cs.ATG"
Expression expr;
AndExpr(
-#line 2111 "cs.ATG"
+#line 2115 "cs.ATG"
ref outExpr);
while (la.kind == 29) {
lexer.NextToken();
UnaryExpr(
-#line 2111 "cs.ATG"
+#line 2115 "cs.ATG"
out expr);
AndExpr(
-#line 2111 "cs.ATG"
+#line 2115 "cs.ATG"
ref expr);
-#line 2111 "cs.ATG"
+#line 2115 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr);
}
}
void AndExpr(
-#line 2114 "cs.ATG"
+#line 2118 "cs.ATG"
ref Expression outExpr) {
-#line 2115 "cs.ATG"
+#line 2119 "cs.ATG"
Expression expr;
EqualityExpr(
-#line 2117 "cs.ATG"
+#line 2121 "cs.ATG"
ref outExpr);
while (la.kind == 27) {
lexer.NextToken();
UnaryExpr(
-#line 2117 "cs.ATG"
+#line 2121 "cs.ATG"
out expr);
EqualityExpr(
-#line 2117 "cs.ATG"
+#line 2121 "cs.ATG"
ref expr);
-#line 2117 "cs.ATG"
+#line 2121 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr);
}
}
void EqualityExpr(
-#line 2120 "cs.ATG"
+#line 2124 "cs.ATG"
ref Expression outExpr) {
-#line 2122 "cs.ATG"
+#line 2126 "cs.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
RelationalExpr(
-#line 2126 "cs.ATG"
+#line 2130 "cs.ATG"
ref outExpr);
while (la.kind == 32 || la.kind == 33) {
if (la.kind == 33) {
lexer.NextToken();
-#line 2129 "cs.ATG"
+#line 2133 "cs.ATG"
op = BinaryOperatorType.InEquality;
} else {
lexer.NextToken();
-#line 2130 "cs.ATG"
+#line 2134 "cs.ATG"
op = BinaryOperatorType.Equality;
}
UnaryExpr(
-#line 2132 "cs.ATG"
+#line 2136 "cs.ATG"
out expr);
RelationalExpr(
-#line 2132 "cs.ATG"
+#line 2136 "cs.ATG"
ref expr);
-#line 2132 "cs.ATG"
+#line 2136 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void RelationalExpr(
-#line 2136 "cs.ATG"
+#line 2140 "cs.ATG"
ref Expression outExpr) {
-#line 2138 "cs.ATG"
+#line 2142 "cs.ATG"
TypeReference type;
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
ShiftExpr(
-#line 2143 "cs.ATG"
+#line 2147 "cs.ATG"
ref outExpr);
while (StartOf(27)) {
if (StartOf(28)) {
if (la.kind == 22) {
lexer.NextToken();
-#line 2146 "cs.ATG"
+#line 2150 "cs.ATG"
op = BinaryOperatorType.LessThan;
} else if (la.kind == 21) {
lexer.NextToken();
-#line 2147 "cs.ATG"
+#line 2151 "cs.ATG"
op = BinaryOperatorType.GreaterThan;
} else if (la.kind == 35) {
lexer.NextToken();
-#line 2148 "cs.ATG"
+#line 2152 "cs.ATG"
op = BinaryOperatorType.LessThanOrEqual;
} else if (la.kind == 34) {
lexer.NextToken();
-#line 2149 "cs.ATG"
+#line 2153 "cs.ATG"
op = BinaryOperatorType.GreaterThanOrEqual;
} else SynErr(182);
UnaryExpr(
-#line 2151 "cs.ATG"
+#line 2155 "cs.ATG"
out expr);
ShiftExpr(
-#line 2151 "cs.ATG"
+#line 2155 "cs.ATG"
ref expr);
-#line 2151 "cs.ATG"
+#line 2155 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
} else {
if (la.kind == 83) {
lexer.NextToken();
-#line 2154 "cs.ATG"
+#line 2158 "cs.ATG"
op = BinaryOperatorType.TypeCheck;
} else if (la.kind == 48) {
lexer.NextToken();
-#line 2155 "cs.ATG"
+#line 2159 "cs.ATG"
op = BinaryOperatorType.AsCast;
} else SynErr(183);
Type(
-#line 2157 "cs.ATG"
+#line 2161 "cs.ATG"
out type);
-#line 2157 "cs.ATG"
+#line 2161 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, new TypeReferenceExpression(type));
}
}
}
void ShiftExpr(
-#line 2161 "cs.ATG"
+#line 2165 "cs.ATG"
ref Expression outExpr) {
-#line 2163 "cs.ATG"
+#line 2167 "cs.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
AdditiveExpr(
-#line 2167 "cs.ATG"
+#line 2171 "cs.ATG"
ref outExpr);
while (la.kind == 36 ||
-#line 2170 "cs.ATG"
+#line 2174 "cs.ATG"
IsShiftRight()) {
if (la.kind == 36) {
lexer.NextToken();
-#line 2169 "cs.ATG"
+#line 2173 "cs.ATG"
op = BinaryOperatorType.ShiftLeft;
} else {
Expect(21);
Expect(21);
-#line 2171 "cs.ATG"
+#line 2175 "cs.ATG"
op = BinaryOperatorType.ShiftRight;
}
UnaryExpr(
-#line 2174 "cs.ATG"
+#line 2178 "cs.ATG"
out expr);
AdditiveExpr(
-#line 2174 "cs.ATG"
+#line 2178 "cs.ATG"
ref expr);
-#line 2174 "cs.ATG"
+#line 2178 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void AdditiveExpr(
-#line 2178 "cs.ATG"
+#line 2182 "cs.ATG"
ref Expression outExpr) {
-#line 2180 "cs.ATG"
+#line 2184 "cs.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
MultiplicativeExpr(
-#line 2184 "cs.ATG"
+#line 2188 "cs.ATG"
ref outExpr);
while (la.kind == 4 || la.kind == 5) {
if (la.kind == 4) {
lexer.NextToken();
-#line 2187 "cs.ATG"
+#line 2191 "cs.ATG"
op = BinaryOperatorType.Add;
} else {
lexer.NextToken();
-#line 2188 "cs.ATG"
+#line 2192 "cs.ATG"
op = BinaryOperatorType.Subtract;
}
UnaryExpr(
-#line 2190 "cs.ATG"
+#line 2194 "cs.ATG"
out expr);
MultiplicativeExpr(
-#line 2190 "cs.ATG"
+#line 2194 "cs.ATG"
ref expr);
-#line 2190 "cs.ATG"
+#line 2194 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void MultiplicativeExpr(
-#line 2194 "cs.ATG"
+#line 2198 "cs.ATG"
ref Expression outExpr) {
-#line 2196 "cs.ATG"
+#line 2200 "cs.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
@@ -5180,57 +5172,57 @@ ref Expression outExpr) {
if (la.kind == 6) {
lexer.NextToken();
-#line 2202 "cs.ATG"
+#line 2206 "cs.ATG"
op = BinaryOperatorType.Multiply;
} else if (la.kind == 7) {
lexer.NextToken();
-#line 2203 "cs.ATG"
+#line 2207 "cs.ATG"
op = BinaryOperatorType.Divide;
} else {
lexer.NextToken();
-#line 2204 "cs.ATG"
+#line 2208 "cs.ATG"
op = BinaryOperatorType.Modulus;
}
UnaryExpr(
-#line 2206 "cs.ATG"
+#line 2210 "cs.ATG"
out expr);
-#line 2206 "cs.ATG"
+#line 2210 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void TypeParameterConstraintsClauseBase(
-#line 2288 "cs.ATG"
+#line 2292 "cs.ATG"
out TypeReference type) {
-#line 2289 "cs.ATG"
+#line 2293 "cs.ATG"
TypeReference t; type = null;
if (la.kind == 107) {
lexer.NextToken();
-#line 2291 "cs.ATG"
+#line 2295 "cs.ATG"
type = new TypeReference("struct");
} else if (la.kind == 57) {
lexer.NextToken();
-#line 2292 "cs.ATG"
+#line 2296 "cs.ATG"
type = new TypeReference("struct");
} else if (la.kind == 87) {
lexer.NextToken();
Expect(19);
Expect(20);
-#line 2293 "cs.ATG"
+#line 2297 "cs.ATG"
type = new TypeReference("struct");
} else if (StartOf(8)) {
Type(
-#line 2294 "cs.ATG"
+#line 2298 "cs.ATG"
out t);
-#line 2294 "cs.ATG"
+#line 2298 "cs.ATG"
type = t;
} else SynErr(184);
}
diff --git a/src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG b/src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG
index 0556bf8ee2..7411b0029f 100644
--- a/src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG
+++ b/src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG
@@ -713,6 +713,7 @@ TypeDecl attributes>
templates = newType.Templates;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
+ newType.StartLocation = t.Location;
newType.Type = Types.Class;
.)
@@ -721,7 +722,7 @@ TypeDecl attributes>
/* .NET 2.0 */
[ TypeParameterList ]
- [ ClassBase (. newType.BaseTypes = names; .) ] (. newType.StartLocation = t.EndLocation; .)
+ [ ClassBase (. newType.BaseTypes = names; .) ]
/* .NET 2.0 */
{ IF (IdentIsWhere()) TypeParameterConstraintsClause }
@@ -733,6 +734,7 @@ TypeDecl attributes>
| /*--- struct declaration: */ (. m.Check(Modifier.StructsInterfacesEnumsDelegates); .)
( "struct" (. TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
templates = newType.Templates;
+ newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = Types.Struct;
@@ -742,7 +744,7 @@ TypeDecl attributes>
/* .NET 2.0 */
[ TypeParameterList ]
- [ StructInterfaces (. newType.BaseTypes = names; .) ] (. newType.StartLocation = t.EndLocation; .)
+ [ StructInterfaces (. newType.BaseTypes = names; .) ]
/* .NET 2.0 */
{ IF (IdentIsWhere()) TypeParameterConstraintsClause }
@@ -757,6 +759,7 @@ TypeDecl attributes>
templates = newType.Templates;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
+ newType.StartLocation = t.Location;
newType.Type = Types.Interface;
.)
ident (. newType.Name = t.val; .)
@@ -764,7 +767,7 @@ TypeDecl attributes>
/* .NET 2.0 */
[ TypeParameterList ]
- [ InterfaceBase (. newType.BaseTypes = names; .) ] (. newType.StartLocation = t.EndLocation; .)
+ [ InterfaceBase (. newType.BaseTypes = names; .) ]
/* .NET 2.0 */
{ IF (IdentIsWhere()) TypeParameterConstraintsClause }
@@ -777,11 +780,12 @@ TypeDecl attributes>
"enum" (. TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
+ newType.StartLocation = t.Location;
newType.Type = Types.Enum;
.)
ident (. newType.Name = t.val; .)
[ ":" IntegralType (. newType.BaseTypes.Add(new TypeReference(name)); .)
- ] (. newType.StartLocation = t.EndLocation; .)
+ ]
EnumBody
[ ";" ] (. newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs
index 020fe25453..dbe8169f80 100644
--- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs
+++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs
@@ -350,7 +350,7 @@ out u);
void GlobalAttributeSection() {
-#line 1813 "VBNET.ATG"
+#line 1811 "VBNET.ATG"
Point startPos = t.Location;
Expect(26);
if (la.kind == 48) {
@@ -359,20 +359,20 @@ out u);
lexer.NextToken();
} else SynErr(203);
-#line 1815 "VBNET.ATG"
+#line 1813 "VBNET.ATG"
string attributeTarget = t.val.ToLower();
List attributes = new List();
ASTAttribute attribute;
Expect(13);
Attribute(
-#line 1819 "VBNET.ATG"
+#line 1817 "VBNET.ATG"
out attribute);
-#line 1819 "VBNET.ATG"
+#line 1817 "VBNET.ATG"
attributes.Add(attribute);
while (
-#line 1820 "VBNET.ATG"
+#line 1818 "VBNET.ATG"
NotFinalComma()) {
if (la.kind == 12) {
lexer.NextToken();
@@ -384,10 +384,10 @@ NotFinalComma()) {
Expect(13);
}
Attribute(
-#line 1820 "VBNET.ATG"
+#line 1818 "VBNET.ATG"
out attribute);
-#line 1820 "VBNET.ATG"
+#line 1818 "VBNET.ATG"
attributes.Add(attribute);
}
if (la.kind == 12) {
@@ -396,7 +396,7 @@ out attribute);
Expect(25);
EndOfStmt();
-#line 1825 "VBNET.ATG"
+#line 1823 "VBNET.ATG"
AttributeSection section = new AttributeSection(attributeTarget, attributes);
section.StartLocation = startPos;
section.EndLocation = t.EndLocation;
@@ -527,30 +527,30 @@ out qualident);
}
void Qualident(
-#line 2537 "VBNET.ATG"
+#line 2535 "VBNET.ATG"
out string qualident) {
-#line 2539 "VBNET.ATG"
+#line 2537 "VBNET.ATG"
string name;
qualidentBuilder.Length = 0;
Identifier();
-#line 2543 "VBNET.ATG"
+#line 2541 "VBNET.ATG"
qualidentBuilder.Append(t.val);
while (
-#line 2544 "VBNET.ATG"
+#line 2542 "VBNET.ATG"
DotAndIdentOrKw()) {
Expect(10);
IdentifierOrKeyword(
-#line 2544 "VBNET.ATG"
+#line 2542 "VBNET.ATG"
out name);
-#line 2544 "VBNET.ATG"
+#line 2542 "VBNET.ATG"
qualidentBuilder.Append('.'); qualidentBuilder.Append(name);
}
-#line 2546 "VBNET.ATG"
+#line 2544 "VBNET.ATG"
qualident = qualidentBuilder.ToString();
}
@@ -564,35 +564,35 @@ out name);
}
void AttributeSection(
-#line 1883 "VBNET.ATG"
+#line 1881 "VBNET.ATG"
out AttributeSection section) {
-#line 1885 "VBNET.ATG"
+#line 1883 "VBNET.ATG"
string attributeTarget = "";List attributes = new List();
ASTAttribute attribute;
Expect(26);
-#line 1889 "VBNET.ATG"
+#line 1887 "VBNET.ATG"
Point startPos = t.Location;
if (
-#line 1890 "VBNET.ATG"
+#line 1888 "VBNET.ATG"
IsLocalAttrTarget()) {
if (la.kind == 92) {
lexer.NextToken();
-#line 1891 "VBNET.ATG"
+#line 1889 "VBNET.ATG"
attributeTarget = "event";
} else if (la.kind == 154) {
lexer.NextToken();
-#line 1892 "VBNET.ATG"
+#line 1890 "VBNET.ATG"
attributeTarget = "return";
} else {
Identifier();
-#line 1895 "VBNET.ATG"
+#line 1893 "VBNET.ATG"
string val = t.val.ToLower();
if (val != "field" || val != "method" ||
val != "module" || val != "param" ||
@@ -605,20 +605,20 @@ IsLocalAttrTarget()) {
Expect(13);
}
Attribute(
-#line 1905 "VBNET.ATG"
+#line 1903 "VBNET.ATG"
out attribute);
-#line 1905 "VBNET.ATG"
+#line 1903 "VBNET.ATG"
attributes.Add(attribute);
while (
-#line 1906 "VBNET.ATG"
+#line 1904 "VBNET.ATG"
NotFinalComma()) {
Expect(12);
Attribute(
-#line 1906 "VBNET.ATG"
+#line 1904 "VBNET.ATG"
out attribute);
-#line 1906 "VBNET.ATG"
+#line 1904 "VBNET.ATG"
attributes.Add(attribute);
}
if (la.kind == 12) {
@@ -626,7 +626,7 @@ out attribute);
}
Expect(25);
-#line 1910 "VBNET.ATG"
+#line 1908 "VBNET.ATG"
section = new AttributeSection(attributeTarget, attributes);
section.StartLocation = startPos;
section.EndLocation = t.EndLocation;
@@ -634,62 +634,62 @@ out attribute);
}
void TypeModifier(
-#line 2746 "VBNET.ATG"
+#line 2744 "VBNET.ATG"
Modifiers m) {
switch (la.kind) {
case 148: {
lexer.NextToken();
-#line 2747 "VBNET.ATG"
+#line 2745 "VBNET.ATG"
m.Add(Modifier.Public);
break;
}
case 147: {
lexer.NextToken();
-#line 2748 "VBNET.ATG"
+#line 2746 "VBNET.ATG"
m.Add(Modifier.Protected);
break;
}
case 98: {
lexer.NextToken();
-#line 2749 "VBNET.ATG"
+#line 2747 "VBNET.ATG"
m.Add(Modifier.Internal);
break;
}
case 145: {
lexer.NextToken();
-#line 2750 "VBNET.ATG"
+#line 2748 "VBNET.ATG"
m.Add(Modifier.Private);
break;
}
case 158: {
lexer.NextToken();
-#line 2751 "VBNET.ATG"
+#line 2749 "VBNET.ATG"
m.Add(Modifier.Static);
break;
}
case 157: {
lexer.NextToken();
-#line 2752 "VBNET.ATG"
+#line 2750 "VBNET.ATG"
m.Add(Modifier.New);
break;
}
case 121: {
lexer.NextToken();
-#line 2753 "VBNET.ATG"
+#line 2751 "VBNET.ATG"
m.Add(Modifier.Abstract);
break;
}
case 130: {
lexer.NextToken();
-#line 2754 "VBNET.ATG"
+#line 2752 "VBNET.ATG"
m.Add(Modifier.Sealed);
break;
}
@@ -721,7 +721,8 @@ Modifiers m, List attributes) {
#line 599 "VBNET.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
- compilationUnit.AddChild(newType);
+ newType.StartLocation = t.Location;
+ compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = Types.Class;
@@ -729,7 +730,7 @@ Modifiers m, List attributes) {
Identifier();
#line 606 "VBNET.ATG"
- newType.Name = t.val; newType.StartLocation = t.EndLocation;
+ newType.Name = t.val;
TypeParameterList(
#line 607 "VBNET.ATG"
newType.Templates);
@@ -773,14 +774,13 @@ newType);
Identifier();
#line 624 "VBNET.ATG"
- newType.Name = t.val; newType.StartLocation = t.EndLocation;
+ newType.Name = t.val;
Expect(1);
ModuleBody(
#line 626 "VBNET.ATG"
newType);
#line 628 "VBNET.ATG"
- newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
break;
@@ -788,7 +788,7 @@ newType);
case 166: {
lexer.NextToken();
-#line 633 "VBNET.ATG"
+#line 632 "VBNET.ATG"
m.Check(Modifier.VBStructures);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
compilationUnit.AddChild(newType);
@@ -798,26 +798,25 @@ newType);
Identifier();
-#line 640 "VBNET.ATG"
- newType.Name = t.val; newType.StartLocation = t.EndLocation;
+#line 639 "VBNET.ATG"
+ newType.Name = t.val;
TypeParameterList(
-#line 641 "VBNET.ATG"
+#line 640 "VBNET.ATG"
newType.Templates);
Expect(1);
while (la.kind == 106) {
TypeImplementsClause(
-#line 642 "VBNET.ATG"
+#line 641 "VBNET.ATG"
out baseInterfaces);
-#line 642 "VBNET.ATG"
+#line 641 "VBNET.ATG"
newType.BaseTypes.AddRange(baseInterfaces);
}
StructureBody(
-#line 643 "VBNET.ATG"
+#line 642 "VBNET.ATG"
newType);
-#line 645 "VBNET.ATG"
- newType.EndLocation = t.Location;
+#line 644 "VBNET.ATG"
compilationUnit.BlockEnd();
break;
@@ -825,9 +824,10 @@ newType);
case 89: {
lexer.NextToken();
-#line 651 "VBNET.ATG"
+#line 649 "VBNET.ATG"
m.Check(Modifier.VBEnums);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
+ newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
@@ -836,24 +836,23 @@ newType);
Identifier();
-#line 659 "VBNET.ATG"
- newType.Name = t.val; newType.StartLocation = t.EndLocation;
+#line 658 "VBNET.ATG"
+ newType.Name = t.val;
if (la.kind == 47) {
lexer.NextToken();
PrimitiveTypeName(
-#line 660 "VBNET.ATG"
+#line 659 "VBNET.ATG"
out name);
-#line 660 "VBNET.ATG"
+#line 659 "VBNET.ATG"
newType.BaseTypes.Add(new TypeReference(name));
}
Expect(1);
EnumBody(
-#line 662 "VBNET.ATG"
+#line 661 "VBNET.ATG"
newType);
-#line 664 "VBNET.ATG"
- newType.EndLocation = t.Location;
+#line 663 "VBNET.ATG"
compilationUnit.BlockEnd();
break;
@@ -861,35 +860,35 @@ newType);
case 111: {
lexer.NextToken();
-#line 670 "VBNET.ATG"
+#line 668 "VBNET.ATG"
m.Check(Modifier.VBInterfacs);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
+ newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = Types.Interface;
Identifier();
-#line 676 "VBNET.ATG"
- newType.Name = t.val; newType.StartLocation = t.EndLocation;
+#line 675 "VBNET.ATG"
+ newType.Name = t.val;
TypeParameterList(
-#line 677 "VBNET.ATG"
+#line 676 "VBNET.ATG"
newType.Templates);
EndOfStmt();
while (la.kind == 109) {
InterfaceBase(
-#line 678 "VBNET.ATG"
+#line 677 "VBNET.ATG"
out baseInterfaces);
-#line 678 "VBNET.ATG"
+#line 677 "VBNET.ATG"
newType.BaseTypes.AddRange(baseInterfaces);
}
InterfaceBody(
-#line 679 "VBNET.ATG"
+#line 678 "VBNET.ATG"
newType);
-#line 681 "VBNET.ATG"
- newType.EndLocation = t.Location;
+#line 680 "VBNET.ATG"
compilationUnit.BlockEnd();
break;
@@ -897,7 +896,7 @@ newType);
case 79: {
lexer.NextToken();
-#line 687 "VBNET.ATG"
+#line 685 "VBNET.ATG"
m.Check(Modifier.VBDelegates);
DelegateDeclaration delegateDeclr = new DelegateDeclaration(m.Modifier, attributes);
delegateDeclr.ReturnType = new TypeReference("", "System.Void");
@@ -908,63 +907,63 @@ newType);
lexer.NextToken();
Identifier();
-#line 694 "VBNET.ATG"
+#line 692 "VBNET.ATG"
delegateDeclr.Name = t.val;
TypeParameterList(
-#line 695 "VBNET.ATG"
+#line 693 "VBNET.ATG"
delegateDeclr.Templates);
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 696 "VBNET.ATG"
+#line 694 "VBNET.ATG"
p);
}
Expect(24);
-#line 696 "VBNET.ATG"
+#line 694 "VBNET.ATG"
delegateDeclr.Parameters = p;
}
} else if (la.kind == 99) {
lexer.NextToken();
Identifier();
-#line 698 "VBNET.ATG"
+#line 696 "VBNET.ATG"
delegateDeclr.Name = t.val;
TypeParameterList(
-#line 699 "VBNET.ATG"
+#line 697 "VBNET.ATG"
delegateDeclr.Templates);
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 700 "VBNET.ATG"
+#line 698 "VBNET.ATG"
p);
}
Expect(24);
-#line 700 "VBNET.ATG"
+#line 698 "VBNET.ATG"
delegateDeclr.Parameters = p;
}
if (la.kind == 47) {
lexer.NextToken();
-#line 701 "VBNET.ATG"
+#line 699 "VBNET.ATG"
TypeReference type;
TypeName(
-#line 701 "VBNET.ATG"
+#line 699 "VBNET.ATG"
out type);
-#line 701 "VBNET.ATG"
+#line 699 "VBNET.ATG"
delegateDeclr.ReturnType = type;
}
} else SynErr(210);
-#line 703 "VBNET.ATG"
+#line 701 "VBNET.ATG"
delegateDeclr.EndLocation = t.EndLocation;
Expect(1);
-#line 706 "VBNET.ATG"
+#line 704 "VBNET.ATG"
compilationUnit.AddChild(delegateDeclr);
break;
@@ -1057,19 +1056,19 @@ out constraint);
}
void TypeName(
-#line 1733 "VBNET.ATG"
+#line 1731 "VBNET.ATG"
out TypeReference typeref) {
-#line 1734 "VBNET.ATG"
+#line 1732 "VBNET.ATG"
ArrayList rank = null; typeref = null;
NonArrayTypeName(
-#line 1736 "VBNET.ATG"
+#line 1734 "VBNET.ATG"
out typeref);
ArrayTypeModifiers(
-#line 1737 "VBNET.ATG"
+#line 1735 "VBNET.ATG"
out rank);
-#line 1739 "VBNET.ATG"
+#line 1737 "VBNET.ATG"
if (rank != null && typeref != null) {
typeref.RankSpecifier = (int[])rank.ToArray(typeof(int));
}
@@ -1077,267 +1076,267 @@ out rank);
}
void ClassBaseType(
-#line 883 "VBNET.ATG"
+#line 881 "VBNET.ATG"
out TypeReference typeRef) {
-#line 885 "VBNET.ATG"
+#line 883 "VBNET.ATG"
typeRef = null;
Expect(109);
TypeName(
-#line 888 "VBNET.ATG"
+#line 886 "VBNET.ATG"
out typeRef);
EndOfStmt();
}
void TypeImplementsClause(
-#line 1386 "VBNET.ATG"
+#line 1384 "VBNET.ATG"
out List baseInterfaces) {
-#line 1388 "VBNET.ATG"
+#line 1386 "VBNET.ATG"
baseInterfaces = new List();
TypeReference type = null;
Expect(106);
TypeName(
-#line 1391 "VBNET.ATG"
+#line 1389 "VBNET.ATG"
out type);
-#line 1393 "VBNET.ATG"
+#line 1391 "VBNET.ATG"
baseInterfaces.Add(type);
while (la.kind == 12) {
lexer.NextToken();
TypeName(
-#line 1396 "VBNET.ATG"
+#line 1394 "VBNET.ATG"
out type);
-#line 1397 "VBNET.ATG"
+#line 1395 "VBNET.ATG"
baseInterfaces.Add(type);
}
EndOfStmt();
}
void ClassBody(
-#line 716 "VBNET.ATG"
+#line 714 "VBNET.ATG"
TypeDeclaration newType) {
-#line 717 "VBNET.ATG"
+#line 715 "VBNET.ATG"
AttributeSection section;
while (StartOf(6)) {
-#line 719 "VBNET.ATG"
+#line 717 "VBNET.ATG"
List attributes = new List();
Modifiers m = new Modifiers();
while (la.kind == 26) {
AttributeSection(
-#line 722 "VBNET.ATG"
+#line 720 "VBNET.ATG"
out section);
-#line 722 "VBNET.ATG"
+#line 720 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(7)) {
MemberModifier(
-#line 723 "VBNET.ATG"
+#line 721 "VBNET.ATG"
m);
}
ClassMemberDecl(
-#line 724 "VBNET.ATG"
+#line 722 "VBNET.ATG"
m, attributes);
}
Expect(87);
Expect(66);
-#line 726 "VBNET.ATG"
+#line 724 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
Expect(1);
}
void ModuleBody(
-#line 745 "VBNET.ATG"
+#line 743 "VBNET.ATG"
TypeDeclaration newType) {
-#line 746 "VBNET.ATG"
+#line 744 "VBNET.ATG"
AttributeSection section;
while (StartOf(6)) {
-#line 748 "VBNET.ATG"
+#line 746 "VBNET.ATG"
List attributes = new List();
Modifiers m = new Modifiers();
while (la.kind == 26) {
AttributeSection(
-#line 751 "VBNET.ATG"
+#line 749 "VBNET.ATG"
out section);
-#line 751 "VBNET.ATG"
+#line 749 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(7)) {
MemberModifier(
-#line 752 "VBNET.ATG"
+#line 750 "VBNET.ATG"
m);
}
ClassMemberDecl(
-#line 753 "VBNET.ATG"
+#line 751 "VBNET.ATG"
m, attributes);
}
Expect(87);
Expect(120);
-#line 755 "VBNET.ATG"
+#line 753 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
Expect(1);
}
void StructureBody(
-#line 730 "VBNET.ATG"
+#line 728 "VBNET.ATG"
TypeDeclaration newType) {
-#line 731 "VBNET.ATG"
+#line 729 "VBNET.ATG"
AttributeSection section;
while (StartOf(6)) {
-#line 733 "VBNET.ATG"
+#line 731 "VBNET.ATG"
List attributes = new List();
Modifiers m = new Modifiers();
while (la.kind == 26) {
AttributeSection(
-#line 736 "VBNET.ATG"
+#line 734 "VBNET.ATG"
out section);
-#line 736 "VBNET.ATG"
+#line 734 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(7)) {
MemberModifier(
-#line 737 "VBNET.ATG"
+#line 735 "VBNET.ATG"
m);
}
StructureMemberDecl(
-#line 738 "VBNET.ATG"
+#line 736 "VBNET.ATG"
m, attributes);
}
Expect(87);
Expect(166);
-#line 740 "VBNET.ATG"
+#line 738 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
Expect(1);
}
void PrimitiveTypeName(
-#line 2719 "VBNET.ATG"
+#line 2717 "VBNET.ATG"
out string type) {
-#line 2720 "VBNET.ATG"
+#line 2718 "VBNET.ATG"
type = String.Empty;
switch (la.kind) {
case 51: {
lexer.NextToken();
-#line 2721 "VBNET.ATG"
+#line 2719 "VBNET.ATG"
type = "Boolean";
break;
}
case 75: {
lexer.NextToken();
-#line 2722 "VBNET.ATG"
+#line 2720 "VBNET.ATG"
type = "Date";
break;
}
case 64: {
lexer.NextToken();
-#line 2723 "VBNET.ATG"
+#line 2721 "VBNET.ATG"
type = "Char";
break;
}
case 165: {
lexer.NextToken();
-#line 2724 "VBNET.ATG"
+#line 2722 "VBNET.ATG"
type = "String";
break;
}
case 76: {
lexer.NextToken();
-#line 2725 "VBNET.ATG"
+#line 2723 "VBNET.ATG"
type = "Decimal";
break;
}
case 53: {
lexer.NextToken();
-#line 2726 "VBNET.ATG"
+#line 2724 "VBNET.ATG"
type = "Byte";
break;
}
case 159: {
lexer.NextToken();
-#line 2727 "VBNET.ATG"
+#line 2725 "VBNET.ATG"
type = "Short";
break;
}
case 110: {
lexer.NextToken();
-#line 2728 "VBNET.ATG"
+#line 2726 "VBNET.ATG"
type = "Integer";
break;
}
case 116: {
lexer.NextToken();
-#line 2729 "VBNET.ATG"
+#line 2727 "VBNET.ATG"
type = "Long";
break;
}
case 160: {
lexer.NextToken();
-#line 2730 "VBNET.ATG"
+#line 2728 "VBNET.ATG"
type = "Single";
break;
}
case 83: {
lexer.NextToken();
-#line 2731 "VBNET.ATG"
+#line 2729 "VBNET.ATG"
type = "Double";
break;
}
case 191: {
lexer.NextToken();
-#line 2732 "VBNET.ATG"
+#line 2730 "VBNET.ATG"
type = "UInteger";
break;
}
case 192: {
lexer.NextToken();
-#line 2733 "VBNET.ATG"
+#line 2731 "VBNET.ATG"
type = "ULong";
break;
}
case 193: {
lexer.NextToken();
-#line 2734 "VBNET.ATG"
+#line 2732 "VBNET.ATG"
type = "UShort";
break;
}
case 190: {
lexer.NextToken();
-#line 2735 "VBNET.ATG"
+#line 2733 "VBNET.ATG"
type = "SByte";
break;
}
@@ -1346,56 +1345,56 @@ out string type) {
}
void EnumBody(
-#line 759 "VBNET.ATG"
+#line 757 "VBNET.ATG"
TypeDeclaration newType) {
-#line 760 "VBNET.ATG"
+#line 758 "VBNET.ATG"
FieldDeclaration f;
while (StartOf(8)) {
EnumMemberDecl(
-#line 762 "VBNET.ATG"
+#line 760 "VBNET.ATG"
out f);
-#line 762 "VBNET.ATG"
+#line 760 "VBNET.ATG"
compilationUnit.AddChild(f);
}
Expect(87);
Expect(89);
-#line 764 "VBNET.ATG"
+#line 762 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
Expect(1);
}
void InterfaceBase(
-#line 1371 "VBNET.ATG"
+#line 1369 "VBNET.ATG"
out List bases) {
-#line 1373 "VBNET.ATG"
+#line 1371 "VBNET.ATG"
TypeReference type;
bases = new List();
Expect(109);
TypeName(
-#line 1377 "VBNET.ATG"
+#line 1375 "VBNET.ATG"
out type);
-#line 1377 "VBNET.ATG"
+#line 1375 "VBNET.ATG"
bases.Add(type);
while (la.kind == 12) {
lexer.NextToken();
TypeName(
-#line 1380 "VBNET.ATG"
+#line 1378 "VBNET.ATG"
out type);
-#line 1380 "VBNET.ATG"
+#line 1378 "VBNET.ATG"
bases.Add(type);
}
Expect(1);
}
void InterfaceBody(
-#line 768 "VBNET.ATG"
+#line 766 "VBNET.ATG"
TypeDeclaration newType) {
while (StartOf(9)) {
InterfaceMemberDecl();
@@ -1403,33 +1402,33 @@ TypeDeclaration newType) {
Expect(87);
Expect(111);
-#line 770 "VBNET.ATG"
+#line 768 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
Expect(1);
}
void FormalParameterList(
-#line 1917 "VBNET.ATG"
+#line 1915 "VBNET.ATG"
List parameter) {
-#line 1919 "VBNET.ATG"
+#line 1917 "VBNET.ATG"
ParameterDeclarationExpression p;
AttributeSection section;
List attributes = new List();
while (la.kind == 26) {
AttributeSection(
-#line 1923 "VBNET.ATG"
+#line 1921 "VBNET.ATG"
out section);
-#line 1923 "VBNET.ATG"
+#line 1921 "VBNET.ATG"
attributes.Add(section);
}
FormalParameter(
-#line 1925 "VBNET.ATG"
+#line 1923 "VBNET.ATG"
out p);
-#line 1927 "VBNET.ATG"
+#line 1925 "VBNET.ATG"
bool paramsFound = false;
p.Attributes = attributes;
parameter.Add(p);
@@ -1437,152 +1436,152 @@ out p);
while (la.kind == 12) {
lexer.NextToken();
-#line 1932 "VBNET.ATG"
+#line 1930 "VBNET.ATG"
if (paramsFound) Error("params array must be at end of parameter list");
while (la.kind == 26) {
AttributeSection(
-#line 1933 "VBNET.ATG"
+#line 1931 "VBNET.ATG"
out section);
-#line 1933 "VBNET.ATG"
+#line 1931 "VBNET.ATG"
attributes.Add(section);
}
FormalParameter(
-#line 1935 "VBNET.ATG"
+#line 1933 "VBNET.ATG"
out p);
-#line 1935 "VBNET.ATG"
+#line 1933 "VBNET.ATG"
p.Attributes = attributes; parameter.Add(p);
}
}
void MemberModifier(
-#line 2757 "VBNET.ATG"
+#line 2755 "VBNET.ATG"
Modifiers m) {
switch (la.kind) {
case 121: {
lexer.NextToken();
-#line 2758 "VBNET.ATG"
+#line 2756 "VBNET.ATG"
m.Add(Modifier.Abstract);
break;
}
case 78: {
lexer.NextToken();
-#line 2759 "VBNET.ATG"
+#line 2757 "VBNET.ATG"
m.Add(Modifier.Default);
break;
}
case 98: {
lexer.NextToken();
-#line 2760 "VBNET.ATG"
+#line 2758 "VBNET.ATG"
m.Add(Modifier.Internal);
break;
}
case 157: {
lexer.NextToken();
-#line 2761 "VBNET.ATG"
+#line 2759 "VBNET.ATG"
m.Add(Modifier.New);
break;
}
case 142: {
lexer.NextToken();
-#line 2762 "VBNET.ATG"
+#line 2760 "VBNET.ATG"
m.Add(Modifier.Override);
break;
}
case 122: {
lexer.NextToken();
-#line 2763 "VBNET.ATG"
+#line 2761 "VBNET.ATG"
m.Add(Modifier.Abstract);
break;
}
case 145: {
lexer.NextToken();
-#line 2764 "VBNET.ATG"
+#line 2762 "VBNET.ATG"
m.Add(Modifier.Private);
break;
}
case 147: {
lexer.NextToken();
-#line 2765 "VBNET.ATG"
+#line 2763 "VBNET.ATG"
m.Add(Modifier.Protected);
break;
}
case 148: {
lexer.NextToken();
-#line 2766 "VBNET.ATG"
+#line 2764 "VBNET.ATG"
m.Add(Modifier.Public);
break;
}
case 130: {
lexer.NextToken();
-#line 2767 "VBNET.ATG"
+#line 2765 "VBNET.ATG"
m.Add(Modifier.Sealed);
break;
}
case 131: {
lexer.NextToken();
-#line 2768 "VBNET.ATG"
+#line 2766 "VBNET.ATG"
m.Add(Modifier.Sealed);
break;
}
case 158: {
lexer.NextToken();
-#line 2769 "VBNET.ATG"
+#line 2767 "VBNET.ATG"
m.Add(Modifier.Static);
break;
}
case 140: {
lexer.NextToken();
-#line 2770 "VBNET.ATG"
+#line 2768 "VBNET.ATG"
m.Add(Modifier.Virtual);
break;
}
case 139: {
lexer.NextToken();
-#line 2771 "VBNET.ATG"
+#line 2769 "VBNET.ATG"
m.Add(Modifier.Overloads);
break;
}
case 150: {
lexer.NextToken();
-#line 2772 "VBNET.ATG"
+#line 2770 "VBNET.ATG"
break;
}
case 184: {
lexer.NextToken();
-#line 2773 "VBNET.ATG"
+#line 2771 "VBNET.ATG"
break;
}
case 183: {
lexer.NextToken();
-#line 2774 "VBNET.ATG"
+#line 2772 "VBNET.ATG"
m.Add(Modifier.WithEvents);
break;
}
case 80: {
lexer.NextToken();
-#line 2775 "VBNET.ATG"
+#line 2773 "VBNET.ATG"
m.Add(Modifier.Dim);
break;
}
@@ -1591,18 +1590,18 @@ Modifiers m) {
}
void ClassMemberDecl(
-#line 879 "VBNET.ATG"
+#line 877 "VBNET.ATG"
Modifiers m, List attributes) {
StructureMemberDecl(
-#line 880 "VBNET.ATG"
+#line 878 "VBNET.ATG"
m, attributes);
}
void StructureMemberDecl(
-#line 893 "VBNET.ATG"
+#line 891 "VBNET.ATG"
Modifiers m, List attributes) {
-#line 895 "VBNET.ATG"
+#line 893 "VBNET.ATG"
TypeReference type = null;
List p = new List();
Statement stmt = null;
@@ -1612,36 +1611,36 @@ Modifiers m, List attributes) {
switch (la.kind) {
case 66: case 79: case 89: case 111: case 120: case 166: case 199: {
NonModuleDeclaration(
-#line 901 "VBNET.ATG"
+#line 899 "VBNET.ATG"
m, attributes);
break;
}
case 167: {
lexer.NextToken();
-#line 905 "VBNET.ATG"
+#line 903 "VBNET.ATG"
Point startPos = t.Location;
if (StartOf(10)) {
-#line 909 "VBNET.ATG"
+#line 907 "VBNET.ATG"
string name = String.Empty;
MethodDeclaration methodDeclaration; ArrayList handlesClause = null; ArrayList implementsClause = null;
Identifier();
-#line 914 "VBNET.ATG"
+#line 912 "VBNET.ATG"
name = t.val;
m.Check(Modifier.VBMethods);
TypeParameterList(
-#line 917 "VBNET.ATG"
+#line 915 "VBNET.ATG"
templates);
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 918 "VBNET.ATG"
+#line 916 "VBNET.ATG"
p);
}
Expect(24);
@@ -1649,23 +1648,23 @@ p);
if (la.kind == 104 || la.kind == 106) {
if (la.kind == 106) {
ImplementsClause(
-#line 921 "VBNET.ATG"
+#line 919 "VBNET.ATG"
out implementsClause);
} else {
HandlesClause(
-#line 923 "VBNET.ATG"
+#line 921 "VBNET.ATG"
out handlesClause);
}
}
-#line 926 "VBNET.ATG"
+#line 924 "VBNET.ATG"
Point endLocation = t.EndLocation;
Expect(1);
if (
-#line 930 "VBNET.ATG"
+#line 928 "VBNET.ATG"
IsMustOverride(m)) {
-#line 932 "VBNET.ATG"
+#line 930 "VBNET.ATG"
methodDeclaration = new MethodDeclaration(name, m.Modifier, null, p, attributes);
methodDeclaration.StartLocation = startPos;
methodDeclaration.EndLocation = endLocation;
@@ -1679,7 +1678,7 @@ IsMustOverride(m)) {
} else if (StartOf(11)) {
-#line 945 "VBNET.ATG"
+#line 943 "VBNET.ATG"
methodDeclaration = new MethodDeclaration(name, m.Modifier, null, p, attributes);
methodDeclaration.StartLocation = startPos;
methodDeclaration.EndLocation = endLocation;
@@ -1693,17 +1692,17 @@ IsMustOverride(m)) {
compilationUnit.BlockStart(methodDeclaration);
Block(
-#line 957 "VBNET.ATG"
+#line 955 "VBNET.ATG"
out stmt);
-#line 959 "VBNET.ATG"
+#line 957 "VBNET.ATG"
compilationUnit.BlockEnd();
methodDeclaration.Body = (BlockStatement)stmt;
Expect(87);
Expect(167);
-#line 962 "VBNET.ATG"
+#line 960 "VBNET.ATG"
methodDeclaration.Body.EndLocation = t.EndLocation;
Expect(1);
} else SynErr(215);
@@ -1713,29 +1712,29 @@ out stmt);
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 965 "VBNET.ATG"
+#line 963 "VBNET.ATG"
p);
}
Expect(24);
}
-#line 966 "VBNET.ATG"
+#line 964 "VBNET.ATG"
m.Check(Modifier.Constructors);
-#line 967 "VBNET.ATG"
+#line 965 "VBNET.ATG"
Point constructorEndLocation = t.EndLocation;
Expect(1);
Block(
-#line 969 "VBNET.ATG"
+#line 967 "VBNET.ATG"
out stmt);
Expect(87);
Expect(167);
-#line 970 "VBNET.ATG"
+#line 968 "VBNET.ATG"
Point endLocation = t.EndLocation;
Expect(1);
-#line 972 "VBNET.ATG"
+#line 970 "VBNET.ATG"
ConstructorDeclaration cd = new ConstructorDeclaration("New", m.Modifier, p, attributes);
cd.StartLocation = startPos;
cd.EndLocation = constructorEndLocation;
@@ -1749,7 +1748,7 @@ out stmt);
case 99: {
lexer.NextToken();
-#line 984 "VBNET.ATG"
+#line 982 "VBNET.ATG"
m.Check(Modifier.VBMethods);
string name = String.Empty;
Point startPos = t.Location;
@@ -1758,16 +1757,16 @@ out stmt);
Identifier();
-#line 990 "VBNET.ATG"
+#line 988 "VBNET.ATG"
name = t.val;
TypeParameterList(
-#line 991 "VBNET.ATG"
+#line 989 "VBNET.ATG"
templates);
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 992 "VBNET.ATG"
+#line 990 "VBNET.ATG"
p);
}
Expect(24);
@@ -1776,15 +1775,15 @@ p);
lexer.NextToken();
while (la.kind == 26) {
AttributeSection(
-#line 993 "VBNET.ATG"
+#line 991 "VBNET.ATG"
out returnTypeAttributeSection);
}
TypeName(
-#line 993 "VBNET.ATG"
+#line 991 "VBNET.ATG"
out type);
}
-#line 995 "VBNET.ATG"
+#line 993 "VBNET.ATG"
if(type == null) {
type = new TypeReference("System.Object");
}
@@ -1792,20 +1791,20 @@ out type);
if (la.kind == 104 || la.kind == 106) {
if (la.kind == 106) {
ImplementsClause(
-#line 1001 "VBNET.ATG"
+#line 999 "VBNET.ATG"
out implementsClause);
} else {
HandlesClause(
-#line 1003 "VBNET.ATG"
+#line 1001 "VBNET.ATG"
out handlesClause);
}
}
Expect(1);
if (
-#line 1009 "VBNET.ATG"
+#line 1007 "VBNET.ATG"
IsMustOverride(m)) {
-#line 1011 "VBNET.ATG"
+#line 1009 "VBNET.ATG"
methodDeclaration = new MethodDeclaration(name, m.Modifier, type, p, attributes);
methodDeclaration.StartLocation = startPos;
methodDeclaration.EndLocation = t.EndLocation;
@@ -1818,7 +1817,7 @@ IsMustOverride(m)) {
} else if (StartOf(11)) {
-#line 1023 "VBNET.ATG"
+#line 1021 "VBNET.ATG"
methodDeclaration = new MethodDeclaration(name, m.Modifier, type, p, attributes);
methodDeclaration.StartLocation = startPos;
methodDeclaration.EndLocation = t.EndLocation;
@@ -1832,17 +1831,17 @@ IsMustOverride(m)) {
compilationUnit.BlockStart(methodDeclaration);
Block(
-#line 1035 "VBNET.ATG"
+#line 1033 "VBNET.ATG"
out stmt);
-#line 1037 "VBNET.ATG"
+#line 1035 "VBNET.ATG"
compilationUnit.BlockEnd();
methodDeclaration.Body = (BlockStatement)stmt;
Expect(87);
Expect(99);
-#line 1042 "VBNET.ATG"
+#line 1040 "VBNET.ATG"
methodDeclaration.Body.StartLocation = methodDeclaration.EndLocation;
methodDeclaration.Body.EndLocation = t.EndLocation;
@@ -1853,7 +1852,7 @@ out stmt);
case 77: {
lexer.NextToken();
-#line 1051 "VBNET.ATG"
+#line 1049 "VBNET.ATG"
m.Check(Modifier.VBExternalMethods);
Point startPos = t.Location;
CharsetModifier charsetModifer = CharsetModifier.None;
@@ -1863,39 +1862,39 @@ out stmt);
if (StartOf(12)) {
Charset(
-#line 1058 "VBNET.ATG"
+#line 1056 "VBNET.ATG"
out charsetModifer);
}
if (la.kind == 167) {
lexer.NextToken();
Identifier();
-#line 1061 "VBNET.ATG"
+#line 1059 "VBNET.ATG"
name = t.val;
Expect(114);
Expect(3);
-#line 1062 "VBNET.ATG"
+#line 1060 "VBNET.ATG"
library = t.val.ToString();
if (la.kind == 43) {
lexer.NextToken();
Expect(3);
-#line 1063 "VBNET.ATG"
+#line 1061 "VBNET.ATG"
alias = t.val.ToString();
}
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 1064 "VBNET.ATG"
+#line 1062 "VBNET.ATG"
p);
}
Expect(24);
}
Expect(1);
-#line 1067 "VBNET.ATG"
+#line 1065 "VBNET.ATG"
DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, null, p, attributes, library, alias, charsetModifer);
declareDeclaration.StartLocation = startPos;
declareDeclaration.EndLocation = t.EndLocation;
@@ -1905,25 +1904,25 @@ p);
lexer.NextToken();
Identifier();
-#line 1074 "VBNET.ATG"
+#line 1072 "VBNET.ATG"
name = t.val;
Expect(114);
Expect(3);
-#line 1075 "VBNET.ATG"
+#line 1073 "VBNET.ATG"
library = t.val;
if (la.kind == 43) {
lexer.NextToken();
Expect(3);
-#line 1076 "VBNET.ATG"
+#line 1074 "VBNET.ATG"
alias = t.val;
}
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 1077 "VBNET.ATG"
+#line 1075 "VBNET.ATG"
p);
}
Expect(24);
@@ -1931,12 +1930,12 @@ p);
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 1078 "VBNET.ATG"
+#line 1076 "VBNET.ATG"
out type);
}
Expect(1);
-#line 1081 "VBNET.ATG"
+#line 1079 "VBNET.ATG"
DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, type, p, attributes, library, alias, charsetModifer);
declareDeclaration.StartLocation = startPos;
declareDeclaration.EndLocation = t.EndLocation;
@@ -1948,7 +1947,7 @@ out type);
case 92: {
lexer.NextToken();
-#line 1091 "VBNET.ATG"
+#line 1089 "VBNET.ATG"
m.Check(Modifier.VBEvents);
Point startPos = t.Location;
EventDeclaration eventDeclaration;
@@ -1956,19 +1955,19 @@ out type);
Identifier();
-#line 1096 "VBNET.ATG"
+#line 1094 "VBNET.ATG"
name= t.val;
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 1098 "VBNET.ATG"
+#line 1096 "VBNET.ATG"
out type);
} else if (la.kind == 1 || la.kind == 23 || la.kind == 106) {
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 1100 "VBNET.ATG"
+#line 1098 "VBNET.ATG"
p);
}
Expect(24);
@@ -1976,11 +1975,11 @@ p);
} else SynErr(219);
if (la.kind == 106) {
ImplementsClause(
-#line 1102 "VBNET.ATG"
+#line 1100 "VBNET.ATG"
out implementsClause);
}
-#line 1104 "VBNET.ATG"
+#line 1102 "VBNET.ATG"
eventDeclaration = new EventDeclaration(type, m.Modifier, p, attributes, name, implementsClause);
eventDeclaration.StartLocation = startPos;
eventDeclaration.EndLocation = t.EndLocation;
@@ -1991,26 +1990,26 @@ out implementsClause);
}
case 2: case 50: case 69: case 169: {
-#line 1111 "VBNET.ATG"
+#line 1109 "VBNET.ATG"
Point startPos = t.Location;
-#line 1113 "VBNET.ATG"
+#line 1111 "VBNET.ATG"
m.Check(Modifier.Fields);
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
fd.StartLocation = startPos;
VariableDeclarator(
-#line 1117 "VBNET.ATG"
+#line 1115 "VBNET.ATG"
variableDeclarators);
while (la.kind == 12) {
lexer.NextToken();
VariableDeclarator(
-#line 1118 "VBNET.ATG"
+#line 1116 "VBNET.ATG"
variableDeclarators);
}
Expect(1);
-#line 1121 "VBNET.ATG"
+#line 1119 "VBNET.ATG"
fd.EndLocation = t.EndLocation;
fd.Fields = variableDeclarators;
compilationUnit.AddChild(fd);
@@ -2019,35 +2018,35 @@ variableDeclarators);
}
case 70: {
-#line 1126 "VBNET.ATG"
+#line 1124 "VBNET.ATG"
m.Check(Modifier.Fields);
lexer.NextToken();
-#line 1127 "VBNET.ATG"
+#line 1125 "VBNET.ATG"
m.Add(Modifier.Const);
-#line 1129 "VBNET.ATG"
+#line 1127 "VBNET.ATG"
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
fd.StartLocation = t.Location;
List constantDeclarators = new List();
ConstantDeclarator(
-#line 1133 "VBNET.ATG"
+#line 1131 "VBNET.ATG"
constantDeclarators);
while (la.kind == 12) {
lexer.NextToken();
ConstantDeclarator(
-#line 1134 "VBNET.ATG"
+#line 1132 "VBNET.ATG"
constantDeclarators);
}
-#line 1136 "VBNET.ATG"
+#line 1134 "VBNET.ATG"
fd.Fields = constantDeclarators;
fd.EndLocation = t.Location;
Expect(1);
-#line 1141 "VBNET.ATG"
+#line 1139 "VBNET.ATG"
fd.EndLocation = t.EndLocation;
compilationUnit.AddChild(fd);
@@ -2056,20 +2055,20 @@ constantDeclarators);
case 146: {
lexer.NextToken();
-#line 1147 "VBNET.ATG"
+#line 1145 "VBNET.ATG"
m.Check(Modifier.VBProperties);
Point startPos = t.Location;
ArrayList implementsClause = null;
Identifier();
-#line 1151 "VBNET.ATG"
+#line 1149 "VBNET.ATG"
string propertyName = t.val;
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 1152 "VBNET.ATG"
+#line 1150 "VBNET.ATG"
p);
}
Expect(24);
@@ -2077,26 +2076,26 @@ p);
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 1153 "VBNET.ATG"
+#line 1151 "VBNET.ATG"
out type);
}
-#line 1155 "VBNET.ATG"
+#line 1153 "VBNET.ATG"
if(type == null) {
type = new TypeReference("System.Object");
}
if (la.kind == 106) {
ImplementsClause(
-#line 1159 "VBNET.ATG"
+#line 1157 "VBNET.ATG"
out implementsClause);
}
Expect(1);
if (
-#line 1163 "VBNET.ATG"
+#line 1161 "VBNET.ATG"
IsMustOverride(m)) {
-#line 1165 "VBNET.ATG"
+#line 1163 "VBNET.ATG"
PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
pDecl.StartLocation = startPos;
pDecl.EndLocation = t.Location;
@@ -2107,7 +2106,7 @@ IsMustOverride(m)) {
} else if (la.kind == 26 || la.kind == 100 || la.kind == 156) {
-#line 1175 "VBNET.ATG"
+#line 1173 "VBNET.ATG"
PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
pDecl.StartLocation = startPos;
pDecl.EndLocation = t.Location;
@@ -2119,13 +2118,13 @@ IsMustOverride(m)) {
PropertySetRegion setRegion;
AccessorDecls(
-#line 1185 "VBNET.ATG"
+#line 1183 "VBNET.ATG"
out getRegion, out setRegion);
Expect(87);
Expect(146);
Expect(1);
-#line 1189 "VBNET.ATG"
+#line 1187 "VBNET.ATG"
pDecl.GetRegion = getRegion;
pDecl.SetRegion = setRegion;
pDecl.BodyEnd = t.EndLocation;
@@ -2139,25 +2138,25 @@ out getRegion, out setRegion);
}
void EnumMemberDecl(
-#line 861 "VBNET.ATG"
+#line 859 "VBNET.ATG"
out FieldDeclaration f) {
-#line 863 "VBNET.ATG"
+#line 861 "VBNET.ATG"
Expression expr = null;List attributes = new List();
AttributeSection section = null;
VariableDeclaration varDecl = null;
while (la.kind == 26) {
AttributeSection(
-#line 867 "VBNET.ATG"
+#line 865 "VBNET.ATG"
out section);
-#line 867 "VBNET.ATG"
+#line 865 "VBNET.ATG"
attributes.Add(section);
}
Identifier();
-#line 870 "VBNET.ATG"
+#line 868 "VBNET.ATG"
f = new FieldDeclaration(attributes);
varDecl = new VariableDeclaration(t.val);
f.Fields.Add(varDecl);
@@ -2166,10 +2165,10 @@ out section);
if (la.kind == 11) {
lexer.NextToken();
Expr(
-#line 875 "VBNET.ATG"
+#line 873 "VBNET.ATG"
out expr);
-#line 875 "VBNET.ATG"
+#line 873 "VBNET.ATG"
varDecl.Initializer = expr;
}
Expect(1);
@@ -2177,7 +2176,7 @@ out expr);
void InterfaceMemberDecl() {
-#line 780 "VBNET.ATG"
+#line 778 "VBNET.ATG"
TypeReference type =null;
List p = new List();
List templates = new List();
@@ -2189,31 +2188,31 @@ out expr);
if (StartOf(13)) {
while (la.kind == 26) {
AttributeSection(
-#line 788 "VBNET.ATG"
+#line 786 "VBNET.ATG"
out section);
-#line 788 "VBNET.ATG"
+#line 786 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(7)) {
MemberModifier(
-#line 792 "VBNET.ATG"
+#line 790 "VBNET.ATG"
mod);
}
if (la.kind == 92) {
lexer.NextToken();
-#line 795 "VBNET.ATG"
+#line 793 "VBNET.ATG"
mod.Check(Modifier.VBInterfaceEvents);
Identifier();
-#line 796 "VBNET.ATG"
+#line 794 "VBNET.ATG"
name = t.val;
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 797 "VBNET.ATG"
+#line 795 "VBNET.ATG"
p);
}
Expect(24);
@@ -2221,12 +2220,12 @@ p);
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 798 "VBNET.ATG"
+#line 796 "VBNET.ATG"
out type);
}
Expect(1);
-#line 801 "VBNET.ATG"
+#line 799 "VBNET.ATG"
EventDeclaration ed = new EventDeclaration(type, mod.Modifier, p, attributes, name, null);
compilationUnit.AddChild(ed);
ed.EndLocation = t.EndLocation;
@@ -2234,27 +2233,27 @@ out type);
} else if (la.kind == 167) {
lexer.NextToken();
-#line 807 "VBNET.ATG"
+#line 805 "VBNET.ATG"
mod.Check(Modifier.VBInterfaceMethods);
Identifier();
-#line 808 "VBNET.ATG"
+#line 806 "VBNET.ATG"
name = t.val;
TypeParameterList(
-#line 809 "VBNET.ATG"
+#line 807 "VBNET.ATG"
templates);
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 810 "VBNET.ATG"
+#line 808 "VBNET.ATG"
p);
}
Expect(24);
}
Expect(1);
-#line 813 "VBNET.ATG"
+#line 811 "VBNET.ATG"
MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, null, p, attributes);
md.TypeReference = new TypeReference("", "System.Void");
md.EndLocation = t.EndLocation;
@@ -2264,20 +2263,20 @@ p);
} else if (la.kind == 99) {
lexer.NextToken();
-#line 821 "VBNET.ATG"
+#line 819 "VBNET.ATG"
mod.Check(Modifier.VBInterfaceMethods);
Identifier();
-#line 822 "VBNET.ATG"
+#line 820 "VBNET.ATG"
name = t.val;
TypeParameterList(
-#line 823 "VBNET.ATG"
+#line 821 "VBNET.ATG"
templates);
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 824 "VBNET.ATG"
+#line 822 "VBNET.ATG"
p);
}
Expect(24);
@@ -2286,15 +2285,15 @@ p);
lexer.NextToken();
while (la.kind == 26) {
AttributeSection(
-#line 825 "VBNET.ATG"
+#line 823 "VBNET.ATG"
out returnTypeAttributeSection);
}
TypeName(
-#line 825 "VBNET.ATG"
+#line 823 "VBNET.ATG"
out type);
}
-#line 827 "VBNET.ATG"
+#line 825 "VBNET.ATG"
if(type == null) {
type = new TypeReference("System.Object");
}
@@ -2308,17 +2307,17 @@ out type);
} else if (la.kind == 146) {
lexer.NextToken();
-#line 839 "VBNET.ATG"
+#line 837 "VBNET.ATG"
mod.Check(Modifier.VBInterfaceProperties);
Identifier();
-#line 840 "VBNET.ATG"
+#line 838 "VBNET.ATG"
name = t.val;
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 841 "VBNET.ATG"
+#line 839 "VBNET.ATG"
p);
}
Expect(24);
@@ -2326,18 +2325,18 @@ p);
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 842 "VBNET.ATG"
+#line 840 "VBNET.ATG"
out type);
}
-#line 844 "VBNET.ATG"
+#line 842 "VBNET.ATG"
if(type == null) {
type = new TypeReference("System.Object");
}
Expect(1);
-#line 850 "VBNET.ATG"
+#line 848 "VBNET.ATG"
PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes);
pd.Parameters = p;
pd.EndLocation = t.EndLocation;
@@ -2346,24 +2345,24 @@ out type);
} else SynErr(222);
} else if (StartOf(14)) {
NonModuleDeclaration(
-#line 857 "VBNET.ATG"
+#line 855 "VBNET.ATG"
mod, attributes);
} else SynErr(223);
}
void Expr(
-#line 1425 "VBNET.ATG"
+#line 1423 "VBNET.ATG"
out Expression expr) {
ConditionalOrExpr(
-#line 1427 "VBNET.ATG"
+#line 1425 "VBNET.ATG"
out expr);
}
void ImplementsClause(
-#line 1403 "VBNET.ATG"
+#line 1401 "VBNET.ATG"
out ArrayList baseInterfaces) {
-#line 1405 "VBNET.ATG"
+#line 1403 "VBNET.ATG"
baseInterfaces = new ArrayList();
string typename = String.Empty;
string first;
@@ -2371,76 +2370,76 @@ out ArrayList baseInterfaces) {
Expect(106);
Identifier();
-#line 1409 "VBNET.ATG"
+#line 1407 "VBNET.ATG"
first = t.val;
Expect(10);
Qualident(
-#line 1409 "VBNET.ATG"
+#line 1407 "VBNET.ATG"
out typename);
-#line 1409 "VBNET.ATG"
+#line 1407 "VBNET.ATG"
baseInterfaces.Add(first + "." + typename);
while (la.kind == 12) {
lexer.NextToken();
Identifier();
-#line 1410 "VBNET.ATG"
+#line 1408 "VBNET.ATG"
first = t.val;
Expect(10);
Qualident(
-#line 1410 "VBNET.ATG"
+#line 1408 "VBNET.ATG"
out typename);
-#line 1410 "VBNET.ATG"
+#line 1408 "VBNET.ATG"
baseInterfaces.Add(first + "." + typename);
}
}
void HandlesClause(
-#line 1361 "VBNET.ATG"
+#line 1359 "VBNET.ATG"
out ArrayList handlesClause) {
-#line 1363 "VBNET.ATG"
+#line 1361 "VBNET.ATG"
handlesClause = new ArrayList();
string name;
Expect(104);
EventMemberSpecifier(
-#line 1366 "VBNET.ATG"
+#line 1364 "VBNET.ATG"
out name);
-#line 1366 "VBNET.ATG"
+#line 1364 "VBNET.ATG"
handlesClause.Add(name);
while (la.kind == 12) {
lexer.NextToken();
EventMemberSpecifier(
-#line 1367 "VBNET.ATG"
+#line 1365 "VBNET.ATG"
out name);
-#line 1367 "VBNET.ATG"
+#line 1365 "VBNET.ATG"
handlesClause.Add(name);
}
}
void Block(
-#line 1973 "VBNET.ATG"
+#line 1971 "VBNET.ATG"
out Statement stmt) {
-#line 1976 "VBNET.ATG"
+#line 1974 "VBNET.ATG"
BlockStatement blockStmt = new BlockStatement();
blockStmt.StartLocation = t.Location;
compilationUnit.BlockStart(blockStmt);
while (StartOf(15) ||
-#line 1981 "VBNET.ATG"
+#line 1979 "VBNET.ATG"
IsEndStmtAhead()) {
if (
-#line 1981 "VBNET.ATG"
+#line 1979 "VBNET.ATG"
IsEndStmtAhead()) {
Expect(87);
EndOfStmt();
-#line 1981 "VBNET.ATG"
+#line 1979 "VBNET.ATG"
compilationUnit.AddChild(new EndStatement());
} else {
Statement();
@@ -2448,7 +2447,7 @@ IsEndStmtAhead()) {
}
}
-#line 1987 "VBNET.ATG"
+#line 1985 "VBNET.ATG"
stmt = blockStmt;
blockStmt.EndLocation = t.EndLocation;
compilationUnit.BlockEnd();
@@ -2456,65 +2455,65 @@ IsEndStmtAhead()) {
}
void Charset(
-#line 1353 "VBNET.ATG"
+#line 1351 "VBNET.ATG"
out CharsetModifier charsetModifier) {
-#line 1354 "VBNET.ATG"
+#line 1352 "VBNET.ATG"
charsetModifier = CharsetModifier.None;
if (la.kind == 99 || la.kind == 167) {
} else if (la.kind == 46) {
lexer.NextToken();
-#line 1355 "VBNET.ATG"
+#line 1353 "VBNET.ATG"
charsetModifier = CharsetModifier.ANSI;
} else if (la.kind == 49) {
lexer.NextToken();
-#line 1356 "VBNET.ATG"
+#line 1354 "VBNET.ATG"
charsetModifier = CharsetModifier.Auto;
} else if (la.kind == 176) {
lexer.NextToken();
-#line 1357 "VBNET.ATG"
+#line 1355 "VBNET.ATG"
charsetModifier = CharsetModifier.Unicode;
} else SynErr(224);
}
void VariableDeclarator(
-#line 1271 "VBNET.ATG"
+#line 1269 "VBNET.ATG"
List fieldDeclaration) {
-#line 1273 "VBNET.ATG"
+#line 1271 "VBNET.ATG"
Expression expr = null;
TypeReference type = null;ArrayList rank = null;ArrayList dimension = null;
Identifier();
-#line 1276 "VBNET.ATG"
+#line 1274 "VBNET.ATG"
string name = t.val;
if (
-#line 1277 "VBNET.ATG"
+#line 1275 "VBNET.ATG"
IsDims()) {
ArrayNameModifier(
-#line 1277 "VBNET.ATG"
+#line 1275 "VBNET.ATG"
out rank);
}
if (
-#line 1278 "VBNET.ATG"
+#line 1276 "VBNET.ATG"
IsSize()) {
ArrayInitializationModifier(
-#line 1278 "VBNET.ATG"
+#line 1276 "VBNET.ATG"
out dimension);
}
if (
-#line 1280 "VBNET.ATG"
+#line 1278 "VBNET.ATG"
IsObjectCreation()) {
Expect(47);
ObjectCreateExpression(
-#line 1280 "VBNET.ATG"
+#line 1278 "VBNET.ATG"
out expr);
-#line 1282 "VBNET.ATG"
+#line 1280 "VBNET.ATG"
if (expr is ObjectCreateExpression) {
type = ((ObjectCreateExpression)expr).CreateType;
} else {
@@ -2525,11 +2524,11 @@ out expr);
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 1289 "VBNET.ATG"
+#line 1287 "VBNET.ATG"
out type);
}
-#line 1291 "VBNET.ATG"
+#line 1289 "VBNET.ATG"
if (type != null && rank != null) {
if(type.RankSpecifier != null) {
Error("array rank only allowed one time");
@@ -2541,40 +2540,40 @@ out type);
if (la.kind == 11) {
lexer.NextToken();
VariableInitializer(
-#line 1299 "VBNET.ATG"
+#line 1297 "VBNET.ATG"
out expr);
}
} else SynErr(225);
-#line 1301 "VBNET.ATG"
+#line 1299 "VBNET.ATG"
fieldDeclaration.Add(new VariableDeclaration(name, expr, type));
}
void ConstantDeclarator(
-#line 1254 "VBNET.ATG"
+#line 1252 "VBNET.ATG"
List constantDeclaration) {
-#line 1256 "VBNET.ATG"
+#line 1254 "VBNET.ATG"
Expression expr = null;
TypeReference type = null;
string name = String.Empty;
Identifier();
-#line 1260 "VBNET.ATG"
+#line 1258 "VBNET.ATG"
name = t.val;
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 1261 "VBNET.ATG"
+#line 1259 "VBNET.ATG"
out type);
}
Expect(11);
Expr(
-#line 1262 "VBNET.ATG"
+#line 1260 "VBNET.ATG"
out expr);
-#line 1264 "VBNET.ATG"
+#line 1262 "VBNET.ATG"
VariableDeclaration f = new VariableDeclaration(name, expr);
f.TypeReference = type;
constantDeclaration.Add(f);
@@ -2582,10 +2581,10 @@ out expr);
}
void AccessorDecls(
-#line 1198 "VBNET.ATG"
+#line 1196 "VBNET.ATG"
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
-#line 1200 "VBNET.ATG"
+#line 1198 "VBNET.ATG"
List attributes = new List();
AttributeSection section;
getBlock = null;
@@ -2593,68 +2592,68 @@ out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
while (la.kind == 26) {
AttributeSection(
-#line 1205 "VBNET.ATG"
+#line 1203 "VBNET.ATG"
out section);
-#line 1205 "VBNET.ATG"
+#line 1203 "VBNET.ATG"
attributes.Add(section);
}
if (la.kind == 100) {
GetAccessorDecl(
-#line 1207 "VBNET.ATG"
+#line 1205 "VBNET.ATG"
out getBlock, attributes);
if (la.kind == 26 || la.kind == 156) {
-#line 1209 "VBNET.ATG"
+#line 1207 "VBNET.ATG"
attributes = new List();
while (la.kind == 26) {
AttributeSection(
-#line 1210 "VBNET.ATG"
+#line 1208 "VBNET.ATG"
out section);
-#line 1210 "VBNET.ATG"
+#line 1208 "VBNET.ATG"
attributes.Add(section);
}
SetAccessorDecl(
-#line 1211 "VBNET.ATG"
+#line 1209 "VBNET.ATG"
out setBlock, attributes);
}
} else if (la.kind == 156) {
SetAccessorDecl(
-#line 1214 "VBNET.ATG"
+#line 1212 "VBNET.ATG"
out setBlock, attributes);
if (la.kind == 26 || la.kind == 100) {
-#line 1216 "VBNET.ATG"
+#line 1214 "VBNET.ATG"
attributes = new List();
while (la.kind == 26) {
AttributeSection(
-#line 1217 "VBNET.ATG"
+#line 1215 "VBNET.ATG"
out section);
-#line 1217 "VBNET.ATG"
+#line 1215 "VBNET.ATG"
attributes.Add(section);
}
GetAccessorDecl(
-#line 1218 "VBNET.ATG"
+#line 1216 "VBNET.ATG"
out getBlock, attributes);
}
} else SynErr(226);
}
void GetAccessorDecl(
-#line 1224 "VBNET.ATG"
+#line 1222 "VBNET.ATG"
out PropertyGetRegion getBlock, List attributes) {
-#line 1225 "VBNET.ATG"
+#line 1223 "VBNET.ATG"
Statement stmt = null;
Expect(100);
Expect(1);
Block(
-#line 1228 "VBNET.ATG"
+#line 1226 "VBNET.ATG"
out stmt);
-#line 1230 "VBNET.ATG"
+#line 1228 "VBNET.ATG"
getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes);
Expect(87);
@@ -2663,10 +2662,10 @@ out stmt);
}
void SetAccessorDecl(
-#line 1237 "VBNET.ATG"
+#line 1235 "VBNET.ATG"
out PropertySetRegion setBlock, List attributes) {
-#line 1239 "VBNET.ATG"
+#line 1237 "VBNET.ATG"
Statement stmt = null; List p = new List();
Expect(156);
@@ -2674,17 +2673,17 @@ out PropertySetRegion setBlock, List attributes) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
-#line 1242 "VBNET.ATG"
+#line 1240 "VBNET.ATG"
p);
}
Expect(24);
}
Expect(1);
Block(
-#line 1244 "VBNET.ATG"
+#line 1242 "VBNET.ATG"
out stmt);
-#line 1246 "VBNET.ATG"
+#line 1244 "VBNET.ATG"
setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
setBlock.Parameters = p;
@@ -2694,36 +2693,36 @@ out stmt);
}
void ArrayNameModifier(
-#line 1765 "VBNET.ATG"
+#line 1763 "VBNET.ATG"
out ArrayList arrayModifiers) {
-#line 1767 "VBNET.ATG"
+#line 1765 "VBNET.ATG"
arrayModifiers = null;
ArrayTypeModifiers(
-#line 1769 "VBNET.ATG"
+#line 1767 "VBNET.ATG"
out arrayModifiers);
}
void ArrayInitializationModifier(
-#line 1305 "VBNET.ATG"
+#line 1303 "VBNET.ATG"
out ArrayList arrayModifiers) {
-#line 1307 "VBNET.ATG"
+#line 1305 "VBNET.ATG"
arrayModifiers = null;
Expect(23);
InitializationRankList(
-#line 1309 "VBNET.ATG"
+#line 1307 "VBNET.ATG"
out arrayModifiers);
Expect(24);
}
void ObjectCreateExpression(
-#line 1681 "VBNET.ATG"
+#line 1679 "VBNET.ATG"
out Expression oce) {
-#line 1683 "VBNET.ATG"
+#line 1681 "VBNET.ATG"
TypeReference type = null;
Expression initializer = null;
ArrayList arguments = null;
@@ -2731,24 +2730,24 @@ out Expression oce) {
Expect(126);
NonArrayTypeName(
-#line 1688 "VBNET.ATG"
+#line 1686 "VBNET.ATG"
out type);
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(17)) {
ArgumentList(
-#line 1689 "VBNET.ATG"
+#line 1687 "VBNET.ATG"
out arguments);
}
Expect(24);
}
if (la.kind == 21) {
ArrayInitializer(
-#line 1690 "VBNET.ATG"
+#line 1688 "VBNET.ATG"
out initializer);
}
-#line 1692 "VBNET.ATG"
+#line 1690 "VBNET.ATG"
if (initializer == null) {
oce = new ObjectCreateExpression(type, arguments);
} else {
@@ -2760,98 +2759,98 @@ out initializer);
}
void VariableInitializer(
-#line 1325 "VBNET.ATG"
+#line 1323 "VBNET.ATG"
out Expression initializerExpression) {
-#line 1327 "VBNET.ATG"
+#line 1325 "VBNET.ATG"
initializerExpression = null;
if (StartOf(18)) {
Expr(
-#line 1329 "VBNET.ATG"
+#line 1327 "VBNET.ATG"
out initializerExpression);
} else if (la.kind == 21) {
ArrayInitializer(
-#line 1330 "VBNET.ATG"
+#line 1328 "VBNET.ATG"
out initializerExpression);
} else SynErr(227);
}
void InitializationRankList(
-#line 1313 "VBNET.ATG"
+#line 1311 "VBNET.ATG"
out ArrayList rank) {
-#line 1315 "VBNET.ATG"
+#line 1313 "VBNET.ATG"
rank = null;
Expression expr = null;
Expr(
-#line 1318 "VBNET.ATG"
+#line 1316 "VBNET.ATG"
out expr);
-#line 1318 "VBNET.ATG"
+#line 1316 "VBNET.ATG"
rank = new ArrayList(); if (expr != null) { rank.Add(expr); }
while (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 1320 "VBNET.ATG"
+#line 1318 "VBNET.ATG"
out expr);
-#line 1320 "VBNET.ATG"
+#line 1318 "VBNET.ATG"
if (expr != null) { rank.Add(expr); }
}
}
void ArrayInitializer(
-#line 1334 "VBNET.ATG"
+#line 1332 "VBNET.ATG"
out Expression outExpr) {
-#line 1336 "VBNET.ATG"
+#line 1334 "VBNET.ATG"
Expression expr = null;
ArrayInitializerExpression initializer = new ArrayInitializerExpression();
Expect(21);
if (StartOf(19)) {
VariableInitializer(
-#line 1341 "VBNET.ATG"
+#line 1339 "VBNET.ATG"
out expr);
-#line 1343 "VBNET.ATG"
+#line 1341 "VBNET.ATG"
if (expr != null) { initializer.CreateExpressions.Add(expr); }
while (
-#line 1346 "VBNET.ATG"
+#line 1344 "VBNET.ATG"
NotFinalComma()) {
Expect(12);
VariableInitializer(
-#line 1346 "VBNET.ATG"
+#line 1344 "VBNET.ATG"
out expr);
-#line 1347 "VBNET.ATG"
+#line 1345 "VBNET.ATG"
if (expr != null) { initializer.CreateExpressions.Add(expr); }
}
}
Expect(22);
-#line 1350 "VBNET.ATG"
+#line 1348 "VBNET.ATG"
outExpr = initializer;
}
void EventMemberSpecifier(
-#line 1413 "VBNET.ATG"
+#line 1411 "VBNET.ATG"
out string name) {
-#line 1414 "VBNET.ATG"
+#line 1412 "VBNET.ATG"
string type; name = String.Empty;
if (StartOf(10)) {
Identifier();
-#line 1415 "VBNET.ATG"
+#line 1413 "VBNET.ATG"
type = t.val;
Expect(10);
Identifier();
-#line 1417 "VBNET.ATG"
+#line 1415 "VBNET.ATG"
name = type + "." + t.val;
} else if (la.kind == 123) {
lexer.NextToken();
@@ -2859,42 +2858,42 @@ out string name) {
if (StartOf(10)) {
Identifier();
-#line 1420 "VBNET.ATG"
+#line 1418 "VBNET.ATG"
name = "MyBase." + t.val;
} else if (la.kind == 91) {
lexer.NextToken();
-#line 1421 "VBNET.ATG"
+#line 1419 "VBNET.ATG"
name = "MyBase.Error";
} else SynErr(228);
} else SynErr(229);
}
void ConditionalOrExpr(
-#line 1560 "VBNET.ATG"
+#line 1558 "VBNET.ATG"
out Expression outExpr) {
-#line 1561 "VBNET.ATG"
+#line 1559 "VBNET.ATG"
Expression expr;
ConditionalAndExpr(
-#line 1562 "VBNET.ATG"
+#line 1560 "VBNET.ATG"
out outExpr);
while (la.kind == 138) {
lexer.NextToken();
ConditionalAndExpr(
-#line 1562 "VBNET.ATG"
+#line 1560 "VBNET.ATG"
out expr);
-#line 1562 "VBNET.ATG"
+#line 1560 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalOr, expr);
}
}
void UnaryExpr(
-#line 1434 "VBNET.ATG"
+#line 1432 "VBNET.ATG"
out Expression uExpr) {
-#line 1436 "VBNET.ATG"
+#line 1434 "VBNET.ATG"
Expression expr;
UnaryOperatorType uop = UnaryOperatorType.None;
bool isUOp = false;
@@ -2903,25 +2902,25 @@ out Expression uExpr) {
if (la.kind == 14) {
lexer.NextToken();
-#line 1440 "VBNET.ATG"
+#line 1438 "VBNET.ATG"
uop = UnaryOperatorType.Plus; isUOp = true;
} else if (la.kind == 15) {
lexer.NextToken();
-#line 1441 "VBNET.ATG"
+#line 1439 "VBNET.ATG"
uop = UnaryOperatorType.Minus; isUOp = true;
} else {
lexer.NextToken();
-#line 1443 "VBNET.ATG"
+#line 1441 "VBNET.ATG"
uop = UnaryOperatorType.Star; isUOp = true;
}
}
SimpleExpr(
-#line 1445 "VBNET.ATG"
+#line 1443 "VBNET.ATG"
out expr);
-#line 1447 "VBNET.ATG"
+#line 1445 "VBNET.ATG"
if (isUOp) {
uExpr = new UnaryOperatorExpression(expr, uop);
} else {
@@ -2931,139 +2930,139 @@ out expr);
}
void SimpleExpr(
-#line 1470 "VBNET.ATG"
+#line 1468 "VBNET.ATG"
out Expression pexpr) {
-#line 1472 "VBNET.ATG"
+#line 1470 "VBNET.ATG"
Expression expr;
TypeReference type = null;
string name = String.Empty;
pexpr = null;
if (StartOf(20) ||
-#line 1501 "VBNET.ATG"
+#line 1499 "VBNET.ATG"
la.kind == Tokens.Global) {
if (la.kind == 3) {
lexer.NextToken();
-#line 1480 "VBNET.ATG"
+#line 1478 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
} else if (la.kind == 4) {
lexer.NextToken();
-#line 1481 "VBNET.ATG"
+#line 1479 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
} else if (la.kind == 7) {
lexer.NextToken();
-#line 1482 "VBNET.ATG"
+#line 1480 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
} else if (la.kind == 6) {
lexer.NextToken();
-#line 1483 "VBNET.ATG"
+#line 1481 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
} else if (la.kind == 5) {
lexer.NextToken();
-#line 1484 "VBNET.ATG"
+#line 1482 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
} else if (la.kind == 9) {
lexer.NextToken();
-#line 1485 "VBNET.ATG"
+#line 1483 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
} else if (la.kind == 8) {
lexer.NextToken();
-#line 1486 "VBNET.ATG"
+#line 1484 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
} else if (la.kind == 173) {
lexer.NextToken();
-#line 1488 "VBNET.ATG"
+#line 1486 "VBNET.ATG"
pexpr = new PrimitiveExpression(true, "true");
} else if (la.kind == 95) {
lexer.NextToken();
-#line 1489 "VBNET.ATG"
+#line 1487 "VBNET.ATG"
pexpr = new PrimitiveExpression(false, "false");
} else if (la.kind == 129) {
lexer.NextToken();
-#line 1490 "VBNET.ATG"
+#line 1488 "VBNET.ATG"
pexpr = new PrimitiveExpression(null, "null");
} else if (la.kind == 23) {
lexer.NextToken();
Expr(
-#line 1491 "VBNET.ATG"
+#line 1489 "VBNET.ATG"
out expr);
Expect(24);
-#line 1491 "VBNET.ATG"
+#line 1489 "VBNET.ATG"
pexpr = new ParenthesizedExpression(expr);
} else if (StartOf(10)) {
Identifier();
-#line 1492 "VBNET.ATG"
+#line 1490 "VBNET.ATG"
pexpr = new IdentifierExpression(t.val);
} else if (StartOf(21)) {
-#line 1493 "VBNET.ATG"
+#line 1491 "VBNET.ATG"
string val = String.Empty;
PrimitiveTypeName(
-#line 1493 "VBNET.ATG"
+#line 1491 "VBNET.ATG"
out val);
Expect(10);
-#line 1494 "VBNET.ATG"
+#line 1492 "VBNET.ATG"
t.val = "";
Identifier();
-#line 1494 "VBNET.ATG"
+#line 1492 "VBNET.ATG"
pexpr = new FieldReferenceExpression(new TypeReferenceExpression(val), t.val);
} else if (la.kind == 118) {
lexer.NextToken();
-#line 1495 "VBNET.ATG"
+#line 1493 "VBNET.ATG"
pexpr = new ThisReferenceExpression();
} else if (la.kind == 123 || la.kind == 124) {
-#line 1496 "VBNET.ATG"
+#line 1494 "VBNET.ATG"
Expression retExpr = null;
if (la.kind == 123) {
lexer.NextToken();
-#line 1497 "VBNET.ATG"
+#line 1495 "VBNET.ATG"
retExpr = new BaseReferenceExpression();
} else if (la.kind == 124) {
lexer.NextToken();
-#line 1498 "VBNET.ATG"
+#line 1496 "VBNET.ATG"
retExpr = new ClassReferenceExpression();
} else SynErr(230);
Expect(10);
IdentifierOrKeyword(
-#line 1500 "VBNET.ATG"
+#line 1498 "VBNET.ATG"
out name);
-#line 1500 "VBNET.ATG"
+#line 1498 "VBNET.ATG"
pexpr = new FieldReferenceExpression(retExpr, name);
} else if (
-#line 1501 "VBNET.ATG"
+#line 1499 "VBNET.ATG"
la.kind == Tokens.Global) {
TypeName(
-#line 1501 "VBNET.ATG"
+#line 1499 "VBNET.ATG"
out type);
-#line 1501 "VBNET.ATG"
+#line 1499 "VBNET.ATG"
pexpr = new TypeReferenceExpression(type);
} else if (la.kind == 126) {
ObjectCreateExpression(
-#line 1502 "VBNET.ATG"
+#line 1500 "VBNET.ATG"
out expr);
-#line 1502 "VBNET.ATG"
+#line 1500 "VBNET.ATG"
pexpr = expr;
} else if (la.kind == 74 || la.kind == 81) {
if (la.kind == 81) {
@@ -3073,166 +3072,166 @@ out expr);
} else SynErr(231);
Expect(23);
Expr(
-#line 1503 "VBNET.ATG"
+#line 1501 "VBNET.ATG"
out expr);
Expect(12);
TypeName(
-#line 1503 "VBNET.ATG"
+#line 1501 "VBNET.ATG"
out type);
Expect(24);
-#line 1503 "VBNET.ATG"
+#line 1501 "VBNET.ATG"
pexpr = new CastExpression(type, expr);
} else if (la.kind == 195) {
lexer.NextToken();
Expect(23);
Expr(
-#line 1504 "VBNET.ATG"
+#line 1502 "VBNET.ATG"
out expr);
Expect(12);
TypeName(
-#line 1504 "VBNET.ATG"
+#line 1502 "VBNET.ATG"
out type);
Expect(24);
-#line 1504 "VBNET.ATG"
+#line 1502 "VBNET.ATG"
pexpr = new BinaryOperatorExpression(expr, BinaryOperatorType.AsCast, new TypeReferenceExpression(type));
} else if (StartOf(22)) {
CastTarget(
-#line 1505 "VBNET.ATG"
+#line 1503 "VBNET.ATG"
out type);
Expect(23);
Expr(
-#line 1505 "VBNET.ATG"
+#line 1503 "VBNET.ATG"
out expr);
Expect(24);
-#line 1505 "VBNET.ATG"
+#line 1503 "VBNET.ATG"
pexpr = new CastExpression(type, expr, true);
} else if (la.kind == 42) {
lexer.NextToken();
Expr(
-#line 1506 "VBNET.ATG"
+#line 1504 "VBNET.ATG"
out expr);
-#line 1506 "VBNET.ATG"
+#line 1504 "VBNET.ATG"
pexpr = new AddressOfExpression(expr);
} else if (la.kind == 101) {
lexer.NextToken();
Expect(23);
TypeName(
-#line 1507 "VBNET.ATG"
+#line 1505 "VBNET.ATG"
out type);
Expect(24);
-#line 1507 "VBNET.ATG"
+#line 1505 "VBNET.ATG"
pexpr = new TypeOfExpression(type);
} else {
lexer.NextToken();
SimpleExpr(
-#line 1508 "VBNET.ATG"
+#line 1506 "VBNET.ATG"
out expr);
Expect(112);
TypeName(
-#line 1508 "VBNET.ATG"
+#line 1506 "VBNET.ATG"
out type);
-#line 1508 "VBNET.ATG"
+#line 1506 "VBNET.ATG"
pexpr = new TypeOfIsExpression(expr, type);
}
while (la.kind == 10 || la.kind == 23) {
if (la.kind == 10) {
lexer.NextToken();
IdentifierOrKeyword(
-#line 1511 "VBNET.ATG"
+#line 1509 "VBNET.ATG"
out name);
-#line 1511 "VBNET.ATG"
+#line 1509 "VBNET.ATG"
pexpr = new FieldReferenceExpression(pexpr, name);
} else {
lexer.NextToken();
-#line 1512 "VBNET.ATG"
+#line 1510 "VBNET.ATG"
ArrayList parameters = new ArrayList();
if (StartOf(23)) {
if (StartOf(18)) {
Argument(
-#line 1514 "VBNET.ATG"
+#line 1512 "VBNET.ATG"
out expr);
-#line 1514 "VBNET.ATG"
+#line 1512 "VBNET.ATG"
if (expr != null) { parameters.Add(expr); }
}
while (la.kind == 12) {
lexer.NextToken();
if (StartOf(18)) {
Argument(
-#line 1517 "VBNET.ATG"
+#line 1515 "VBNET.ATG"
out expr);
-#line 1517 "VBNET.ATG"
+#line 1515 "VBNET.ATG"
if (expr != null) { parameters.Add(expr); }
}
}
}
Expect(24);
-#line 1520 "VBNET.ATG"
+#line 1518 "VBNET.ATG"
pexpr = new InvocationExpression(pexpr, parameters);
}
}
} else if (la.kind == 10) {
lexer.NextToken();
IdentifierOrKeyword(
-#line 1524 "VBNET.ATG"
+#line 1522 "VBNET.ATG"
out name);
-#line 1524 "VBNET.ATG"
+#line 1522 "VBNET.ATG"
pexpr = new FieldReferenceExpression(pexpr, name);
while (la.kind == 10 || la.kind == 23) {
if (la.kind == 10) {
lexer.NextToken();
IdentifierOrKeyword(
-#line 1526 "VBNET.ATG"
+#line 1524 "VBNET.ATG"
out name);
-#line 1526 "VBNET.ATG"
+#line 1524 "VBNET.ATG"
pexpr = new FieldReferenceExpression(pexpr, name);
} else {
lexer.NextToken();
-#line 1527 "VBNET.ATG"
+#line 1525 "VBNET.ATG"
ArrayList parameters = new ArrayList();
if (StartOf(23)) {
-#line 1529 "VBNET.ATG"
+#line 1527 "VBNET.ATG"
expr = null;
if (StartOf(18)) {
Argument(
-#line 1529 "VBNET.ATG"
+#line 1527 "VBNET.ATG"
out expr);
}
-#line 1529 "VBNET.ATG"
+#line 1527 "VBNET.ATG"
if (expr != null) { parameters.Add(expr); }
while (la.kind == 12) {
lexer.NextToken();
-#line 1531 "VBNET.ATG"
+#line 1529 "VBNET.ATG"
expr = null;
if (StartOf(18)) {
Argument(
-#line 1532 "VBNET.ATG"
+#line 1530 "VBNET.ATG"
out expr);
}
-#line 1532 "VBNET.ATG"
+#line 1530 "VBNET.ATG"
if (expr != null) { parameters.Add(expr); }
}
}
Expect(24);
-#line 1535 "VBNET.ATG"
+#line 1533 "VBNET.ATG"
pexpr = new InvocationExpression(pexpr, parameters);
}
}
@@ -3240,79 +3239,79 @@ out expr);
}
void AssignmentOperator(
-#line 1455 "VBNET.ATG"
+#line 1453 "VBNET.ATG"
out AssignmentOperatorType op) {
-#line 1456 "VBNET.ATG"
+#line 1454 "VBNET.ATG"
op = AssignmentOperatorType.None;
switch (la.kind) {
case 11: {
lexer.NextToken();
-#line 1457 "VBNET.ATG"
+#line 1455 "VBNET.ATG"
op = AssignmentOperatorType.Assign;
break;
}
case 40: {
lexer.NextToken();
-#line 1458 "VBNET.ATG"
+#line 1456 "VBNET.ATG"
op = AssignmentOperatorType.ConcatString;
break;
}
case 32: {
lexer.NextToken();
-#line 1459 "VBNET.ATG"
+#line 1457 "VBNET.ATG"
op = AssignmentOperatorType.Add;
break;
}
case 34: {
lexer.NextToken();
-#line 1460 "VBNET.ATG"
+#line 1458 "VBNET.ATG"
op = AssignmentOperatorType.Subtract;
break;
}
case 35: {
lexer.NextToken();
-#line 1461 "VBNET.ATG"
+#line 1459 "VBNET.ATG"
op = AssignmentOperatorType.Multiply;
break;
}
case 36: {
lexer.NextToken();
-#line 1462 "VBNET.ATG"
+#line 1460 "VBNET.ATG"
op = AssignmentOperatorType.Divide;
break;
}
case 37: {
lexer.NextToken();
-#line 1463 "VBNET.ATG"
+#line 1461 "VBNET.ATG"
op = AssignmentOperatorType.DivideInteger;
break;
}
case 33: {
lexer.NextToken();
-#line 1464 "VBNET.ATG"
+#line 1462 "VBNET.ATG"
op = AssignmentOperatorType.Power;
break;
}
case 38: {
lexer.NextToken();
-#line 1465 "VBNET.ATG"
+#line 1463 "VBNET.ATG"
op = AssignmentOperatorType.ShiftLeft;
break;
}
case 39: {
lexer.NextToken();
-#line 1466 "VBNET.ATG"
+#line 1464 "VBNET.ATG"
op = AssignmentOperatorType.ShiftRight;
break;
}
@@ -3321,1074 +3320,1074 @@ out AssignmentOperatorType op) {
}
void IdentifierOrKeyword(
-#line 2558 "VBNET.ATG"
+#line 2556 "VBNET.ATG"
out string name) {
-#line 2560 "VBNET.ATG"
+#line 2558 "VBNET.ATG"
name = String.Empty;
switch (la.kind) {
case 2: case 50: case 69: case 169: {
Identifier();
-#line 2563 "VBNET.ATG"
+#line 2561 "VBNET.ATG"
name = t.val;
break;
}
case 41: {
lexer.NextToken();
-#line 2564 "VBNET.ATG"
+#line 2562 "VBNET.ATG"
name = t.val;
break;
}
case 42: {
lexer.NextToken();
-#line 2565 "VBNET.ATG"
+#line 2563 "VBNET.ATG"
name = t.val;
break;
}
case 43: {
lexer.NextToken();
-#line 2566 "VBNET.ATG"
+#line 2564 "VBNET.ATG"
name = t.val;
break;
}
case 44: {
lexer.NextToken();
-#line 2567 "VBNET.ATG"
+#line 2565 "VBNET.ATG"
name = t.val;
break;
}
case 45: {
lexer.NextToken();
-#line 2568 "VBNET.ATG"
+#line 2566 "VBNET.ATG"
name = t.val;
break;
}
case 46: {
lexer.NextToken();
-#line 2569 "VBNET.ATG"
+#line 2567 "VBNET.ATG"
name = t.val;
break;
}
case 47: {
lexer.NextToken();
-#line 2570 "VBNET.ATG"
+#line 2568 "VBNET.ATG"
name = t.val;
break;
}
case 48: {
lexer.NextToken();
-#line 2571 "VBNET.ATG"
+#line 2569 "VBNET.ATG"
name = t.val;
break;
}
case 49: {
lexer.NextToken();
-#line 2572 "VBNET.ATG"
+#line 2570 "VBNET.ATG"
name = t.val;
break;
}
case 51: {
lexer.NextToken();
-#line 2573 "VBNET.ATG"
+#line 2571 "VBNET.ATG"
name = t.val;
break;
}
case 52: {
lexer.NextToken();
-#line 2574 "VBNET.ATG"
+#line 2572 "VBNET.ATG"
name = t.val;
break;
}
case 53: {
lexer.NextToken();
-#line 2575 "VBNET.ATG"
+#line 2573 "VBNET.ATG"
name = t.val;
break;
}
case 54: {
lexer.NextToken();
-#line 2576 "VBNET.ATG"
+#line 2574 "VBNET.ATG"
name = t.val;
break;
}
case 55: {
lexer.NextToken();
-#line 2577 "VBNET.ATG"
+#line 2575 "VBNET.ATG"
name = t.val;
break;
}
case 56: {
lexer.NextToken();
-#line 2578 "VBNET.ATG"
+#line 2576 "VBNET.ATG"
name = t.val;
break;
}
case 57: {
lexer.NextToken();
-#line 2579 "VBNET.ATG"
+#line 2577 "VBNET.ATG"
name = t.val;
break;
}
case 58: {
lexer.NextToken();
-#line 2580 "VBNET.ATG"
+#line 2578 "VBNET.ATG"
name = t.val;
break;
}
case 59: {
lexer.NextToken();
-#line 2581 "VBNET.ATG"
+#line 2579 "VBNET.ATG"
name = t.val;
break;
}
case 60: {
lexer.NextToken();
-#line 2582 "VBNET.ATG"
+#line 2580 "VBNET.ATG"
name = t.val;
break;
}
case 61: {
lexer.NextToken();
-#line 2583 "VBNET.ATG"
+#line 2581 "VBNET.ATG"
name = t.val;
break;
}
case 62: {
lexer.NextToken();
-#line 2584 "VBNET.ATG"
+#line 2582 "VBNET.ATG"
name = t.val;
break;
}
case 63: {
lexer.NextToken();
-#line 2585 "VBNET.ATG"
+#line 2583 "VBNET.ATG"
name = t.val;
break;
}
case 64: {
lexer.NextToken();
-#line 2586 "VBNET.ATG"
+#line 2584 "VBNET.ATG"
name = t.val;
break;
}
case 65: {
lexer.NextToken();
-#line 2587 "VBNET.ATG"
+#line 2585 "VBNET.ATG"
name = t.val;
break;
}
case 66: {
lexer.NextToken();
-#line 2588 "VBNET.ATG"
+#line 2586 "VBNET.ATG"
name = t.val;
break;
}
case 67: {
lexer.NextToken();
-#line 2589 "VBNET.ATG"
+#line 2587 "VBNET.ATG"
name = t.val;
break;
}
case 68: {
lexer.NextToken();
-#line 2590 "VBNET.ATG"
+#line 2588 "VBNET.ATG"
name = t.val;
break;
}
case 70: {
lexer.NextToken();
-#line 2591 "VBNET.ATG"
+#line 2589 "VBNET.ATG"
name = t.val;
break;
}
case 71: {
lexer.NextToken();
-#line 2592 "VBNET.ATG"
+#line 2590 "VBNET.ATG"
name = t.val;
break;
}
case 72: {
lexer.NextToken();
-#line 2593 "VBNET.ATG"
+#line 2591 "VBNET.ATG"
name = t.val;
break;
}
case 73: {
lexer.NextToken();
-#line 2594 "VBNET.ATG"
+#line 2592 "VBNET.ATG"
name = t.val;
break;
}
case 74: {
lexer.NextToken();
-#line 2595 "VBNET.ATG"
+#line 2593 "VBNET.ATG"
name = t.val;
break;
}
case 75: {
lexer.NextToken();
-#line 2596 "VBNET.ATG"
+#line 2594 "VBNET.ATG"
name = t.val;
break;
}
case 76: {
lexer.NextToken();
-#line 2597 "VBNET.ATG"
+#line 2595 "VBNET.ATG"
name = t.val;
break;
}
case 77: {
lexer.NextToken();
-#line 2598 "VBNET.ATG"
+#line 2596 "VBNET.ATG"
name = t.val;
break;
}
case 78: {
lexer.NextToken();
-#line 2599 "VBNET.ATG"
+#line 2597 "VBNET.ATG"
name = t.val;
break;
}
case 79: {
lexer.NextToken();
-#line 2600 "VBNET.ATG"
+#line 2598 "VBNET.ATG"
name = t.val;
break;
}
case 80: {
lexer.NextToken();
-#line 2601 "VBNET.ATG"
+#line 2599 "VBNET.ATG"
name = t.val;
break;
}
case 81: {
lexer.NextToken();
-#line 2602 "VBNET.ATG"
+#line 2600 "VBNET.ATG"
name = t.val;
break;
}
case 82: {
lexer.NextToken();
-#line 2603 "VBNET.ATG"
+#line 2601 "VBNET.ATG"
name = t.val;
break;
}
case 83: {
lexer.NextToken();
-#line 2604 "VBNET.ATG"
+#line 2602 "VBNET.ATG"
name = t.val;
break;
}
case 84: {
lexer.NextToken();
-#line 2605 "VBNET.ATG"
+#line 2603 "VBNET.ATG"
name = t.val;
break;
}
case 85: {
lexer.NextToken();
-#line 2606 "VBNET.ATG"
+#line 2604 "VBNET.ATG"
name = t.val;
break;
}
case 86: {
lexer.NextToken();
-#line 2607 "VBNET.ATG"
+#line 2605 "VBNET.ATG"
name = t.val;
break;
}
case 87: {
lexer.NextToken();
-#line 2608 "VBNET.ATG"
+#line 2606 "VBNET.ATG"
name = t.val;
break;
}
case 88: {
lexer.NextToken();
-#line 2609 "VBNET.ATG"
+#line 2607 "VBNET.ATG"
name = t.val;
break;
}
case 89: {
lexer.NextToken();
-#line 2610 "VBNET.ATG"
+#line 2608 "VBNET.ATG"
name = t.val;
break;
}
case 90: {
lexer.NextToken();
-#line 2611 "VBNET.ATG"
+#line 2609 "VBNET.ATG"
name = t.val;
break;
}
case 91: {
lexer.NextToken();
-#line 2612 "VBNET.ATG"
+#line 2610 "VBNET.ATG"
name = t.val;
break;
}
case 92: {
lexer.NextToken();
-#line 2613 "VBNET.ATG"
+#line 2611 "VBNET.ATG"
name = t.val;
break;
}
case 93: {
lexer.NextToken();
-#line 2614 "VBNET.ATG"
+#line 2612 "VBNET.ATG"
name = t.val;
break;
}
case 94: {
lexer.NextToken();
-#line 2615 "VBNET.ATG"
+#line 2613 "VBNET.ATG"
name = t.val;
break;
}
case 95: {
lexer.NextToken();
-#line 2616 "VBNET.ATG"
+#line 2614 "VBNET.ATG"
name = t.val;
break;
}
case 96: {
lexer.NextToken();
-#line 2617 "VBNET.ATG"
+#line 2615 "VBNET.ATG"
name = t.val;
break;
}
case 97: {
lexer.NextToken();
-#line 2618 "VBNET.ATG"
+#line 2616 "VBNET.ATG"
name = t.val;
break;
}
case 98: {
lexer.NextToken();
-#line 2619 "VBNET.ATG"
+#line 2617 "VBNET.ATG"
name = t.val;
break;
}
case 99: {
lexer.NextToken();
-#line 2620 "VBNET.ATG"
+#line 2618 "VBNET.ATG"
name = t.val;
break;
}
case 100: {
lexer.NextToken();
-#line 2621 "VBNET.ATG"
+#line 2619 "VBNET.ATG"
name = t.val;
break;
}
case 101: {
lexer.NextToken();
-#line 2622 "VBNET.ATG"
+#line 2620 "VBNET.ATG"
name = t.val;
break;
}
case 102: {
lexer.NextToken();
-#line 2623 "VBNET.ATG"
+#line 2621 "VBNET.ATG"
name = t.val;
break;
}
case 103: {
lexer.NextToken();
-#line 2624 "VBNET.ATG"
+#line 2622 "VBNET.ATG"
name = t.val;
break;
}
case 104: {
lexer.NextToken();
-#line 2625 "VBNET.ATG"
+#line 2623 "VBNET.ATG"
name = t.val;
break;
}
case 105: {
lexer.NextToken();
-#line 2626 "VBNET.ATG"
+#line 2624 "VBNET.ATG"
name = t.val;
break;
}
case 106: {
lexer.NextToken();
-#line 2627 "VBNET.ATG"
+#line 2625 "VBNET.ATG"
name = t.val;
break;
}
case 107: {
lexer.NextToken();
-#line 2628 "VBNET.ATG"
+#line 2626 "VBNET.ATG"
name = t.val;
break;
}
case 108: {
lexer.NextToken();
-#line 2629 "VBNET.ATG"
+#line 2627 "VBNET.ATG"
name = t.val;
break;
}
case 109: {
lexer.NextToken();
-#line 2630 "VBNET.ATG"
+#line 2628 "VBNET.ATG"
name = t.val;
break;
}
case 110: {
lexer.NextToken();
-#line 2631 "VBNET.ATG"
+#line 2629 "VBNET.ATG"
name = t.val;
break;
}
case 111: {
lexer.NextToken();
-#line 2632 "VBNET.ATG"
+#line 2630 "VBNET.ATG"
name = t.val;
break;
}
case 112: {
lexer.NextToken();
-#line 2633 "VBNET.ATG"
+#line 2631 "VBNET.ATG"
name = t.val;
break;
}
case 113: {
lexer.NextToken();
-#line 2634 "VBNET.ATG"
+#line 2632 "VBNET.ATG"
name = t.val;
break;
}
case 114: {
lexer.NextToken();
-#line 2635 "VBNET.ATG"
+#line 2633 "VBNET.ATG"
name = t.val;
break;
}
case 115: {
lexer.NextToken();
-#line 2636 "VBNET.ATG"
+#line 2634 "VBNET.ATG"
name = t.val;
break;
}
case 116: {
lexer.NextToken();
-#line 2637 "VBNET.ATG"
+#line 2635 "VBNET.ATG"
name = t.val;
break;
}
case 117: {
lexer.NextToken();
-#line 2638 "VBNET.ATG"
+#line 2636 "VBNET.ATG"
name = t.val;
break;
}
case 118: {
lexer.NextToken();
-#line 2639 "VBNET.ATG"
+#line 2637 "VBNET.ATG"
name = t.val;
break;
}
case 119: {
lexer.NextToken();
-#line 2640 "VBNET.ATG"
+#line 2638 "VBNET.ATG"
name = t.val;
break;
}
case 120: {
lexer.NextToken();
-#line 2641 "VBNET.ATG"
+#line 2639 "VBNET.ATG"
name = t.val;
break;
}
case 121: {
lexer.NextToken();
-#line 2642 "VBNET.ATG"
+#line 2640 "VBNET.ATG"
name = t.val;
break;
}
case 122: {
lexer.NextToken();
-#line 2643 "VBNET.ATG"
+#line 2641 "VBNET.ATG"
name = t.val;
break;
}
case 123: {
lexer.NextToken();
-#line 2644 "VBNET.ATG"
+#line 2642 "VBNET.ATG"
name = t.val;
break;
}
case 124: {
lexer.NextToken();
-#line 2645 "VBNET.ATG"
+#line 2643 "VBNET.ATG"
name = t.val;
break;
}
case 125: {
lexer.NextToken();
-#line 2646 "VBNET.ATG"
+#line 2644 "VBNET.ATG"
name = t.val;
break;
}
case 126: {
lexer.NextToken();
-#line 2647 "VBNET.ATG"
+#line 2645 "VBNET.ATG"
name = t.val;
break;
}
case 127: {
lexer.NextToken();
-#line 2648 "VBNET.ATG"
+#line 2646 "VBNET.ATG"
name = t.val;
break;
}
case 128: {
lexer.NextToken();
-#line 2649 "VBNET.ATG"
+#line 2647 "VBNET.ATG"
name = t.val;
break;
}
case 129: {
lexer.NextToken();
-#line 2650 "VBNET.ATG"
+#line 2648 "VBNET.ATG"
name = t.val;
break;
}
case 130: {
lexer.NextToken();
-#line 2651 "VBNET.ATG"
+#line 2649 "VBNET.ATG"
name = t.val;
break;
}
case 131: {
lexer.NextToken();
-#line 2652 "VBNET.ATG"
+#line 2650 "VBNET.ATG"
name = t.val;
break;
}
case 132: {
lexer.NextToken();
-#line 2653 "VBNET.ATG"
+#line 2651 "VBNET.ATG"
name = t.val;
break;
}
case 134: {
lexer.NextToken();
-#line 2654 "VBNET.ATG"
+#line 2652 "VBNET.ATG"
name = t.val;
break;
}
case 135: {
lexer.NextToken();
-#line 2655 "VBNET.ATG"
+#line 2653 "VBNET.ATG"
name = t.val;
break;
}
case 136: {
lexer.NextToken();
-#line 2656 "VBNET.ATG"
+#line 2654 "VBNET.ATG"
name = t.val;
break;
}
case 137: {
lexer.NextToken();
-#line 2657 "VBNET.ATG"
+#line 2655 "VBNET.ATG"
name = t.val;
break;
}
case 138: {
lexer.NextToken();
-#line 2658 "VBNET.ATG"
+#line 2656 "VBNET.ATG"
name = t.val;
break;
}
case 139: {
lexer.NextToken();
-#line 2659 "VBNET.ATG"
+#line 2657 "VBNET.ATG"
name = t.val;
break;
}
case 140: {
lexer.NextToken();
-#line 2660 "VBNET.ATG"
+#line 2658 "VBNET.ATG"
name = t.val;
break;
}
case 142: {
lexer.NextToken();
-#line 2661 "VBNET.ATG"
+#line 2659 "VBNET.ATG"
name = t.val;
break;
}
case 143: {
lexer.NextToken();
-#line 2662 "VBNET.ATG"
+#line 2660 "VBNET.ATG"
name = t.val;
break;
}
case 144: {
lexer.NextToken();
-#line 2663 "VBNET.ATG"
+#line 2661 "VBNET.ATG"
name = t.val;
break;
}
case 145: {
lexer.NextToken();
-#line 2664 "VBNET.ATG"
+#line 2662 "VBNET.ATG"
name = t.val;
break;
}
case 146: {
lexer.NextToken();
-#line 2665 "VBNET.ATG"
+#line 2663 "VBNET.ATG"
name = t.val;
break;
}
case 147: {
lexer.NextToken();
-#line 2666 "VBNET.ATG"
+#line 2664 "VBNET.ATG"
name = t.val;
break;
}
case 148: {
lexer.NextToken();
-#line 2667 "VBNET.ATG"
+#line 2665 "VBNET.ATG"
name = t.val;
break;
}
case 149: {
lexer.NextToken();
-#line 2668 "VBNET.ATG"
+#line 2666 "VBNET.ATG"
name = t.val;
break;
}
case 150: {
lexer.NextToken();
-#line 2669 "VBNET.ATG"
+#line 2667 "VBNET.ATG"
name = t.val;
break;
}
case 151: {
lexer.NextToken();
-#line 2670 "VBNET.ATG"
+#line 2668 "VBNET.ATG"
name = t.val;
break;
}
case 152: {
lexer.NextToken();
-#line 2671 "VBNET.ATG"
+#line 2669 "VBNET.ATG"
name = t.val;
break;
}
case 153: {
lexer.NextToken();
-#line 2672 "VBNET.ATG"
+#line 2670 "VBNET.ATG"
name = t.val;
break;
}
case 154: {
lexer.NextToken();
-#line 2673 "VBNET.ATG"
+#line 2671 "VBNET.ATG"
name = t.val;
break;
}
case 155: {
lexer.NextToken();
-#line 2674 "VBNET.ATG"
+#line 2672 "VBNET.ATG"
name = t.val;
break;
}
case 156: {
lexer.NextToken();
-#line 2675 "VBNET.ATG"
+#line 2673 "VBNET.ATG"
name = t.val;
break;
}
case 157: {
lexer.NextToken();
-#line 2676 "VBNET.ATG"
+#line 2674 "VBNET.ATG"
name = t.val;
break;
}
case 158: {
lexer.NextToken();
-#line 2677 "VBNET.ATG"
+#line 2675 "VBNET.ATG"
name = t.val;
break;
}
case 159: {
lexer.NextToken();
-#line 2678 "VBNET.ATG"
+#line 2676 "VBNET.ATG"
name = t.val;
break;
}
case 160: {
lexer.NextToken();
-#line 2679 "VBNET.ATG"
+#line 2677 "VBNET.ATG"
name = t.val;
break;
}
case 161: {
lexer.NextToken();
-#line 2680 "VBNET.ATG"
+#line 2678 "VBNET.ATG"
name = t.val;
break;
}
case 162: {
lexer.NextToken();
-#line 2681 "VBNET.ATG"
+#line 2679 "VBNET.ATG"
name = t.val;
break;
}
case 163: {
lexer.NextToken();
-#line 2682 "VBNET.ATG"
+#line 2680 "VBNET.ATG"
name = t.val;
break;
}
case 165: {
lexer.NextToken();
-#line 2683 "VBNET.ATG"
+#line 2681 "VBNET.ATG"
name = t.val;
break;
}
case 166: {
lexer.NextToken();
-#line 2684 "VBNET.ATG"
+#line 2682 "VBNET.ATG"
name = t.val;
break;
}
case 167: {
lexer.NextToken();
-#line 2685 "VBNET.ATG"
+#line 2683 "VBNET.ATG"
name = t.val;
break;
}
case 168: {
lexer.NextToken();
-#line 2686 "VBNET.ATG"
+#line 2684 "VBNET.ATG"
name = t.val;
break;
}
case 170: {
lexer.NextToken();
-#line 2687 "VBNET.ATG"
+#line 2685 "VBNET.ATG"
name = t.val;
break;
}
case 171: {
lexer.NextToken();
-#line 2688 "VBNET.ATG"
+#line 2686 "VBNET.ATG"
name = t.val;
break;
}
case 172: {
lexer.NextToken();
-#line 2689 "VBNET.ATG"
+#line 2687 "VBNET.ATG"
name = t.val;
break;
}
case 173: {
lexer.NextToken();
-#line 2690 "VBNET.ATG"
+#line 2688 "VBNET.ATG"
name = t.val;
break;
}
case 174: {
lexer.NextToken();
-#line 2691 "VBNET.ATG"
+#line 2689 "VBNET.ATG"
name = t.val;
break;
}
case 175: {
lexer.NextToken();
-#line 2692 "VBNET.ATG"
+#line 2690 "VBNET.ATG"
name = t.val;
break;
}
case 176: {
lexer.NextToken();
-#line 2693 "VBNET.ATG"
+#line 2691 "VBNET.ATG"
name = t.val;
break;
}
case 177: {
lexer.NextToken();
-#line 2694 "VBNET.ATG"
+#line 2692 "VBNET.ATG"
name = t.val;
break;
}
case 178: {
lexer.NextToken();
-#line 2695 "VBNET.ATG"
+#line 2693 "VBNET.ATG"
name = t.val;
break;
}
case 179: {
lexer.NextToken();
-#line 2696 "VBNET.ATG"
+#line 2694 "VBNET.ATG"
name = t.val;
break;
}
case 180: {
lexer.NextToken();
-#line 2697 "VBNET.ATG"
+#line 2695 "VBNET.ATG"
name = t.val;
break;
}
case 181: {
lexer.NextToken();
-#line 2698 "VBNET.ATG"
+#line 2696 "VBNET.ATG"
name = t.val;
break;
}
case 182: {
lexer.NextToken();
-#line 2699 "VBNET.ATG"
+#line 2697 "VBNET.ATG"
name = t.val;
break;
}
case 183: {
lexer.NextToken();
-#line 2700 "VBNET.ATG"
+#line 2698 "VBNET.ATG"
name = t.val;
break;
}
case 184: {
lexer.NextToken();
-#line 2701 "VBNET.ATG"
+#line 2699 "VBNET.ATG"
name = t.val;
break;
}
case 185: {
lexer.NextToken();
-#line 2702 "VBNET.ATG"
+#line 2700 "VBNET.ATG"
name = t.val;
break;
}
case 186: {
lexer.NextToken();
-#line 2703 "VBNET.ATG"
+#line 2701 "VBNET.ATG"
name = t.val;
break;
}
case 187: {
lexer.NextToken();
-#line 2704 "VBNET.ATG"
+#line 2702 "VBNET.ATG"
name = t.val;
break;
}
case 188: {
lexer.NextToken();
-#line 2705 "VBNET.ATG"
+#line 2703 "VBNET.ATG"
name = t.val;
break;
}
case 189: {
lexer.NextToken();
-#line 2706 "VBNET.ATG"
+#line 2704 "VBNET.ATG"
name = t.val;
break;
}
case 190: {
lexer.NextToken();
-#line 2707 "VBNET.ATG"
+#line 2705 "VBNET.ATG"
name = t.val;
break;
}
case 191: {
lexer.NextToken();
-#line 2708 "VBNET.ATG"
+#line 2706 "VBNET.ATG"
name = t.val;
break;
}
case 192: {
lexer.NextToken();
-#line 2709 "VBNET.ATG"
+#line 2707 "VBNET.ATG"
name = t.val;
break;
}
case 193: {
lexer.NextToken();
-#line 2710 "VBNET.ATG"
+#line 2708 "VBNET.ATG"
name = t.val;
break;
}
case 196: {
lexer.NextToken();
-#line 2711 "VBNET.ATG"
+#line 2709 "VBNET.ATG"
name = t.val;
break;
}
case 197: {
lexer.NextToken();
-#line 2712 "VBNET.ATG"
+#line 2710 "VBNET.ATG"
name = t.val;
break;
}
case 198: {
lexer.NextToken();
-#line 2713 "VBNET.ATG"
+#line 2711 "VBNET.ATG"
name = t.val;
break;
}
case 199: {
lexer.NextToken();
-#line 2714 "VBNET.ATG"
+#line 2712 "VBNET.ATG"
name = t.val;
break;
}
@@ -4397,94 +4396,94 @@ out string name) {
}
void CastTarget(
-#line 1542 "VBNET.ATG"
+#line 1540 "VBNET.ATG"
out TypeReference type) {
-#line 1544 "VBNET.ATG"
+#line 1542 "VBNET.ATG"
type = null;
switch (la.kind) {
case 58: {
lexer.NextToken();
-#line 1546 "VBNET.ATG"
+#line 1544 "VBNET.ATG"
type = new TypeReference("System.Boolean");
break;
}
case 59: {
lexer.NextToken();
-#line 1547 "VBNET.ATG"
+#line 1545 "VBNET.ATG"
type = new TypeReference("System.Byte");
break;
}
case 60: {
lexer.NextToken();
-#line 1548 "VBNET.ATG"
+#line 1546 "VBNET.ATG"
type = new TypeReference("System.Char");
break;
}
case 61: {
lexer.NextToken();
-#line 1549 "VBNET.ATG"
+#line 1547 "VBNET.ATG"
type = new TypeReference("System.DateTime");
break;
}
case 63: {
lexer.NextToken();
-#line 1550 "VBNET.ATG"
+#line 1548 "VBNET.ATG"
type = new TypeReference("System.Decimal");
break;
}
case 62: {
lexer.NextToken();
-#line 1551 "VBNET.ATG"
+#line 1549 "VBNET.ATG"
type = new TypeReference("System.Double");
break;
}
case 65: {
lexer.NextToken();
-#line 1552 "VBNET.ATG"
+#line 1550 "VBNET.ATG"
type = new TypeReference("System.Int32");
break;
}
case 67: {
lexer.NextToken();
-#line 1553 "VBNET.ATG"
+#line 1551 "VBNET.ATG"
type = new TypeReference("System.Int64");
break;
}
case 68: {
lexer.NextToken();
-#line 1554 "VBNET.ATG"
+#line 1552 "VBNET.ATG"
type = new TypeReference("System.Object");
break;
}
case 71: {
lexer.NextToken();
-#line 1555 "VBNET.ATG"
+#line 1553 "VBNET.ATG"
type = new TypeReference("System.Int16");
break;
}
case 72: {
lexer.NextToken();
-#line 1556 "VBNET.ATG"
+#line 1554 "VBNET.ATG"
type = new TypeReference("System.Single");
break;
}
case 73: {
lexer.NextToken();
-#line 1557 "VBNET.ATG"
+#line 1555 "VBNET.ATG"
type = new TypeReference("System.String");
break;
}
@@ -4493,465 +4492,465 @@ out TypeReference type) {
}
void Argument(
-#line 1718 "VBNET.ATG"
+#line 1716 "VBNET.ATG"
out Expression argumentexpr) {
-#line 1720 "VBNET.ATG"
+#line 1718 "VBNET.ATG"
Expression expr;
argumentexpr = null;
string name;
if (
-#line 1724 "VBNET.ATG"
+#line 1722 "VBNET.ATG"
IsNamedAssign()) {
Identifier();
-#line 1724 "VBNET.ATG"
+#line 1722 "VBNET.ATG"
name = t.val;
Expect(13);
Expect(11);
Expr(
-#line 1724 "VBNET.ATG"
+#line 1722 "VBNET.ATG"
out expr);
-#line 1726 "VBNET.ATG"
+#line 1724 "VBNET.ATG"
argumentexpr = new NamedArgumentExpression(name, expr);
} else if (StartOf(18)) {
Expr(
-#line 1729 "VBNET.ATG"
+#line 1727 "VBNET.ATG"
out argumentexpr);
} else SynErr(236);
}
void ConditionalAndExpr(
-#line 1565 "VBNET.ATG"
+#line 1563 "VBNET.ATG"
out Expression outExpr) {
-#line 1566 "VBNET.ATG"
+#line 1564 "VBNET.ATG"
Expression expr;
InclusiveOrExpr(
-#line 1567 "VBNET.ATG"
+#line 1565 "VBNET.ATG"
out outExpr);
while (la.kind == 45) {
lexer.NextToken();
InclusiveOrExpr(
-#line 1567 "VBNET.ATG"
+#line 1565 "VBNET.ATG"
out expr);
-#line 1567 "VBNET.ATG"
+#line 1565 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalAnd, expr);
}
}
void InclusiveOrExpr(
-#line 1570 "VBNET.ATG"
+#line 1568 "VBNET.ATG"
out Expression outExpr) {
-#line 1571 "VBNET.ATG"
+#line 1569 "VBNET.ATG"
Expression expr;
ExclusiveOrExpr(
-#line 1572 "VBNET.ATG"
+#line 1570 "VBNET.ATG"
out outExpr);
while (la.kind == 185) {
lexer.NextToken();
ExclusiveOrExpr(
-#line 1572 "VBNET.ATG"
+#line 1570 "VBNET.ATG"
out expr);
-#line 1572 "VBNET.ATG"
+#line 1570 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr);
}
}
void ExclusiveOrExpr(
-#line 1575 "VBNET.ATG"
+#line 1573 "VBNET.ATG"
out Expression outExpr) {
-#line 1576 "VBNET.ATG"
+#line 1574 "VBNET.ATG"
Expression expr;
AndExpr(
-#line 1577 "VBNET.ATG"
+#line 1575 "VBNET.ATG"
out outExpr);
while (la.kind == 137) {
lexer.NextToken();
AndExpr(
-#line 1577 "VBNET.ATG"
+#line 1575 "VBNET.ATG"
out expr);
-#line 1577 "VBNET.ATG"
+#line 1575 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr);
}
}
void AndExpr(
-#line 1580 "VBNET.ATG"
+#line 1578 "VBNET.ATG"
out Expression outExpr) {
-#line 1581 "VBNET.ATG"
+#line 1579 "VBNET.ATG"
Expression expr;
NotExpr(
-#line 1582 "VBNET.ATG"
+#line 1580 "VBNET.ATG"
out outExpr);
while (la.kind == 44) {
lexer.NextToken();
NotExpr(
-#line 1582 "VBNET.ATG"
+#line 1580 "VBNET.ATG"
out expr);
-#line 1582 "VBNET.ATG"
+#line 1580 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr);
}
}
void NotExpr(
-#line 1585 "VBNET.ATG"
+#line 1583 "VBNET.ATG"
out Expression outExpr) {
-#line 1586 "VBNET.ATG"
+#line 1584 "VBNET.ATG"
UnaryOperatorType uop = UnaryOperatorType.None;
while (la.kind == 128) {
lexer.NextToken();
-#line 1587 "VBNET.ATG"
+#line 1585 "VBNET.ATG"
uop = UnaryOperatorType.Not;
}
EqualityExpr(
-#line 1588 "VBNET.ATG"
+#line 1586 "VBNET.ATG"
out outExpr);
-#line 1589 "VBNET.ATG"
+#line 1587 "VBNET.ATG"
if (uop != UnaryOperatorType.None)
outExpr = new UnaryOperatorExpression(outExpr, uop);
}
void EqualityExpr(
-#line 1594 "VBNET.ATG"
+#line 1592 "VBNET.ATG"
out Expression outExpr) {
-#line 1596 "VBNET.ATG"
+#line 1594 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
RelationalExpr(
-#line 1599 "VBNET.ATG"
+#line 1597 "VBNET.ATG"
out outExpr);
while (la.kind == 11 || la.kind == 27 || la.kind == 115) {
if (la.kind == 27) {
lexer.NextToken();
-#line 1602 "VBNET.ATG"
+#line 1600 "VBNET.ATG"
op = BinaryOperatorType.InEquality;
} else if (la.kind == 11) {
lexer.NextToken();
-#line 1603 "VBNET.ATG"
+#line 1601 "VBNET.ATG"
op = BinaryOperatorType.Equality;
} else {
lexer.NextToken();
-#line 1604 "VBNET.ATG"
+#line 1602 "VBNET.ATG"
op = BinaryOperatorType.Like;
}
RelationalExpr(
-#line 1606 "VBNET.ATG"
+#line 1604 "VBNET.ATG"
out expr);
-#line 1606 "VBNET.ATG"
+#line 1604 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void RelationalExpr(
-#line 1610 "VBNET.ATG"
+#line 1608 "VBNET.ATG"
out Expression outExpr) {
-#line 1612 "VBNET.ATG"
+#line 1610 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
ShiftExpr(
-#line 1615 "VBNET.ATG"
+#line 1613 "VBNET.ATG"
out outExpr);
while (StartOf(24)) {
if (StartOf(25)) {
if (la.kind == 26) {
lexer.NextToken();
-#line 1618 "VBNET.ATG"
+#line 1616 "VBNET.ATG"
op = BinaryOperatorType.LessThan;
} else if (la.kind == 25) {
lexer.NextToken();
-#line 1619 "VBNET.ATG"
+#line 1617 "VBNET.ATG"
op = BinaryOperatorType.GreaterThan;
} else if (la.kind == 29) {
lexer.NextToken();
-#line 1620 "VBNET.ATG"
+#line 1618 "VBNET.ATG"
op = BinaryOperatorType.LessThanOrEqual;
} else if (la.kind == 28) {
lexer.NextToken();
-#line 1621 "VBNET.ATG"
+#line 1619 "VBNET.ATG"
op = BinaryOperatorType.GreaterThanOrEqual;
} else SynErr(237);
ShiftExpr(
-#line 1623 "VBNET.ATG"
+#line 1621 "VBNET.ATG"
out expr);
-#line 1623 "VBNET.ATG"
+#line 1621 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
} else {
if (la.kind == 112) {
lexer.NextToken();
-#line 1626 "VBNET.ATG"
+#line 1624 "VBNET.ATG"
op = BinaryOperatorType.ReferenceEquality;
} else if (la.kind == 189) {
lexer.NextToken();
-#line 1627 "VBNET.ATG"
+#line 1625 "VBNET.ATG"
op = BinaryOperatorType.ReferenceInequality;
} else SynErr(238);
Expr(
-#line 1628 "VBNET.ATG"
+#line 1626 "VBNET.ATG"
out expr);
-#line 1628 "VBNET.ATG"
+#line 1626 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
}
void ShiftExpr(
-#line 1632 "VBNET.ATG"
+#line 1630 "VBNET.ATG"
out Expression outExpr) {
-#line 1634 "VBNET.ATG"
+#line 1632 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
AdditiveExpr(
-#line 1637 "VBNET.ATG"
+#line 1635 "VBNET.ATG"
out outExpr);
while (la.kind == 30 || la.kind == 31) {
if (la.kind == 30) {
lexer.NextToken();
-#line 1640 "VBNET.ATG"
+#line 1638 "VBNET.ATG"
op = BinaryOperatorType.ShiftLeft;
} else {
lexer.NextToken();
-#line 1641 "VBNET.ATG"
+#line 1639 "VBNET.ATG"
op = BinaryOperatorType.ShiftRight;
}
AdditiveExpr(
-#line 1643 "VBNET.ATG"
+#line 1641 "VBNET.ATG"
out expr);
-#line 1643 "VBNET.ATG"
+#line 1641 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void AdditiveExpr(
-#line 1647 "VBNET.ATG"
+#line 1645 "VBNET.ATG"
out Expression outExpr) {
-#line 1649 "VBNET.ATG"
+#line 1647 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
MultiplicativeExpr(
-#line 1652 "VBNET.ATG"
+#line 1650 "VBNET.ATG"
out outExpr);
while (la.kind == 14 || la.kind == 15 || la.kind == 19) {
if (la.kind == 14) {
lexer.NextToken();
-#line 1655 "VBNET.ATG"
+#line 1653 "VBNET.ATG"
op = BinaryOperatorType.Add;
} else if (la.kind == 15) {
lexer.NextToken();
-#line 1656 "VBNET.ATG"
+#line 1654 "VBNET.ATG"
op = BinaryOperatorType.Subtract;
} else {
lexer.NextToken();
-#line 1657 "VBNET.ATG"
+#line 1655 "VBNET.ATG"
op = BinaryOperatorType.Concat;
}
MultiplicativeExpr(
-#line 1659 "VBNET.ATG"
+#line 1657 "VBNET.ATG"
out expr);
-#line 1659 "VBNET.ATG"
+#line 1657 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void MultiplicativeExpr(
-#line 1663 "VBNET.ATG"
+#line 1661 "VBNET.ATG"
out Expression outExpr) {
-#line 1665 "VBNET.ATG"
+#line 1663 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
UnaryExpr(
-#line 1668 "VBNET.ATG"
+#line 1666 "VBNET.ATG"
out outExpr);
while (StartOf(26)) {
if (la.kind == 16) {
lexer.NextToken();
-#line 1671 "VBNET.ATG"
+#line 1669 "VBNET.ATG"
op = BinaryOperatorType.Multiply;
} else if (la.kind == 17) {
lexer.NextToken();
-#line 1672 "VBNET.ATG"
+#line 1670 "VBNET.ATG"
op = BinaryOperatorType.Divide;
} else if (la.kind == 18) {
lexer.NextToken();
-#line 1673 "VBNET.ATG"
+#line 1671 "VBNET.ATG"
op = BinaryOperatorType.DivideInteger;
} else if (la.kind == 119) {
lexer.NextToken();
-#line 1674 "VBNET.ATG"
+#line 1672 "VBNET.ATG"
op = BinaryOperatorType.Modulus;
} else {
lexer.NextToken();
-#line 1675 "VBNET.ATG"
+#line 1673 "VBNET.ATG"
op = BinaryOperatorType.Power;
}
UnaryExpr(
-#line 1677 "VBNET.ATG"
+#line 1675 "VBNET.ATG"
out expr);
-#line 1677 "VBNET.ATG"
+#line 1675 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void NonArrayTypeName(
-#line 1746 "VBNET.ATG"
+#line 1744 "VBNET.ATG"
out TypeReference typeref) {
-#line 1748 "VBNET.ATG"
+#line 1746 "VBNET.ATG"
string name;
typeref = null;
if (StartOf(10)) {
Qualident(
-#line 1751 "VBNET.ATG"
+#line 1749 "VBNET.ATG"
out name);
-#line 1751 "VBNET.ATG"
+#line 1749 "VBNET.ATG"
typeref = new TypeReference(name);
if (
-#line 1752 "VBNET.ATG"
+#line 1750 "VBNET.ATG"
la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) {
lexer.NextToken();
Expect(196);
TypeArgumentList(
-#line 1753 "VBNET.ATG"
+#line 1751 "VBNET.ATG"
typeref.GenericTypes);
Expect(24);
}
} else if (la.kind == 132) {
lexer.NextToken();
-#line 1755 "VBNET.ATG"
+#line 1753 "VBNET.ATG"
typeref = new TypeReference("System.Object");
} else if (la.kind == 194) {
lexer.NextToken();
Expect(10);
Qualident(
-#line 1756 "VBNET.ATG"
+#line 1754 "VBNET.ATG"
out name);
-#line 1757 "VBNET.ATG"
+#line 1755 "VBNET.ATG"
typeref = new TypeReference(name); typeref.IsGlobal = true;
if (
-#line 1758 "VBNET.ATG"
+#line 1756 "VBNET.ATG"
la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) {
lexer.NextToken();
Expect(196);
TypeArgumentList(
-#line 1759 "VBNET.ATG"
+#line 1757 "VBNET.ATG"
typeref.GenericTypes);
Expect(24);
}
} else if (StartOf(21)) {
PrimitiveTypeName(
-#line 1761 "VBNET.ATG"
+#line 1759 "VBNET.ATG"
out name);
-#line 1761 "VBNET.ATG"
+#line 1759 "VBNET.ATG"
typeref = new TypeReference(name);
} else SynErr(239);
}
void ArgumentList(
-#line 1703 "VBNET.ATG"
+#line 1701 "VBNET.ATG"
out ArrayList arguments) {
-#line 1705 "VBNET.ATG"
+#line 1703 "VBNET.ATG"
arguments = new ArrayList();
Expression expr = null;
if (StartOf(18)) {
Argument(
-#line 1709 "VBNET.ATG"
+#line 1707 "VBNET.ATG"
out expr);
-#line 1709 "VBNET.ATG"
+#line 1707 "VBNET.ATG"
if (expr != null) { arguments.Add(expr); }
while (la.kind == 12) {
lexer.NextToken();
Argument(
-#line 1712 "VBNET.ATG"
+#line 1710 "VBNET.ATG"
out expr);
-#line 1712 "VBNET.ATG"
+#line 1710 "VBNET.ATG"
if (expr != null) { arguments.Add(expr); }
}
}
}
void ArrayTypeModifiers(
-#line 1774 "VBNET.ATG"
+#line 1772 "VBNET.ATG"
out ArrayList arrayModifiers) {
-#line 1776 "VBNET.ATG"
+#line 1774 "VBNET.ATG"
arrayModifiers = new ArrayList();
int i = 0;
while (
-#line 1779 "VBNET.ATG"
+#line 1777 "VBNET.ATG"
IsDims()) {
Expect(23);
if (la.kind == 12 || la.kind == 24) {
RankList(
-#line 1781 "VBNET.ATG"
+#line 1779 "VBNET.ATG"
out i);
}
-#line 1783 "VBNET.ATG"
+#line 1781 "VBNET.ATG"
arrayModifiers.Add(i);
Expect(24);
}
-#line 1788 "VBNET.ATG"
+#line 1786 "VBNET.ATG"
if(arrayModifiers.Count == 0) {
arrayModifiers = null;
}
@@ -4959,89 +4958,89 @@ out i);
}
void TypeArgumentList(
-#line 1801 "VBNET.ATG"
+#line 1799 "VBNET.ATG"
List typeArguments) {
-#line 1803 "VBNET.ATG"
+#line 1801 "VBNET.ATG"
TypeReference typeref;
TypeName(
-#line 1805 "VBNET.ATG"
+#line 1803 "VBNET.ATG"
out typeref);
-#line 1805 "VBNET.ATG"
+#line 1803 "VBNET.ATG"
if (typeref != null) typeArguments.Add(typeref);
while (la.kind == 12) {
lexer.NextToken();
TypeName(
-#line 1808 "VBNET.ATG"
+#line 1806 "VBNET.ATG"
out typeref);
-#line 1808 "VBNET.ATG"
+#line 1806 "VBNET.ATG"
if (typeref != null) typeArguments.Add(typeref);
}
}
void RankList(
-#line 1795 "VBNET.ATG"
+#line 1793 "VBNET.ATG"
out int i) {
-#line 1796 "VBNET.ATG"
+#line 1794 "VBNET.ATG"
i = 0;
while (la.kind == 12) {
lexer.NextToken();
-#line 1797 "VBNET.ATG"
+#line 1795 "VBNET.ATG"
++i;
}
}
void Attribute(
-#line 1833 "VBNET.ATG"
+#line 1831 "VBNET.ATG"
out ICSharpCode.NRefactory.Parser.AST.Attribute attribute) {
-#line 1834 "VBNET.ATG"
+#line 1832 "VBNET.ATG"
string name;
Qualident(
-#line 1835 "VBNET.ATG"
+#line 1833 "VBNET.ATG"
out name);
-#line 1836 "VBNET.ATG"
+#line 1834 "VBNET.ATG"
List positional = new List();
List named = new List();
if (la.kind == 23) {
AttributeArguments(
-#line 1839 "VBNET.ATG"
+#line 1837 "VBNET.ATG"
positional, named);
}
-#line 1841 "VBNET.ATG"
+#line 1839 "VBNET.ATG"
attribute = new ICSharpCode.NRefactory.Parser.AST.Attribute(name, positional, named);
}
void AttributeArguments(
-#line 1846 "VBNET.ATG"
+#line 1844 "VBNET.ATG"
List positional, List named) {
-#line 1848 "VBNET.ATG"
+#line 1846 "VBNET.ATG"
bool nameFound = false;
string name = "";
Expression expr;
Expect(23);
if (
-#line 1854 "VBNET.ATG"
+#line 1852 "VBNET.ATG"
IsNotClosingParenthesis()) {
if (
-#line 1856 "VBNET.ATG"
+#line 1854 "VBNET.ATG"
IsNamedAssign()) {
-#line 1856 "VBNET.ATG"
+#line 1854 "VBNET.ATG"
nameFound = true;
IdentifierOrKeyword(
-#line 1857 "VBNET.ATG"
+#line 1855 "VBNET.ATG"
out name);
if (la.kind == 13) {
lexer.NextToken();
@@ -5049,10 +5048,10 @@ out name);
Expect(11);
}
Expr(
-#line 1859 "VBNET.ATG"
+#line 1857 "VBNET.ATG"
out expr);
-#line 1861 "VBNET.ATG"
+#line 1859 "VBNET.ATG"
if (expr != null) { if(name == "") positional.Add(expr);
else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
}
@@ -5060,13 +5059,13 @@ out expr);
while (la.kind == 12) {
lexer.NextToken();
if (
-#line 1868 "VBNET.ATG"
+#line 1866 "VBNET.ATG"
IsNamedAssign()) {
-#line 1868 "VBNET.ATG"
+#line 1866 "VBNET.ATG"
nameFound = true;
IdentifierOrKeyword(
-#line 1869 "VBNET.ATG"
+#line 1867 "VBNET.ATG"
out name);
if (la.kind == 13) {
lexer.NextToken();
@@ -5074,14 +5073,14 @@ out name);
Expect(11);
} else if (StartOf(18)) {
-#line 1871 "VBNET.ATG"
+#line 1869 "VBNET.ATG"
if (nameFound) Error("no positional argument after named argument");
} else SynErr(240);
Expr(
-#line 1872 "VBNET.ATG"
+#line 1870 "VBNET.ATG"
out expr);
-#line 1872 "VBNET.ATG"
+#line 1870 "VBNET.ATG"
if (expr != null) { if(name == "") positional.Add(expr);
else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
}
@@ -5092,10 +5091,10 @@ out expr);
}
void FormalParameter(
-#line 1941 "VBNET.ATG"
+#line 1939 "VBNET.ATG"
out ParameterDeclarationExpression p) {
-#line 1943 "VBNET.ATG"
+#line 1941 "VBNET.ATG"
TypeReference type = null;
ParamModifiers mod = new ParamModifiers(this);
Expression expr = null;
@@ -5103,28 +5102,28 @@ out ParameterDeclarationExpression p) {
while (StartOf(27)) {
ParameterModifier(
-#line 1948 "VBNET.ATG"
+#line 1946 "VBNET.ATG"
mod);
}
Identifier();
-#line 1949 "VBNET.ATG"
+#line 1947 "VBNET.ATG"
string parameterName = t.val;
if (
-#line 1950 "VBNET.ATG"
+#line 1948 "VBNET.ATG"
IsDims()) {
ArrayTypeModifiers(
-#line 1950 "VBNET.ATG"
+#line 1948 "VBNET.ATG"
out arrayModifiers);
}
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 1951 "VBNET.ATG"
+#line 1949 "VBNET.ATG"
out type);
}
-#line 1953 "VBNET.ATG"
+#line 1951 "VBNET.ATG"
if(type != null) {
if (arrayModifiers != null) {
if (type.RankSpecifier != null) {
@@ -5140,45 +5139,45 @@ out type);
if (la.kind == 11) {
lexer.NextToken();
Expr(
-#line 1965 "VBNET.ATG"
+#line 1963 "VBNET.ATG"
out expr);
}
-#line 1967 "VBNET.ATG"
+#line 1965 "VBNET.ATG"
mod.Check();
p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr);
}
void ParameterModifier(
-#line 2739 "VBNET.ATG"
+#line 2737 "VBNET.ATG"
ParamModifiers m) {
if (la.kind == 54) {
lexer.NextToken();
-#line 2740 "VBNET.ATG"
+#line 2738 "VBNET.ATG"
m.Add(ParamModifier.In);
} else if (la.kind == 52) {
lexer.NextToken();
-#line 2741 "VBNET.ATG"
+#line 2739 "VBNET.ATG"
m.Add(ParamModifier.Ref);
} else if (la.kind == 136) {
lexer.NextToken();
-#line 2742 "VBNET.ATG"
+#line 2740 "VBNET.ATG"
m.Add(ParamModifier.Optional);
} else if (la.kind == 143) {
lexer.NextToken();
-#line 2743 "VBNET.ATG"
+#line 2741 "VBNET.ATG"
m.Add(ParamModifier.Params);
} else SynErr(241);
}
void Statement() {
-#line 1995 "VBNET.ATG"
+#line 1993 "VBNET.ATG"
Statement stmt = null;
Point startPos = la.Location;
string label = String.Empty;
@@ -5186,34 +5185,34 @@ ParamModifiers m) {
if (la.kind == 1 || la.kind == 13) {
} else if (
-#line 2001 "VBNET.ATG"
+#line 1999 "VBNET.ATG"
IsLabel()) {
LabelName(
-#line 2001 "VBNET.ATG"
+#line 1999 "VBNET.ATG"
out label);
-#line 2003 "VBNET.ATG"
+#line 2001 "VBNET.ATG"
compilationUnit.AddChild(new LabelStatement(t.val));
Expect(13);
Statement();
} else if (StartOf(28)) {
EmbeddedStatement(
-#line 2006 "VBNET.ATG"
+#line 2004 "VBNET.ATG"
out stmt);
-#line 2006 "VBNET.ATG"
+#line 2004 "VBNET.ATG"
compilationUnit.AddChild(stmt);
} else if (StartOf(29)) {
LocalDeclarationStatement(
-#line 2007 "VBNET.ATG"
+#line 2005 "VBNET.ATG"
out stmt);
-#line 2007 "VBNET.ATG"
+#line 2005 "VBNET.ATG"
compilationUnit.AddChild(stmt);
} else SynErr(242);
-#line 2010 "VBNET.ATG"
+#line 2008 "VBNET.ATG"
if (stmt != null) {
stmt.StartLocation = startPos;
stmt.EndLocation = t.Location;
@@ -5222,30 +5221,30 @@ out stmt);
}
void LabelName(
-#line 2391 "VBNET.ATG"
+#line 2389 "VBNET.ATG"
out string name) {
-#line 2393 "VBNET.ATG"
+#line 2391 "VBNET.ATG"
name = String.Empty;
if (StartOf(10)) {
Identifier();
-#line 2395 "VBNET.ATG"
+#line 2393 "VBNET.ATG"
name = t.val;
} else if (la.kind == 5) {
lexer.NextToken();
-#line 2396 "VBNET.ATG"
+#line 2394 "VBNET.ATG"
name = t.val;
} else SynErr(243);
}
void EmbeddedStatement(
-#line 2049 "VBNET.ATG"
+#line 2047 "VBNET.ATG"
out Statement statement) {
-#line 2051 "VBNET.ATG"
+#line 2049 "VBNET.ATG"
Statement embeddedStatement = null;
statement = null;
Expression expr = null;
@@ -5255,103 +5254,103 @@ out Statement statement) {
case 93: {
lexer.NextToken();
-#line 2056 "VBNET.ATG"
+#line 2054 "VBNET.ATG"
ExitType exitType = ExitType.None;
switch (la.kind) {
case 167: {
lexer.NextToken();
-#line 2058 "VBNET.ATG"
+#line 2056 "VBNET.ATG"
exitType = ExitType.Sub;
break;
}
case 99: {
lexer.NextToken();
-#line 2060 "VBNET.ATG"
+#line 2058 "VBNET.ATG"
exitType = ExitType.Function;
break;
}
case 146: {
lexer.NextToken();
-#line 2062 "VBNET.ATG"
+#line 2060 "VBNET.ATG"
exitType = ExitType.Property;
break;
}
case 82: {
lexer.NextToken();
-#line 2064 "VBNET.ATG"
+#line 2062 "VBNET.ATG"
exitType = ExitType.Do;
break;
}
case 97: {
lexer.NextToken();
-#line 2066 "VBNET.ATG"
+#line 2064 "VBNET.ATG"
exitType = ExitType.For;
break;
}
case 174: {
lexer.NextToken();
-#line 2068 "VBNET.ATG"
+#line 2066 "VBNET.ATG"
exitType = ExitType.Try;
break;
}
case 181: {
lexer.NextToken();
-#line 2070 "VBNET.ATG"
+#line 2068 "VBNET.ATG"
exitType = ExitType.While;
break;
}
case 155: {
lexer.NextToken();
-#line 2072 "VBNET.ATG"
+#line 2070 "VBNET.ATG"
exitType = ExitType.Select;
break;
}
default: SynErr(244); break;
}
-#line 2074 "VBNET.ATG"
+#line 2072 "VBNET.ATG"
statement = new ExitStatement(exitType);
break;
}
case 174: {
TryStatement(
-#line 2075 "VBNET.ATG"
+#line 2073 "VBNET.ATG"
out statement);
break;
}
case 186: {
lexer.NextToken();
-#line 2076 "VBNET.ATG"
+#line 2074 "VBNET.ATG"
ContinueType continueType = ContinueType.None;
if (la.kind == 82 || la.kind == 97 || la.kind == 181) {
if (la.kind == 82) {
lexer.NextToken();
-#line 2076 "VBNET.ATG"
+#line 2074 "VBNET.ATG"
continueType = ContinueType.Do;
} else if (la.kind == 97) {
lexer.NextToken();
-#line 2076 "VBNET.ATG"
+#line 2074 "VBNET.ATG"
continueType = ContinueType.For;
} else {
lexer.NextToken();
-#line 2076 "VBNET.ATG"
+#line 2074 "VBNET.ATG"
continueType = ContinueType.While;
}
}
-#line 2076 "VBNET.ATG"
+#line 2074 "VBNET.ATG"
statement = new ContinueStatement(continueType);
break;
}
@@ -5359,11 +5358,11 @@ out statement);
lexer.NextToken();
if (StartOf(18)) {
Expr(
-#line 2078 "VBNET.ATG"
+#line 2076 "VBNET.ATG"
out expr);
}
-#line 2078 "VBNET.ATG"
+#line 2076 "VBNET.ATG"
statement = new ThrowStatement(expr);
break;
}
@@ -5371,27 +5370,27 @@ out expr);
lexer.NextToken();
if (StartOf(18)) {
Expr(
-#line 2080 "VBNET.ATG"
+#line 2078 "VBNET.ATG"
out expr);
}
-#line 2080 "VBNET.ATG"
+#line 2078 "VBNET.ATG"
statement = new ReturnStatement(expr);
break;
}
case 168: {
lexer.NextToken();
Expr(
-#line 2082 "VBNET.ATG"
+#line 2080 "VBNET.ATG"
out expr);
EndOfStmt();
Block(
-#line 2082 "VBNET.ATG"
+#line 2080 "VBNET.ATG"
out embeddedStatement);
Expect(87);
Expect(168);
-#line 2083 "VBNET.ATG"
+#line 2081 "VBNET.ATG"
statement = new LockStatement(expr, embeddedStatement);
break;
}
@@ -5399,42 +5398,42 @@ out embeddedStatement);
lexer.NextToken();
Identifier();
-#line 2085 "VBNET.ATG"
+#line 2083 "VBNET.ATG"
name = t.val;
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(17)) {
ArgumentList(
-#line 2086 "VBNET.ATG"
+#line 2084 "VBNET.ATG"
out p);
}
Expect(24);
}
-#line 2087 "VBNET.ATG"
+#line 2085 "VBNET.ATG"
statement = new RaiseEventStatement(name, p);
break;
}
case 182: {
WithStatement(
-#line 2089 "VBNET.ATG"
+#line 2087 "VBNET.ATG"
out statement);
break;
}
case 41: {
lexer.NextToken();
-#line 2091 "VBNET.ATG"
+#line 2089 "VBNET.ATG"
Expression handlerExpr = null;
Expr(
-#line 2092 "VBNET.ATG"
+#line 2090 "VBNET.ATG"
out expr);
Expect(12);
Expr(
-#line 2092 "VBNET.ATG"
+#line 2090 "VBNET.ATG"
out handlerExpr);
-#line 2094 "VBNET.ATG"
+#line 2092 "VBNET.ATG"
statement = new AddHandlerStatement(expr, handlerExpr);
break;
@@ -5442,17 +5441,17 @@ out handlerExpr);
case 152: {
lexer.NextToken();
-#line 2097 "VBNET.ATG"
+#line 2095 "VBNET.ATG"
Expression handlerExpr = null;
Expr(
-#line 2098 "VBNET.ATG"
+#line 2096 "VBNET.ATG"
out expr);
Expect(12);
Expr(
-#line 2098 "VBNET.ATG"
+#line 2096 "VBNET.ATG"
out handlerExpr);
-#line 2100 "VBNET.ATG"
+#line 2098 "VBNET.ATG"
statement = new RemoveHandlerStatement(expr, handlerExpr);
break;
@@ -5460,16 +5459,16 @@ out handlerExpr);
case 181: {
lexer.NextToken();
Expr(
-#line 2103 "VBNET.ATG"
+#line 2101 "VBNET.ATG"
out expr);
EndOfStmt();
Block(
-#line 2104 "VBNET.ATG"
+#line 2102 "VBNET.ATG"
out embeddedStatement);
Expect(87);
Expect(181);
-#line 2106 "VBNET.ATG"
+#line 2104 "VBNET.ATG"
statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start);
break;
@@ -5477,23 +5476,23 @@ out embeddedStatement);
case 82: {
lexer.NextToken();
-#line 2111 "VBNET.ATG"
+#line 2109 "VBNET.ATG"
ConditionType conditionType = ConditionType.None;
if (la.kind == 177 || la.kind == 181) {
WhileOrUntil(
-#line 2114 "VBNET.ATG"
+#line 2112 "VBNET.ATG"
out conditionType);
Expr(
-#line 2114 "VBNET.ATG"
+#line 2112 "VBNET.ATG"
out expr);
EndOfStmt();
Block(
-#line 2115 "VBNET.ATG"
+#line 2113 "VBNET.ATG"
out embeddedStatement);
Expect(117);
-#line 2118 "VBNET.ATG"
+#line 2116 "VBNET.ATG"
statement = new DoLoopStatement(expr,
embeddedStatement,
conditionType == ConditionType.While ? ConditionType.DoWhile : conditionType,
@@ -5502,19 +5501,19 @@ out embeddedStatement);
} else if (la.kind == 1 || la.kind == 13) {
EndOfStmt();
Block(
-#line 2125 "VBNET.ATG"
+#line 2123 "VBNET.ATG"
out embeddedStatement);
Expect(117);
if (la.kind == 177 || la.kind == 181) {
WhileOrUntil(
-#line 2126 "VBNET.ATG"
+#line 2124 "VBNET.ATG"
out conditionType);
Expr(
-#line 2126 "VBNET.ATG"
+#line 2124 "VBNET.ATG"
out expr);
}
-#line 2128 "VBNET.ATG"
+#line 2126 "VBNET.ATG"
statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End);
} else SynErr(245);
@@ -5523,7 +5522,7 @@ out expr);
case 97: {
lexer.NextToken();
-#line 2133 "VBNET.ATG"
+#line 2131 "VBNET.ATG"
Expression group = null;
TypeReference typeReference;
string typeName;
@@ -5532,24 +5531,24 @@ out expr);
if (la.kind == 84) {
lexer.NextToken();
LoopControlVariable(
-#line 2140 "VBNET.ATG"
+#line 2138 "VBNET.ATG"
out typeReference, out typeName);
Expect(108);
Expr(
-#line 2141 "VBNET.ATG"
+#line 2139 "VBNET.ATG"
out group);
EndOfStmt();
Block(
-#line 2142 "VBNET.ATG"
+#line 2140 "VBNET.ATG"
out embeddedStatement);
Expect(127);
if (StartOf(18)) {
Expr(
-#line 2143 "VBNET.ATG"
+#line 2141 "VBNET.ATG"
out expr);
}
-#line 2145 "VBNET.ATG"
+#line 2143 "VBNET.ATG"
statement = new ForeachStatement(typeReference,
typeName,
group,
@@ -5561,53 +5560,53 @@ out expr);
} else if (StartOf(10)) {
-#line 2156 "VBNET.ATG"
+#line 2154 "VBNET.ATG"
Expression start = null;
Expression end = null;
Expression step = null;
Expression nextExpr = null;ArrayList nextExpressions = null;
LoopControlVariable(
-#line 2161 "VBNET.ATG"
+#line 2159 "VBNET.ATG"
out typeReference, out typeName);
Expect(11);
Expr(
-#line 2162 "VBNET.ATG"
+#line 2160 "VBNET.ATG"
out start);
Expect(172);
Expr(
-#line 2162 "VBNET.ATG"
+#line 2160 "VBNET.ATG"
out end);
if (la.kind == 162) {
lexer.NextToken();
Expr(
-#line 2162 "VBNET.ATG"
+#line 2160 "VBNET.ATG"
out step);
}
EndOfStmt();
Block(
-#line 2163 "VBNET.ATG"
+#line 2161 "VBNET.ATG"
out embeddedStatement);
Expect(127);
if (StartOf(18)) {
Expr(
-#line 2166 "VBNET.ATG"
+#line 2164 "VBNET.ATG"
out nextExpr);
-#line 2166 "VBNET.ATG"
+#line 2164 "VBNET.ATG"
nextExpressions = new ArrayList(); nextExpressions.Add(nextExpr);
while (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 2167 "VBNET.ATG"
+#line 2165 "VBNET.ATG"
out nextExpr);
-#line 2167 "VBNET.ATG"
+#line 2165 "VBNET.ATG"
nextExpressions.Add(nextExpr);
}
}
-#line 2170 "VBNET.ATG"
+#line 2168 "VBNET.ATG"
statement = new ForNextStatement(typeReference, typeName, start, end, step, embeddedStatement, nextExpressions);
} else SynErr(246);
@@ -5616,29 +5615,29 @@ out nextExpr);
case 91: {
lexer.NextToken();
Expr(
-#line 2174 "VBNET.ATG"
+#line 2172 "VBNET.ATG"
out expr);
-#line 2174 "VBNET.ATG"
+#line 2172 "VBNET.ATG"
statement = new ErrorStatement(expr);
break;
}
case 151: {
lexer.NextToken();
-#line 2176 "VBNET.ATG"
+#line 2174 "VBNET.ATG"
Expression redimclause = null; bool isPreserve = false;
if (la.kind == 144) {
lexer.NextToken();
-#line 2176 "VBNET.ATG"
+#line 2174 "VBNET.ATG"
isPreserve = true;
}
Expr(
-#line 2177 "VBNET.ATG"
+#line 2175 "VBNET.ATG"
out redimclause);
-#line 2179 "VBNET.ATG"
+#line 2177 "VBNET.ATG"
ReDimStatement reDimStatement = new ReDimStatement(isPreserve);
statement = reDimStatement;
reDimStatement.ReDimClauses.Add(redimclause as InvocationExpression);
@@ -5646,10 +5645,10 @@ out redimclause);
while (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 2183 "VBNET.ATG"
+#line 2181 "VBNET.ATG"
out redimclause);
-#line 2183 "VBNET.ATG"
+#line 2181 "VBNET.ATG"
reDimStatement.ReDimClauses.Add(redimclause as InvocationExpression);
}
break;
@@ -5657,10 +5656,10 @@ out redimclause);
case 90: {
lexer.NextToken();
Expr(
-#line 2186 "VBNET.ATG"
+#line 2184 "VBNET.ATG"
out expr);
-#line 2187 "VBNET.ATG"
+#line 2185 "VBNET.ATG"
ArrayList arrays = new ArrayList();
if (expr != null) { arrays.Add(expr);}
EraseStatement eraseStatement = new EraseStatement(arrays);
@@ -5669,53 +5668,53 @@ out expr);
while (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 2192 "VBNET.ATG"
+#line 2190 "VBNET.ATG"
out expr);
-#line 2192 "VBNET.ATG"
+#line 2190 "VBNET.ATG"
if (expr != null) { arrays.Add(expr); }
}
-#line 2193 "VBNET.ATG"
+#line 2191 "VBNET.ATG"
statement = eraseStatement;
break;
}
case 163: {
lexer.NextToken();
-#line 2195 "VBNET.ATG"
+#line 2193 "VBNET.ATG"
statement = new StopStatement();
break;
}
case 105: {
lexer.NextToken();
Expr(
-#line 2197 "VBNET.ATG"
+#line 2195 "VBNET.ATG"
out expr);
if (la.kind == 170) {
lexer.NextToken();
}
if (
-#line 2199 "VBNET.ATG"
+#line 2197 "VBNET.ATG"
IsEndStmtAhead()) {
Expect(87);
-#line 2199 "VBNET.ATG"
+#line 2197 "VBNET.ATG"
statement = new IfElseStatement(expr, new EndStatement());
} else if (la.kind == 1 || la.kind == 13) {
EndOfStmt();
Block(
-#line 2202 "VBNET.ATG"
+#line 2200 "VBNET.ATG"
out embeddedStatement);
-#line 2204 "VBNET.ATG"
+#line 2202 "VBNET.ATG"
IfElseStatement ifStatement = new IfElseStatement(expr, embeddedStatement);
while (la.kind == 86 ||
-#line 2208 "VBNET.ATG"
+#line 2206 "VBNET.ATG"
IsElseIf()) {
if (
-#line 2208 "VBNET.ATG"
+#line 2206 "VBNET.ATG"
IsElseIf()) {
Expect(85);
Expect(105);
@@ -5723,20 +5722,20 @@ IsElseIf()) {
lexer.NextToken();
}
-#line 2211 "VBNET.ATG"
+#line 2209 "VBNET.ATG"
Expression condition = null; Statement block = null;
Expr(
-#line 2212 "VBNET.ATG"
+#line 2210 "VBNET.ATG"
out condition);
if (la.kind == 170) {
lexer.NextToken();
}
EndOfStmt();
Block(
-#line 2213 "VBNET.ATG"
+#line 2211 "VBNET.ATG"
out block);
-#line 2215 "VBNET.ATG"
+#line 2213 "VBNET.ATG"
ifStatement.ElseIfSections.Add(new ElseIfSection(condition, block));
}
@@ -5744,59 +5743,59 @@ out block);
lexer.NextToken();
EndOfStmt();
Block(
-#line 2220 "VBNET.ATG"
+#line 2218 "VBNET.ATG"
out embeddedStatement);
-#line 2222 "VBNET.ATG"
+#line 2220 "VBNET.ATG"
ifStatement.FalseStatement.Add(embeddedStatement);
}
Expect(87);
Expect(105);
-#line 2226 "VBNET.ATG"
+#line 2224 "VBNET.ATG"
statement = ifStatement;
} else if (StartOf(28)) {
EmbeddedStatement(
-#line 2229 "VBNET.ATG"
+#line 2227 "VBNET.ATG"
out embeddedStatement);
-#line 2231 "VBNET.ATG"
+#line 2229 "VBNET.ATG"
IfElseStatement ifStatement = new IfElseStatement(expr, embeddedStatement);
while (la.kind == 13) {
lexer.NextToken();
EmbeddedStatement(
-#line 2233 "VBNET.ATG"
+#line 2231 "VBNET.ATG"
out embeddedStatement);
-#line 2233 "VBNET.ATG"
+#line 2231 "VBNET.ATG"
ifStatement.TrueStatement.Add(embeddedStatement);
}
if (la.kind == 85) {
lexer.NextToken();
if (StartOf(28)) {
EmbeddedStatement(
-#line 2235 "VBNET.ATG"
+#line 2233 "VBNET.ATG"
out embeddedStatement);
}
-#line 2237 "VBNET.ATG"
+#line 2235 "VBNET.ATG"
ifStatement.FalseStatement.Add(embeddedStatement);
while (la.kind == 13) {
lexer.NextToken();
EmbeddedStatement(
-#line 2240 "VBNET.ATG"
+#line 2238 "VBNET.ATG"
out embeddedStatement);
-#line 2241 "VBNET.ATG"
+#line 2239 "VBNET.ATG"
ifStatement.FalseStatement.Add(embeddedStatement);
}
}
-#line 2244 "VBNET.ATG"
+#line 2242 "VBNET.ATG"
statement = ifStatement;
} else SynErr(247);
break;
@@ -5807,43 +5806,43 @@ out embeddedStatement);
lexer.NextToken();
}
Expr(
-#line 2247 "VBNET.ATG"
+#line 2245 "VBNET.ATG"
out expr);
EndOfStmt();
-#line 2248 "VBNET.ATG"
+#line 2246 "VBNET.ATG"
ArrayList selectSections = new ArrayList();
Statement block = null;
while (la.kind == 56) {
-#line 2252 "VBNET.ATG"
+#line 2250 "VBNET.ATG"
ArrayList caseClauses = null;
lexer.NextToken();
CaseClauses(
-#line 2253 "VBNET.ATG"
+#line 2251 "VBNET.ATG"
out caseClauses);
if (
-#line 2253 "VBNET.ATG"
+#line 2251 "VBNET.ATG"
IsNotStatementSeparator()) {
lexer.NextToken();
}
EndOfStmt();
-#line 2255 "VBNET.ATG"
+#line 2253 "VBNET.ATG"
SwitchSection selectSection = new SwitchSection(caseClauses);
Block(
-#line 2257 "VBNET.ATG"
+#line 2255 "VBNET.ATG"
out block);
-#line 2259 "VBNET.ATG"
+#line 2257 "VBNET.ATG"
selectSection.Children = block.Children;
selectSections.Add(selectSection);
}
-#line 2263 "VBNET.ATG"
+#line 2261 "VBNET.ATG"
statement = new SwitchStatement(expr, selectSections);
Expect(87);
Expect(155);
@@ -5851,43 +5850,43 @@ out block);
}
case 134: {
-#line 2265 "VBNET.ATG"
+#line 2263 "VBNET.ATG"
OnErrorStatement onErrorStatement = null;
OnErrorStatement(
-#line 2266 "VBNET.ATG"
+#line 2264 "VBNET.ATG"
out onErrorStatement);
-#line 2266 "VBNET.ATG"
+#line 2264 "VBNET.ATG"
statement = onErrorStatement;
break;
}
case 103: {
-#line 2267 "VBNET.ATG"
+#line 2265 "VBNET.ATG"
GotoStatement goToStatement = null;
GotoStatement(
-#line 2268 "VBNET.ATG"
+#line 2266 "VBNET.ATG"
out goToStatement);
-#line 2268 "VBNET.ATG"
+#line 2266 "VBNET.ATG"
statement = goToStatement;
break;
}
case 153: {
-#line 2269 "VBNET.ATG"
+#line 2267 "VBNET.ATG"
ResumeStatement resumeStatement = null;
ResumeStatement(
-#line 2270 "VBNET.ATG"
+#line 2268 "VBNET.ATG"
out resumeStatement);
-#line 2270 "VBNET.ATG"
+#line 2268 "VBNET.ATG"
statement = resumeStatement;
break;
}
case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 14: case 15: case 16: case 23: case 42: case 50: case 51: case 53: case 58: case 59: case 60: case 61: case 62: case 63: case 64: case 65: case 67: case 68: case 69: case 71: case 72: case 73: case 74: case 75: case 76: case 81: case 83: case 95: case 101: case 110: case 116: case 118: case 123: case 124: case 126: case 129: case 159: case 160: case 165: case 169: case 173: case 175: case 190: case 191: case 192: case 193: case 195: {
-#line 2273 "VBNET.ATG"
+#line 2271 "VBNET.ATG"
Expression val = null;
AssignmentOperatorType op;
@@ -5895,25 +5894,25 @@ out resumeStatement);
la.kind == Tokens.Not || la.kind == Tokens.Times;
UnaryExpr(
-#line 2279 "VBNET.ATG"
+#line 2277 "VBNET.ATG"
out expr);
if (StartOf(30)) {
AssignmentOperator(
-#line 2281 "VBNET.ATG"
+#line 2279 "VBNET.ATG"
out op);
Expr(
-#line 2281 "VBNET.ATG"
+#line 2279 "VBNET.ATG"
out val);
-#line 2281 "VBNET.ATG"
+#line 2279 "VBNET.ATG"
expr = new AssignmentExpression(expr, op, val);
} else if (la.kind == 1 || la.kind == 13 || la.kind == 85) {
-#line 2282 "VBNET.ATG"
+#line 2280 "VBNET.ATG"
if (mustBeAssignment) Error("error in assignment.");
} else SynErr(248);
-#line 2285 "VBNET.ATG"
+#line 2283 "VBNET.ATG"
// a field reference expression that stands alone is a
// invocation expression without parantheses and arguments
if(expr is FieldReferenceExpression || expr is IdentifierExpression) {
@@ -5926,10 +5925,10 @@ out val);
case 55: {
lexer.NextToken();
UnaryExpr(
-#line 2292 "VBNET.ATG"
+#line 2290 "VBNET.ATG"
out expr);
-#line 2292 "VBNET.ATG"
+#line 2290 "VBNET.ATG"
statement = new StatementExpression(expr);
break;
}
@@ -5937,7 +5936,7 @@ out expr);
lexer.NextToken();
Identifier();
-#line 2294 "VBNET.ATG"
+#line 2292 "VBNET.ATG"
string resourcename = t.val, typeName;
Statement resourceAquisition = null, block = null;
@@ -5945,45 +5944,45 @@ out expr);
if (la.kind == 126) {
lexer.NextToken();
Qualident(
-#line 2298 "VBNET.ATG"
+#line 2296 "VBNET.ATG"
out typeName);
-#line 2298 "VBNET.ATG"
+#line 2296 "VBNET.ATG"
ArrayList initializer = null;
if (la.kind == 23) {
lexer.NextToken();
if (StartOf(17)) {
ArgumentList(
-#line 2298 "VBNET.ATG"
+#line 2296 "VBNET.ATG"
out initializer);
}
Expect(24);
}
-#line 2300 "VBNET.ATG"
+#line 2298 "VBNET.ATG"
resourceAquisition = new LocalVariableDeclaration(new VariableDeclaration(resourcename, new ArrayInitializerExpression(initializer), new TypeReference(typeName)));
} else if (StartOf(10)) {
Qualident(
-#line 2303 "VBNET.ATG"
+#line 2301 "VBNET.ATG"
out typeName);
Expect(11);
Expr(
-#line 2303 "VBNET.ATG"
+#line 2301 "VBNET.ATG"
out expr);
-#line 2305 "VBNET.ATG"
+#line 2303 "VBNET.ATG"
resourceAquisition = new LocalVariableDeclaration(new VariableDeclaration(resourcename, expr, new TypeReference(typeName)));
} else SynErr(249);
Block(
-#line 2308 "VBNET.ATG"
+#line 2306 "VBNET.ATG"
out block);
Expect(87);
Expect(188);
-#line 2310 "VBNET.ATG"
+#line 2308 "VBNET.ATG"
statement = new UsingStatement(resourceAquisition, block);
break;
}
@@ -5992,10 +5991,10 @@ out block);
}
void LocalDeclarationStatement(
-#line 2018 "VBNET.ATG"
+#line 2016 "VBNET.ATG"
out Statement statement) {
-#line 2020 "VBNET.ATG"
+#line 2018 "VBNET.ATG"
Modifiers m = new Modifiers();
LocalVariableDeclaration localVariableDeclaration;
bool dimfound = false;
@@ -6004,22 +6003,22 @@ out Statement statement) {
if (la.kind == 70) {
lexer.NextToken();
-#line 2026 "VBNET.ATG"
+#line 2024 "VBNET.ATG"
m.Add(Modifier.Const);
} else if (la.kind == 161) {
lexer.NextToken();
-#line 2027 "VBNET.ATG"
+#line 2025 "VBNET.ATG"
m.Add(Modifier.Static);
} else {
lexer.NextToken();
-#line 2028 "VBNET.ATG"
+#line 2026 "VBNET.ATG"
dimfound = true;
}
}
-#line 2031 "VBNET.ATG"
+#line 2029 "VBNET.ATG"
if(dimfound && (m.Modifier & Modifier.Const) != 0) {
Error("Dim is not allowed on constants.");
}
@@ -6032,137 +6031,137 @@ out Statement statement) {
localVariableDeclaration.StartLocation = t.Location;
VariableDeclarator(
-#line 2042 "VBNET.ATG"
+#line 2040 "VBNET.ATG"
localVariableDeclaration.Variables);
while (la.kind == 12) {
lexer.NextToken();
VariableDeclarator(
-#line 2043 "VBNET.ATG"
+#line 2041 "VBNET.ATG"
localVariableDeclaration.Variables);
}
-#line 2045 "VBNET.ATG"
+#line 2043 "VBNET.ATG"
statement = localVariableDeclaration;
}
void TryStatement(
-#line 2503 "VBNET.ATG"
+#line 2501 "VBNET.ATG"
out Statement tryStatement) {
-#line 2505 "VBNET.ATG"
+#line 2503 "VBNET.ATG"
Statement blockStmt = null, finallyStmt = null;ArrayList catchClauses = null;
Expect(174);
EndOfStmt();
Block(
-#line 2508 "VBNET.ATG"
+#line 2506 "VBNET.ATG"
out blockStmt);
if (la.kind == 57 || la.kind == 87 || la.kind == 96) {
CatchClauses(
-#line 2509 "VBNET.ATG"
+#line 2507 "VBNET.ATG"
out catchClauses);
}
if (la.kind == 96) {
lexer.NextToken();
EndOfStmt();
Block(
-#line 2510 "VBNET.ATG"
+#line 2508 "VBNET.ATG"
out finallyStmt);
}
Expect(87);
Expect(174);
-#line 2513 "VBNET.ATG"
+#line 2511 "VBNET.ATG"
tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
}
void WithStatement(
-#line 2481 "VBNET.ATG"
+#line 2479 "VBNET.ATG"
out Statement withStatement) {
-#line 2483 "VBNET.ATG"
+#line 2481 "VBNET.ATG"
Statement blockStmt = null;
Expression expr = null;
Expect(182);
-#line 2486 "VBNET.ATG"
+#line 2484 "VBNET.ATG"
Point start = t.Location;
Expr(
-#line 2487 "VBNET.ATG"
+#line 2485 "VBNET.ATG"
out expr);
EndOfStmt();
-#line 2489 "VBNET.ATG"
+#line 2487 "VBNET.ATG"
withStatement = new WithStatement(expr);
withStatement.StartLocation = start;
withStatements.Push(withStatement);
Block(
-#line 2493 "VBNET.ATG"
+#line 2491 "VBNET.ATG"
out blockStmt);
-#line 2495 "VBNET.ATG"
+#line 2493 "VBNET.ATG"
((WithStatement)withStatement).Body = (BlockStatement)blockStmt;
withStatements.Pop();
Expect(87);
Expect(182);
-#line 2499 "VBNET.ATG"
+#line 2497 "VBNET.ATG"
withStatement.EndLocation = t.Location;
}
void WhileOrUntil(
-#line 2474 "VBNET.ATG"
+#line 2472 "VBNET.ATG"
out ConditionType conditionType) {
-#line 2475 "VBNET.ATG"
+#line 2473 "VBNET.ATG"
conditionType = ConditionType.None;
if (la.kind == 181) {
lexer.NextToken();
-#line 2476 "VBNET.ATG"
+#line 2474 "VBNET.ATG"
conditionType = ConditionType.While;
} else if (la.kind == 177) {
lexer.NextToken();
-#line 2477 "VBNET.ATG"
+#line 2475 "VBNET.ATG"
conditionType = ConditionType.Until;
} else SynErr(251);
}
void LoopControlVariable(
-#line 2315 "VBNET.ATG"
+#line 2313 "VBNET.ATG"
out TypeReference type, out string name) {
-#line 2316 "VBNET.ATG"
+#line 2314 "VBNET.ATG"
ArrayList arrayModifiers = null;
type = null;
Qualident(
-#line 2320 "VBNET.ATG"
+#line 2318 "VBNET.ATG"
out name);
if (
-#line 2321 "VBNET.ATG"
+#line 2319 "VBNET.ATG"
IsDims()) {
ArrayTypeModifiers(
-#line 2321 "VBNET.ATG"
+#line 2319 "VBNET.ATG"
out arrayModifiers);
}
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 2322 "VBNET.ATG"
+#line 2320 "VBNET.ATG"
out type);
-#line 2322 "VBNET.ATG"
+#line 2320 "VBNET.ATG"
if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); }
}
-#line 2324 "VBNET.ATG"
+#line 2322 "VBNET.ATG"
if (type != null) {
if(type.RankSpecifier != null && arrayModifiers != null) {
Error("array rank only allowed one time");
@@ -6180,48 +6179,48 @@ out type);
}
void CaseClauses(
-#line 2434 "VBNET.ATG"
+#line 2432 "VBNET.ATG"
out ArrayList caseClauses) {
-#line 2436 "VBNET.ATG"
+#line 2434 "VBNET.ATG"
caseClauses = new ArrayList();
CaseLabel caseClause = null;
CaseClause(
-#line 2439 "VBNET.ATG"
+#line 2437 "VBNET.ATG"
out caseClause);
-#line 2439 "VBNET.ATG"
+#line 2437 "VBNET.ATG"
caseClauses.Add(caseClause);
while (la.kind == 12) {
lexer.NextToken();
CaseClause(
-#line 2440 "VBNET.ATG"
+#line 2438 "VBNET.ATG"
out caseClause);
-#line 2440 "VBNET.ATG"
+#line 2438 "VBNET.ATG"
caseClauses.Add(caseClause);
}
}
void OnErrorStatement(
-#line 2341 "VBNET.ATG"
+#line 2339 "VBNET.ATG"
out OnErrorStatement stmt) {
-#line 2343 "VBNET.ATG"
+#line 2341 "VBNET.ATG"
stmt = null;
GotoStatement goToStatement = null;
Expect(134);
Expect(91);
if (
-#line 2349 "VBNET.ATG"
+#line 2347 "VBNET.ATG"
IsNegativeLabelName()) {
Expect(103);
Expect(15);
Expect(5);
-#line 2351 "VBNET.ATG"
+#line 2349 "VBNET.ATG"
long intLabel = Int64.Parse(t.val);
if(intLabel != 1) {
Error("invalid label in on error statement.");
@@ -6230,10 +6229,10 @@ IsNegativeLabelName()) {
} else if (la.kind == 103) {
GotoStatement(
-#line 2357 "VBNET.ATG"
+#line 2355 "VBNET.ATG"
out goToStatement);
-#line 2359 "VBNET.ATG"
+#line 2357 "VBNET.ATG"
string val = goToStatement.Label;
// if value is numeric, make sure that is 0
@@ -6250,63 +6249,63 @@ out goToStatement);
lexer.NextToken();
Expect(127);
-#line 2373 "VBNET.ATG"
+#line 2371 "VBNET.ATG"
stmt = new OnErrorStatement(new ResumeStatement(true));
} else SynErr(252);
}
void GotoStatement(
-#line 2379 "VBNET.ATG"
+#line 2377 "VBNET.ATG"
out ICSharpCode.NRefactory.Parser.AST.GotoStatement goToStatement) {
-#line 2381 "VBNET.ATG"
+#line 2379 "VBNET.ATG"
string label = String.Empty;
Expect(103);
LabelName(
-#line 2384 "VBNET.ATG"
+#line 2382 "VBNET.ATG"
out label);
-#line 2386 "VBNET.ATG"
+#line 2384 "VBNET.ATG"
goToStatement = new ICSharpCode.NRefactory.Parser.AST.GotoStatement(label);
}
void ResumeStatement(
-#line 2423 "VBNET.ATG"
+#line 2421 "VBNET.ATG"
out ResumeStatement resumeStatement) {
-#line 2425 "VBNET.ATG"
+#line 2423 "VBNET.ATG"
resumeStatement = null;
string label = String.Empty;
if (
-#line 2428 "VBNET.ATG"
+#line 2426 "VBNET.ATG"
IsResumeNext()) {
Expect(153);
Expect(127);
-#line 2429 "VBNET.ATG"
+#line 2427 "VBNET.ATG"
resumeStatement = new ResumeStatement(true);
} else if (la.kind == 153) {
lexer.NextToken();
if (StartOf(31)) {
LabelName(
-#line 2430 "VBNET.ATG"
+#line 2428 "VBNET.ATG"
out label);
}
-#line 2430 "VBNET.ATG"
+#line 2428 "VBNET.ATG"
resumeStatement = new ResumeStatement(label);
} else SynErr(253);
}
void CaseClause(
-#line 2444 "VBNET.ATG"
+#line 2442 "VBNET.ATG"
out CaseLabel caseClause) {
-#line 2446 "VBNET.ATG"
+#line 2444 "VBNET.ATG"
Expression expr = null;
Expression sexpr = null;
BinaryOperatorType op = BinaryOperatorType.None;
@@ -6315,7 +6314,7 @@ out CaseLabel caseClause) {
if (la.kind == 85) {
lexer.NextToken();
-#line 2452 "VBNET.ATG"
+#line 2450 "VBNET.ATG"
caseClause = new CaseLabel();
} else if (StartOf(32)) {
if (la.kind == 112) {
@@ -6325,76 +6324,76 @@ out CaseLabel caseClause) {
case 26: {
lexer.NextToken();
-#line 2456 "VBNET.ATG"
+#line 2454 "VBNET.ATG"
op = BinaryOperatorType.LessThan;
break;
}
case 25: {
lexer.NextToken();
-#line 2457 "VBNET.ATG"
+#line 2455 "VBNET.ATG"
op = BinaryOperatorType.GreaterThan;
break;
}
case 29: {
lexer.NextToken();
-#line 2458 "VBNET.ATG"
+#line 2456 "VBNET.ATG"
op = BinaryOperatorType.LessThanOrEqual;
break;
}
case 28: {
lexer.NextToken();
-#line 2459 "VBNET.ATG"
+#line 2457 "VBNET.ATG"
op = BinaryOperatorType.GreaterThanOrEqual;
break;
}
case 11: {
lexer.NextToken();
-#line 2460 "VBNET.ATG"
+#line 2458 "VBNET.ATG"
op = BinaryOperatorType.Equality;
break;
}
case 27: {
lexer.NextToken();
-#line 2461 "VBNET.ATG"
+#line 2459 "VBNET.ATG"
op = BinaryOperatorType.InEquality;
break;
}
default: SynErr(254); break;
}
Expr(
-#line 2463 "VBNET.ATG"
+#line 2461 "VBNET.ATG"
out expr);
-#line 2465 "VBNET.ATG"
+#line 2463 "VBNET.ATG"
caseClause = new CaseLabel(op, expr);
} else if (StartOf(18)) {
Expr(
-#line 2467 "VBNET.ATG"
+#line 2465 "VBNET.ATG"
out expr);
if (la.kind == 172) {
lexer.NextToken();
Expr(
-#line 2467 "VBNET.ATG"
+#line 2465 "VBNET.ATG"
out sexpr);
}
-#line 2469 "VBNET.ATG"
+#line 2467 "VBNET.ATG"
caseClause = new CaseLabel(expr, sexpr);
} else SynErr(255);
}
void CatchClauses(
-#line 2518 "VBNET.ATG"
+#line 2516 "VBNET.ATG"
out ArrayList catchClauses) {
-#line 2520 "VBNET.ATG"
+#line 2518 "VBNET.ATG"
catchClauses = new ArrayList();
TypeReference type = null;
Statement blockStmt = null;
@@ -6406,27 +6405,27 @@ out ArrayList catchClauses) {
if (StartOf(10)) {
Identifier();
-#line 2528 "VBNET.ATG"
+#line 2526 "VBNET.ATG"
name = t.val;
if (la.kind == 47) {
lexer.NextToken();
TypeName(
-#line 2528 "VBNET.ATG"
+#line 2526 "VBNET.ATG"
out type);
}
}
if (la.kind == 180) {
lexer.NextToken();
Expr(
-#line 2529 "VBNET.ATG"
+#line 2527 "VBNET.ATG"
out expr);
}
EndOfStmt();
Block(
-#line 2531 "VBNET.ATG"
+#line 2529 "VBNET.ATG"
out blockStmt);
-#line 2532 "VBNET.ATG"
+#line 2530 "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 1d9ea345c5..49d1054f42 100644
--- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG
+++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG
@@ -597,13 +597,13 @@ NonModuleDeclaration attributes>
["Partial" (. m.Add(Modifier.Partial); .)]
"Class"
(. TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
-
+ newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = Types.Class;
.)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ Identifier (. newType.Name = t.val; .)
TypeParameterList
EndOfStmt
[ ClassBaseType (. newType.BaseTypes.Add(typeRef); .) ]
@@ -621,11 +621,10 @@ NonModuleDeclaration attributes>
newType.StartLocation = t.Location;
newType.Type = Types.Module;
.)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ Identifier (. newType.Name = t.val; .)
EOL
ModuleBody
(.
- newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
.)
| "Structure"
@@ -637,12 +636,11 @@ NonModuleDeclaration attributes>
newType.StartLocation = t.Location;
newType.Type = Types.Struct;
.)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ Identifier (. newType.Name = t.val; .)
TypeParameterList
EOL { TypeImplementsClause (. newType.BaseTypes.AddRange(baseInterfaces);.) }
StructureBody
(.
- newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
.)
| /* 7.4 */
@@ -650,18 +648,18 @@ NonModuleDeclaration attributes>
(.
m.Check(Modifier.VBEnums);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
+ newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = Types.Enum;
.)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ Identifier (. newType.Name = t.val; .)
[ "As" PrimitiveTypeName (. newType.BaseTypes.Add(new TypeReference(name)); .) ]
EOL
EnumBody
(.
- newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
.)
| /* 7.8 */
@@ -669,16 +667,16 @@ NonModuleDeclaration attributes>
(.
m.Check(Modifier.VBInterfacs);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
+ newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = Types.Interface;
.)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ Identifier (. newType.Name = t.val; .)
TypeParameterList
EndOfStmt { InterfaceBase (. newType.BaseTypes.AddRange(baseInterfaces); .) }
InterfaceBody
(.
- newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
.)
| /* 7.10 */
diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
index 78abfba048..1b13c57c2c 100644
--- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
+++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
@@ -683,6 +683,8 @@
+
+
diff --git a/src/Main/Base/Project/Src/Commands/ClassMemberMenuBuilder.cs b/src/Main/Base/Project/Src/Commands/ClassMemberMenuBuilder.cs
index 144006ff65..acfad15bae 100644
--- a/src/Main/Base/Project/Src/Commands/ClassMemberMenuBuilder.cs
+++ b/src/Main/Base/Project/Src/Commands/ClassMemberMenuBuilder.cs
@@ -20,12 +20,12 @@ using ICSharpCode.SharpDevelop.Gui;
using SearchAndReplace;
using ICSharpCode.SharpDevelop.DefaultEditor.Commands;
-namespace ICSharpCode.SharpDevelop.Commands
+namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
{
///
/// Build context menu for class members in the text editor.
///
- public class ClassMemberMenuBuilder : ISubmenuBuilder
+ public class ClassMemberMenuBuilder : ParserBookmarkMenuBuilderBase, ISubmenuBuilder
{
public ToolStripItem[] BuildSubmenu(Codon codon, object owner)
{
@@ -82,42 +82,6 @@ namespace ICSharpCode.SharpDevelop.Commands
return list.ToArray();
}
- TextEditorControl JumpToDefinition(IMember member)
- {
- IViewContent viewContent = null;
- ICompilationUnit cu = member.DeclaringType.CompilationUnit;
- if (cu != null) {
- string fileName = cu.FileName;
- if (fileName != null) {
- if (member.Region != null && member.Region.BeginLine > 0) {
- viewContent = FileService.JumpToFilePosition(fileName, member.Region.BeginLine - 1, member.Region.BeginColumn - 1);
- } else {
- FileService.OpenFile(fileName);
- }
- }
- }
- ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider tecp = viewContent as ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider;
- return (tecp == null) ? null : tecp.TextEditorControl;
- }
-
- TextEditorControl JumpBehindDefinition(IMember member)
- {
- IViewContent viewContent = null;
- ICompilationUnit cu = member.DeclaringType.CompilationUnit;
- if (cu != null) {
- string fileName = cu.FileName;
- if (fileName != null) {
- if (member.Region != null && member.Region.EndLine > 0) {
- viewContent = FileService.JumpToFilePosition(fileName, member.Region.EndLine, 0);
- } else {
- FileService.OpenFile(fileName);
- }
- }
- }
- ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider tecp = viewContent as ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider;
- return (tecp == null) ? null : tecp.TextEditorControl;
- }
-
void CreateProperty(object sender, EventArgs e)
{
CreateProperty(sender, e, true);
@@ -174,69 +138,23 @@ namespace ICSharpCode.SharpDevelop.Commands
}
}
- private struct Modification {
- public IDocument Document;
- public int Offset;
- public int LengthDifference;
-
- public Modification(IDocument Document, int Offset, int LengthDifference)
- {
- this.Document = Document;
- this.Offset = Offset;
- this.LengthDifference = LengthDifference;
- }
- }
-
void Rename(object sender, EventArgs e)
{
MenuCommand item = (MenuCommand)sender;
IMember member = (IMember)item.Tag;
string newName = MessageService.ShowInputBox("Rename", "Enter the new name of the member", member.Name);
- if (newName == null || newName.Length == 0) return;
+ if (!CheckName(newName)) return;
List list = RefactoringService.FindReferences(member, null);
if (list == null) return;
- List modifiedContents = new List();
- List modifications = new List();
- foreach (Reference r in list) {
- FileService.OpenFile(r.FileName);
- IViewContent viewContent = FileService.GetOpenFile(r.FileName).ViewContent;
- if (!modifiedContents.Contains(viewContent)) {
- modifiedContents.Add(viewContent);
- }
- ITextEditorControlProvider p = viewContent as ITextEditorControlProvider;
- if (p != null) {
- IDocument doc = p.TextEditorControl.Document;
- int offset = r.Offset;
- foreach (Modification m in modifications) {
- if (m.Document != doc) continue;
- if (m.Offset < offset) offset += m.LengthDifference;
- }
- int lengthDifference = newName.Length - r.Length;
- doc.Replace(offset, r.Length, newName);
- if (lengthDifference != 0) {
- for (int i = 0; i < modifications.Count; ++i) {
- Modification m = modifications[i];
- if (m.Document != doc) continue;
- if (m.Offset > offset) {
- m.Offset += lengthDifference;
- modifications[i] = m; // Modification is a value type
- }
- }
- modifications.Add(new Modification(doc, offset, lengthDifference));
- }
- }
- }
- foreach (IViewContent viewContent in modifiedContents) {
- ParserService.ParseViewContent(viewContent);
- }
+ RenameReferences(list, newName);
}
void FindOverrides(object sender, EventArgs e)
{
MenuCommand item = (MenuCommand)sender;
IMember member = (IMember)item.Tag;
- List derivedClasses = RefactoringService.FindDerivedClasses(member.DeclaringType, ParserService.AllProjectContents);
+ List derivedClasses = RefactoringService.FindDerivedClasses(member.DeclaringType, ParserService.AllProjectContents, false);
List results = new List();
foreach (IClass derivedClass in derivedClasses) {
if (derivedClass.CompilationUnit == null) continue;
@@ -248,36 +166,14 @@ namespace ICSharpCode.SharpDevelop.Commands
results.Add(res);
}
}
- SearchReplaceInFilesManager.ShowSearchResults(results);
+ SearchReplaceInFilesManager.ShowSearchResults("Overrides of " + member.Name, results);
}
void FindReferences(object sender, EventArgs e)
{
MenuCommand item = (MenuCommand)sender;
IMember member = (IMember)item.Tag;
- List list = RefactoringService.FindReferences(member, null);
- if (list == null) return;
- List results = new List();
- foreach (Reference r in list) {
- SearchResult res = new SearchResult(r.Offset, r.Length);
- res.ProvidedDocumentInformation = GetDocumentInformation(r.FileName);
- results.Add(res);
- }
- SearchReplaceInFilesManager.ShowSearchResults(results);
- }
-
- ProvidedDocumentInformation GetDocumentInformation(string fileName)
- {
- foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
- if (content is ITextEditorControlProvider &&
- content.FileName != null &&
- FileUtility.IsEqualFileName(content.FileName, fileName))
- {
- return new ProvidedDocumentInformation(((ITextEditorControlProvider)content).TextEditorControl.Document, fileName, 0);
- }
- }
- ITextBufferStrategy strategy = StringTextBufferStrategy.CreateTextBufferFromFile(fileName);
- return new ProvidedDocumentInformation(strategy, fileName, 0);
+ ShowAsSearchResults("References to " + member.Name, RefactoringService.FindReferences(member, null));
}
}
}
diff --git a/src/Main/Base/Project/Src/Dom/ResolveResult.cs b/src/Main/Base/Project/Src/Dom/ResolveResult.cs
index f54242f751..2880be988e 100644
--- a/src/Main/Base/Project/Src/Dom/ResolveResult.cs
+++ b/src/Main/Base/Project/Src/Dom/ResolveResult.cs
@@ -355,6 +355,11 @@ namespace ICSharpCode.SharpDevelop.Dom
}
public override FilePosition GetDefinitionPosition()
+ {
+ return GetDefinitionPosition(resolvedMember);
+ }
+
+ public static FilePosition GetDefinitionPosition(IMember resolvedMember)
{
IClass declaringType = resolvedMember.DeclaringType;
if (declaringType == null) {
@@ -424,6 +429,16 @@ namespace ICSharpCode.SharpDevelop.Dom
return containingType;
}
}
+
+ public override FilePosition GetDefinitionPosition()
+ {
+ List methods = containingType.GetMethods();
+ methods = methods.FindAll(delegate(IMethod m) { return m.Name == this.Name; });
+ if (methods.Count == 1) {
+ return MemberResolveResult.GetDefinitionPosition(methods[0]);
+ }
+ return base.GetDefinitionPosition();
+ }
}
#endregion
}
diff --git a/src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/SchemeExtension.cs b/src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/SchemeExtension.cs
index 3c909ee74e..44a13fb88c 100644
--- a/src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/SchemeExtension.cs
+++ b/src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/SchemeExtension.cs
@@ -49,10 +49,10 @@ namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding
}
}
- public class SchemeExtensionErbauer : IErbauer
+ public class SchemeExtensionDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs b/src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs
index 84c41b07ec..2e4686c797 100644
--- a/src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs
+++ b/src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs
@@ -67,7 +67,7 @@ namespace ICSharpCode.SharpDevelop.Gui
IProjectContent projectContent = ParserService.GetProjectContent(project);
if (projectContent != null) {
contentList[0] = projectContent;
- foreach (IClass derivedClass in RefactoringService.FindDerivedClasses(c, contentList)) {
+ foreach (IClass derivedClass in RefactoringService.FindDerivedClasses(c, contentList, true)) {
new ClassNode(project, derivedClass).AddTo(this);
}
}
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveContentExtensionEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveContentExtensionEvaluator.cs
index 06c55b6fd3..f88bc9c32f 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveContentExtensionEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveContentExtensionEvaluator.cs
@@ -13,7 +13,7 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
- public class ActiveContentExtensionAuswerter : IAuswerter
+ public class ActiveContentExtensionConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveViewContentUntitledEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveViewContentUntitledEvaluator.cs
index 7daf1cb451..ca8dd182ed 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveViewContentUntitledEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveViewContentUntitledEvaluator.cs
@@ -14,7 +14,7 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
- public class ActiveViewContentUntitledAuswerter : IAuswerter
+ public class ActiveViewContentUntitledConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveWindowStateEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveWindowStateEvaluator.cs
index e38c35e664..73d75bea4e 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveWindowStateEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ActiveWindowStateEvaluator.cs
@@ -19,10 +19,7 @@ namespace ICSharpCode.Core
ViewOnly = 4
}
- ///
- /// Description of WindowStateCondition.
- ///
- public class ActiveWindowStateAuswerter : IAuswerter
+ public class ActiveWindowStateConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/CombineOpenEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/CombineOpenEvaluator.cs
index 542cecef33..bf5b505c87 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/CombineOpenEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/CombineOpenEvaluator.cs
@@ -14,7 +14,7 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
- public class CombineOpenAuswerter : IAuswerter
+ public class CombineOpenConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/DebuggerSupportsEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/DebuggerSupportsEvaluator.cs
index 6c86f3c87c..fe62b77416 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/DebuggerSupportsEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/DebuggerSupportsEvaluator.cs
@@ -12,7 +12,7 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
- public class DebuggerSupportsAuswerter : IAuswerter
+ public class DebuggerSupportsConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/IsProcessRunningEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/IsProcessRunningEvaluator.cs
index 42c4835a0e..926e851a0f 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/IsProcessRunningEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/IsProcessRunningEvaluator.cs
@@ -12,7 +12,7 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
- public class IsProcessRunningAuswerter : IAuswerter
+ public class IsProcessRunningConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/OpenWindowStateEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/OpenWindowStateEvaluator.cs
index 3ce81da901..bbd638cd3d 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/OpenWindowStateEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/OpenWindowStateEvaluator.cs
@@ -15,7 +15,7 @@ namespace ICSharpCode.Core
///
/// Description of WindowStateCondition.
///
- public class OpenWindowStateAuswerter : IAuswerter
+ public class OpenWindowStateConditionEvaluator : IConditionEvaluator
{
WindowState windowState = WindowState.None;
WindowState nowindowState = WindowState.None;
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectActiveEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectActiveEvaluator.cs
index 8a0b7c3038..e796a06451 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectActiveEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectActiveEvaluator.cs
@@ -16,7 +16,7 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core
{
- public class ProjectActiveAuswerter : IAuswerter
+ public class ProjectActiveConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectOpenEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectOpenEvaluator.cs
index c8cfd8e736..75b8d8c5ac 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectOpenEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectOpenEvaluator.cs
@@ -15,7 +15,7 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core
{
- public class ProjectOpenAuswerter : IAuswerter
+ public class ProjectOpenConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WindowActiveEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WindowActiveEvaluator.cs
index d97076472e..a8c32ba5bb 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WindowActiveEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WindowActiveEvaluator.cs
@@ -14,7 +14,7 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
- public class WindowActiveAuswerter : IAuswerter
+ public class WindowActiveConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WindowOpenEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WindowOpenEvaluator.cs
index 3be4784805..5ce60b7228 100644
--- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WindowOpenEvaluator.cs
+++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WindowOpenEvaluator.cs
@@ -15,7 +15,7 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
- public class WindowOpenAuswerter : IAuswerter
+ public class WindowOpenConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/Internal/Doozers/DialogPanelDoozer.cs b/src/Main/Base/Project/Src/Internal/Doozers/DialogPanelDoozer.cs
index 5132127991..e027b80a26 100644
--- a/src/Main/Base/Project/Src/Internal/Doozers/DialogPanelDoozer.cs
+++ b/src/Main/Base/Project/Src/Internal/Doozers/DialogPanelDoozer.cs
@@ -11,10 +11,10 @@ using System.Reflection;
namespace ICSharpCode.Core
{
- public class DialogPanelErbauer : IErbauer
+ public class DialogPanelDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Base/Project/Src/Internal/Doozers/PadDoozer.cs b/src/Main/Base/Project/Src/Internal/Doozers/PadDoozer.cs
index ddee6c4c35..bea764741a 100644
--- a/src/Main/Base/Project/Src/Internal/Doozers/PadDoozer.cs
+++ b/src/Main/Base/Project/Src/Internal/Doozers/PadDoozer.cs
@@ -12,10 +12,10 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
- public class PadErbauer : IErbauer
+ public class PadDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs b/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs
index ad4b013c3a..6ddd47d333 100644
--- a/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs
+++ b/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs
@@ -341,9 +341,8 @@ namespace ICSharpCode.Core
else
b.Append("local variable ");
b.Append(ambience.Convert(rr.Field));
- IDebugger debugger = CurrentDebugger;
- if (debugger != null) {
- string currentValue = debugger.GetValueAsString(rr.Field.Name);
+ if (currentDebugger != null) {
+ string currentValue = currentDebugger.GetValueAsString(rr.Field.Name);
if (currentValue != null) {
b.Append(" = ");
b.Append(currentValue);
diff --git a/src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingDoozer.cs b/src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingDoozer.cs
index 8897cbb076..99f7a7519e 100644
--- a/src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingDoozer.cs
+++ b/src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingDoozer.cs
@@ -13,10 +13,10 @@ using ICSharpCode.Core;
namespace ICSharpCode.Core
{
- public class DisplayBindingErbauer : IErbauer
+ public class DisplayBindingDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs b/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs
index 24aba58b0e..193b17524d 100644
--- a/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs
+++ b/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs
@@ -14,10 +14,10 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core
{
- public class LanguageBindingErbauer : IErbauer
+ public class LanguageBindingDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Base/Project/Src/Services/ParserService/Doozer/ParserDoozer.cs b/src/Main/Base/Project/Src/Services/ParserService/Doozer/ParserDoozer.cs
index 2ab7914451..d8bfae1a97 100644
--- a/src/Main/Base/Project/Src/Services/ParserService/Doozer/ParserDoozer.cs
+++ b/src/Main/Base/Project/Src/Services/ParserService/Doozer/ParserDoozer.cs
@@ -14,10 +14,10 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core
{
- public class ParserErbauer : IErbauer
+ public class ParserDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs b/src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs
index ae2fe622cb..bb896092b3 100644
--- a/src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs
+++ b/src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs
@@ -19,10 +19,14 @@ namespace ICSharpCode.Core
{
#region FindDerivedClasses
///
- /// Finds all classes deriving directly from baseClass.
+ /// Finds all classes deriving from baseClass.
///
- public static List FindDerivedClasses(IClass baseClass, IEnumerable projectContents)
+ /// The base class.
+ /// The project contents in which derived classes should be searched.
+ /// If true, gets only the classes that derive directly from .
+ public static List FindDerivedClasses(IClass baseClass, IEnumerable projectContents, bool directDerivationOnly)
{
+ baseClass = FixClass(baseClass);
string baseClassName = baseClass.Name;
string baseClassFullName = baseClass.FullyQualifiedName;
List list = new List();
@@ -47,6 +51,16 @@ namespace ICSharpCode.Core
}
}
}
+ if (!directDerivationOnly) {
+ List additional = new List();
+ foreach (IClass c in list) {
+ additional.AddRange(FindDerivedClasses(c, projectContents, directDerivationOnly));
+ }
+ foreach (IClass c in additional) {
+ if (!list.Contains(c))
+ list.Add(c);
+ }
+ }
return list;
}
#endregion
@@ -56,12 +70,25 @@ namespace ICSharpCode.Core
/// Find all references to the specified member.
///
public static List FindReferences(IMember member, IProgressMonitor progressMonitor)
+ {
+ return RunFindReferences(member.DeclaringType, member, progressMonitor);
+ }
+
+ ///
+ /// Find all references to the specified class.
+ ///
+ public static List FindReferences(IClass @class, IProgressMonitor progressMonitor)
+ {
+ return RunFindReferences(@class, null, progressMonitor);
+ }
+
+ static List RunFindReferences(IClass ownerClass, IMember member, IProgressMonitor progressMonitor)
{
if (ParserService.LoadSolutionProjectsThreadRunning) {
MessageService.ShowMessage("Find references cannot be executed until all files have been parsed.");
return null;
}
- IClass ownerClass = member.DeclaringType;
+ ownerClass = FixClass(ownerClass);
List files = GetPossibleFiles(ownerClass, member);
ParseableFileContentEnumerator enumerator = new ParseableFileContentEnumerator(files.ToArray());
List references = new List();
@@ -88,25 +115,28 @@ namespace ICSharpCode.Core
static void AddReferences(List list, IClass parentClass, IMember member, string fileName, string fileContent)
{
string lowerFileContent = fileContent.ToLower();
+ string searchedText; // the text that is searched for
- // The name of the class does not necessarily exist in the file if the name of a
- // derived class exists.
- //if (lowerFileContent.IndexOf(parentClass.Name.ToLower()) < 0) return;
-
- string lowerMemberName;
- if (member is IMethod && ((IMethod)member).IsConstructor)
- lowerMemberName = parentClass.Name.ToLower();
- else
- lowerMemberName = member.Name.ToLower();
+ if (member == null) {
+ searchedText = parentClass.Name.ToLower();
+ } else {
+ // When looking for a member, the name of the parent class does not always exist
+ // in the file where the member is accessed.
+ // (examples: derived classes, partial classes)
+ if (member is IMethod && ((IMethod)member).IsConstructor)
+ searchedText = parentClass.Name.ToLower();
+ else
+ searchedText = member.Name.ToLower();
+ }
int pos = -1;
IExpressionFinder expressionFinder = null;
- while ((pos = lowerFileContent.IndexOf(lowerMemberName, pos + 1)) >= 0) {
+ while ((pos = lowerFileContent.IndexOf(searchedText, pos + 1)) >= 0) {
if (pos > 0 && char.IsLetterOrDigit(fileContent, pos - 1)) {
continue; // memberName is not a whole word (a.SomeName cannot reference Name)
}
- if (pos < fileContent.Length - lowerMemberName.Length - 1
- && char.IsLetterOrDigit(fileContent, pos + lowerMemberName.Length))
+ if (pos < fileContent.Length - searchedText.Length - 1
+ && char.IsLetterOrDigit(fileContent, pos + searchedText.Length))
{
continue; // memberName is not a whole word (a.Name2 cannot reference Name)
}
@@ -120,8 +150,23 @@ namespace ICSharpCode.Core
// TODO: Optimize by re-using the same resolver if multiple expressions were
// found in this file (the resolver should parse all methods at once)
ResolveResult rr = ParserService.Resolve(expr, position.Y, position.X, fileName, fileContent);
- if (IsReferenceToMember(member, rr)) {
- list.Add(new Reference(fileName, pos, lowerMemberName.Length, expr.Expression, rr));
+ if (member != null) {
+ if (IsReferenceToMember(member, rr)) {
+ list.Add(new Reference(fileName, pos, searchedText.Length, expr.Expression, rr));
+ }
+ } else {
+ MemberResolveResult mrr = rr as MemberResolveResult;
+ if (mrr != null) {
+ if (mrr.ResolvedMember is IMethod && ((IMethod)mrr.ResolvedMember).IsConstructor) {
+ if (mrr.ResolvedMember.DeclaringType.FullyQualifiedName == parentClass.FullyQualifiedName) {
+ list.Add(new Reference(fileName, pos, searchedText.Length, expr.Expression, rr));
+ }
+ }
+ } else {
+ if (rr is TypeResolveResult && rr.ResolvedType.FullyQualifiedName == parentClass.FullyQualifiedName) {
+ list.Add(new Reference(fileName, pos, searchedText.Length, expr.Expression, rr));
+ }
+ }
}
}
}
@@ -142,17 +187,64 @@ namespace ICSharpCode.Core
return new Point(column, line);
}
- static List GetPossibleFiles(IClass ownerClass, IMember member)
+ ///
+ /// Gets the compound class if the class was partial.
+ ///
+ static IClass FixClass(IClass c)
+ {
+ return c.DefaultReturnType.GetUnderlyingClass();
+ }
+
+ public static List GetFileNames(IClass c)
{
+ List list = new List();
+ CompoundClass cc = c as CompoundClass;
+ if (cc != null) {
+ foreach (IClass part in cc.Parts) {
+ string fileName = part.CompilationUnit.FileName;
+ if (fileName != null)
+ list.Add(fileName);
+ }
+ } else {
+ string fileName = c.CompilationUnit.FileName;
+ if (fileName != null)
+ list.Add(fileName);
+ }
+ return list;
+ }
+
+ ///
+ /// Gets the list of files that could have a reference to the specified class.
+ ///
+ static List GetPossibleFiles(IClass c)
+ {
+ if (c.DeclaringType != null) {
+ return GetPossibleFiles(c.DeclaringType, c);
+ }
+ List resultList = new List();
+ GetPossibleFilesInternal(resultList, c.ProjectContent, c.IsInternal);
+ return resultList;
+ }
+
+ ///
+ /// Gets the files of files that could have a reference to the
+ /// int the .
+ ///
+ static List GetPossibleFiles(IClass ownerClass, IDecoration member)
+ {
+ if (member == null)
+ return GetPossibleFiles(ownerClass);
List resultList = new List();
if (member.IsPrivate) {
- string fileName = ownerClass.CompilationUnit.FileName;
- foreach (IProject p in ProjectService.OpenSolution.Projects) {
- foreach (ProjectItem item in p.Items) {
- if (item.ItemType == ItemType.Compile) {
- if (FileUtility.IsEqualFileName(fileName, item.FileName)) {
- resultList.Add(item);
- return resultList;
+ List fileNames = GetFileNames(ownerClass);
+ foreach (string fileName in fileNames) {
+ foreach (IProject p in ProjectService.OpenSolution.Projects) {
+ foreach (ProjectItem item in p.Items) {
+ if (item.ItemType == ItemType.Compile) {
+ if (FileUtility.IsEqualFileName(fileName, item.FileName)) {
+ resultList.Add(item);
+ return resultList;
+ }
}
}
}
@@ -163,17 +255,21 @@ namespace ICSharpCode.Core
// TODO: Optimize when member is protected
}
- bool internalOnly = member.IsInternal && !member.IsProtected;
-
+ GetPossibleFilesInternal(resultList, ownerClass.ProjectContent, ownerClass.IsInternal || member.IsInternal && !member.IsProtected);
+ return resultList;
+ }
+
+ static void GetPossibleFilesInternal(List resultList, IProjectContent ownerProjectContent, bool internalOnly)
+ {
foreach (IProject p in ProjectService.OpenSolution.Projects) {
IProjectContent pc = ParserService.GetProjectContent(p);
if (pc == null) continue;
- if (pc != ownerClass.ProjectContent) {
+ if (pc != ownerProjectContent) {
if (internalOnly) {
// internal = can be only referenced from same project content
continue;
}
- if (!pc.HasReferenceTo(ownerClass.ProjectContent)) {
+ if (!pc.HasReferenceTo(ownerProjectContent)) {
// unreferences project contents cannot reference the class
continue;
}
@@ -184,7 +280,6 @@ namespace ICSharpCode.Core
}
}
}
- return resultList;
}
#endregion
diff --git a/src/Main/Base/Project/Src/TextEditor/Bookmarks/ClassMemberBookmark.cs b/src/Main/Base/Project/Src/TextEditor/Bookmarks/ClassMemberBookmark.cs
index a99dc557eb..f006d18853 100644
--- a/src/Main/Base/Project/Src/TextEditor/Bookmarks/ClassMemberBookmark.cs
+++ b/src/Main/Base/Project/Src/TextEditor/Bookmarks/ClassMemberBookmark.cs
@@ -50,6 +50,36 @@ namespace ICSharpCode.SharpDevelop.Bookmarks
}
}
+ public class ClassBookmark : Bookmark
+ {
+ IClass @class;
+
+ public IClass Class {
+ get {
+ return @class;
+ }
+ set {
+ @class = value;
+ }
+ }
+
+ public ClassBookmark(IDocument document, IClass @class)
+ : base(document, @class.Region.BeginLine - 1)
+ {
+ this.@class = @class;
+ }
+
+ public override void Click(Control parent, MouseEventArgs e)
+ {
+ MenuService.ShowContextMenu(this, "/SharpDevelop/ViewContent/DefaultTextEditor/ClassBookmarkContextMenu", parent, e.X, e.Y);
+ }
+
+ public override void Draw(IconBarMargin margin, Graphics g, Point p)
+ {
+ g.DrawImageUnscaled(ClassBrowserIconService.ImageList.Images[ClassBrowserIconService.GetIcon(@class)], p);
+ }
+ }
+
public class PropertyBookmark : ClassMemberBookmark
{
IProperty property;
diff --git a/src/Main/Base/Project/Src/TextEditor/Codons/EditActionDoozer.cs b/src/Main/Base/Project/Src/TextEditor/Codons/EditActionDoozer.cs
index 18f2a94c66..bb5a4b0c01 100644
--- a/src/Main/Base/Project/Src/TextEditor/Codons/EditActionDoozer.cs
+++ b/src/Main/Base/Project/Src/TextEditor/Codons/EditActionDoozer.cs
@@ -17,11 +17,10 @@ using ICSharpCode.TextEditor.Actions;
namespace ICSharpCode.SharpDevelop.DefaultEditor.Codons
{
-// [CodonNameAttribute("EditAction")]
- public class EditActionErbauer : IErbauer
+ public class EditActionDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Base/Project/Src/TextEditor/Codons/SyntaxModeDoozer.cs b/src/Main/Base/Project/Src/TextEditor/Codons/SyntaxModeDoozer.cs
index d05343ce62..c70297d8e6 100644
--- a/src/Main/Base/Project/Src/TextEditor/Codons/SyntaxModeDoozer.cs
+++ b/src/Main/Base/Project/Src/TextEditor/Codons/SyntaxModeDoozer.cs
@@ -42,11 +42,10 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Codons
}
}
-// [CodonNameAttribute("SyntaxMode")]
- public class SyntaxModeErbauer : IErbauer
+ public class SyntaxModeDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Base/Project/Src/TextEditor/Commands/ClassBookmarkMenuBuilder.cs b/src/Main/Base/Project/Src/TextEditor/Commands/ClassBookmarkMenuBuilder.cs
new file mode 100644
index 0000000000..0be2e8ff0a
--- /dev/null
+++ b/src/Main/Base/Project/Src/TextEditor/Commands/ClassBookmarkMenuBuilder.cs
@@ -0,0 +1,155 @@
+//
+// 2002-2005 AlphaSierraPapa
+// GNU General Public License
+//
+// $Revision$
+//
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using ICSharpCode.Core;
+using ICSharpCode.TextEditor;
+using ICSharpCode.TextEditor.Document;
+using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
+using ICSharpCode.SharpDevelop.Dom;
+using ICSharpCode.SharpDevelop.Bookmarks;
+using ICSharpCode.SharpDevelop.Gui;
+using SearchAndReplace;
+using ICSharpCode.SharpDevelop.DefaultEditor.Commands;
+
+namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
+{
+ ///
+ /// Build context menu for class members in the text editor.
+ ///
+ public class ClassBookmarkMenuBuilder : ParserBookmarkMenuBuilderBase, ISubmenuBuilder
+ {
+ public ToolStripItem[] BuildSubmenu(Codon codon, object owner)
+ {
+ MenuCommand cmd;
+ ClassBookmark bookmark = (ClassBookmark)owner;
+ IClass c = bookmark.Class;
+ List list = new List();
+
+ cmd = new MenuCommand("&Rename", Rename);
+ cmd.Tag = c;
+ list.Add(cmd);
+
+ if (c.BaseTypes.Count > 0) {
+ cmd = new MenuCommand("Go to &base class", GoToBase);
+ cmd.Tag = c;
+ list.Add(cmd);
+ }
+ if (!c.IsSealed && !c.IsStatic) {
+ cmd = new MenuCommand("Find &derived classes", FindDerivedClasses);
+ cmd.Tag = c;
+ list.Add(cmd);
+ }
+
+ cmd = new MenuCommand("&Find references", FindReferences);
+ cmd.Tag = c;
+ list.Add(cmd);
+
+ return list.ToArray();
+ }
+
+ void GoToBase(object sender, EventArgs e)
+ {
+ MenuCommand item = (MenuCommand)sender;
+ IClass c = (IClass)item.Tag;
+ IClass baseClass = c.BaseClass;
+ if (baseClass != null) {
+ string fileName = baseClass.CompilationUnit.FileName;
+ if (fileName != null) {
+ FileService.JumpToFilePosition(fileName, baseClass.Region.BeginLine - 1, baseClass.Region.BeginColumn - 1);
+ }
+ }
+
+ }
+
+ void Rename(object sender, EventArgs e)
+ {
+ MenuCommand item = (MenuCommand)sender;
+ IClass c = (IClass)item.Tag;
+ c = c.DefaultReturnType.GetUnderlyingClass(); // get compound class if class is partial
+ string newName = MessageService.ShowInputBox("Rename", "Enter the new name of the class", c.Name);
+ if (!CheckName(newName)) return;
+
+ List list = RefactoringService.FindReferences(c, null);
+ if (list == null) return;
+
+ // Add the class declaration(s)
+ foreach (IClass part in GetClassParts(c)) {
+ AddDeclarationAsReference(list, part.CompilationUnit.FileName, part.Region, part.Name);
+ }
+
+ // Add the constructors
+ foreach (IMethod m in c.Methods) {
+ if (m.IsConstructor) {
+ AddDeclarationAsReference(list, m.DeclaringType.CompilationUnit.FileName, m.Region, c.Name);
+ }
+ }
+
+ RenameReferences(list, newName);
+ }
+
+ void AddDeclarationAsReference(List list, string fileName, IRegion region, string name)
+ {
+ if (fileName == null)
+ return;
+ ProvidedDocumentInformation documentInformation = GetDocumentInformation(fileName);
+ int offset = documentInformation.Document.PositionToOffset(new Point(region.BeginColumn - 1, region.BeginLine - 1));
+ string text = documentInformation.TextBuffer.GetText(offset, Math.Min(name.Length + 30, documentInformation.TextBuffer.Length - offset - 1));
+ int offsetChange = text.IndexOf(name);
+ if (offsetChange < 0)
+ return;
+ offset += offsetChange;
+ foreach (Reference r in list) {
+ if (r.Offset == offset)
+ return;
+ }
+ list.Add(new Reference(fileName, offset, name.Length, name, null));
+ }
+
+ List GetClassParts(IClass c)
+ {
+ List list;
+ CompoundClass cc = c as CompoundClass;
+ if (cc != null) {
+ list = cc.Parts;
+ } else {
+ list = new List(1);
+ list.Add(c);
+ }
+ return list;
+ }
+
+ void FindDerivedClasses(object sender, EventArgs e)
+ {
+ MenuCommand item = (MenuCommand)sender;
+ IClass c = (IClass)item.Tag;
+ List derivedClasses = RefactoringService.FindDerivedClasses(c, ParserService.AllProjectContents, false);
+
+ List results = new List();
+ foreach (IClass derivedClass in derivedClasses) {
+ if (derivedClass.CompilationUnit == null) continue;
+ if (derivedClass.CompilationUnit.FileName == null) continue;
+
+ SearchResult res = new SimpleSearchResult(derivedClass.FullyQualifiedName, new Point(derivedClass.Region.BeginColumn - 1, derivedClass.Region.BeginLine - 1));
+ res.ProvidedDocumentInformation = GetDocumentInformation(derivedClass.CompilationUnit.FileName);
+ results.Add(res);
+ }
+ SearchReplaceInFilesManager.ShowSearchResults("Classes deriving from " + c.Name, results);
+ }
+
+ void FindReferences(object sender, EventArgs e)
+ {
+ MenuCommand item = (MenuCommand)sender;
+ IClass c = (IClass)item.Tag;
+ ShowAsSearchResults("References to " + c.Name, RefactoringService.FindReferences(c, null));
+ }
+ }
+}
diff --git a/src/Main/Base/Project/Src/TextEditor/Commands/ParserBookmarkMenuBuilderBase.cs b/src/Main/Base/Project/Src/TextEditor/Commands/ParserBookmarkMenuBuilderBase.cs
new file mode 100644
index 0000000000..6f1b14fc58
--- /dev/null
+++ b/src/Main/Base/Project/Src/TextEditor/Commands/ParserBookmarkMenuBuilderBase.cs
@@ -0,0 +1,164 @@
+//
+// 2002-2005 AlphaSierraPapa
+// GNU General Public License
+//
+// $Revision$
+//
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using ICSharpCode.Core;
+using ICSharpCode.TextEditor;
+using ICSharpCode.TextEditor.Document;
+using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
+using ICSharpCode.SharpDevelop.Dom;
+using ICSharpCode.SharpDevelop.Bookmarks;
+using ICSharpCode.SharpDevelop.Gui;
+using SearchAndReplace;
+using ICSharpCode.SharpDevelop.DefaultEditor.Commands;
+
+namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
+{
+ public class ParserBookmarkMenuBuilderBase
+ {
+ protected ProvidedDocumentInformation GetDocumentInformation(string fileName)
+ {
+ foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
+ if (content is ITextEditorControlProvider &&
+ content.FileName != null &&
+ FileUtility.IsEqualFileName(content.FileName, fileName))
+ {
+ return new ProvidedDocumentInformation(((ITextEditorControlProvider)content).TextEditorControl.Document, fileName, 0);
+ }
+ }
+ ITextBufferStrategy strategy = StringTextBufferStrategy.CreateTextBufferFromFile(fileName);
+ return new ProvidedDocumentInformation(strategy, fileName, 0);
+ }
+
+ protected TextEditorControl JumpToDefinition(IMember member)
+ {
+ IViewContent viewContent = null;
+ ICompilationUnit cu = member.DeclaringType.CompilationUnit;
+ if (cu != null) {
+ string fileName = cu.FileName;
+ if (fileName != null) {
+ if (member.Region != null && member.Region.BeginLine > 0) {
+ viewContent = FileService.JumpToFilePosition(fileName, member.Region.BeginLine - 1, member.Region.BeginColumn - 1);
+ } else {
+ FileService.OpenFile(fileName);
+ }
+ }
+ }
+ ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider tecp = viewContent as ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider;
+ return (tecp == null) ? null : tecp.TextEditorControl;
+ }
+
+ protected TextEditorControl JumpBehindDefinition(IMember member)
+ {
+ IViewContent viewContent = null;
+ ICompilationUnit cu = member.DeclaringType.CompilationUnit;
+ if (cu != null) {
+ string fileName = cu.FileName;
+ if (fileName != null) {
+ if (member.Region != null && member.Region.EndLine > 0) {
+ viewContent = FileService.JumpToFilePosition(fileName, member.Region.EndLine, 0);
+ } else {
+ FileService.OpenFile(fileName);
+ }
+ }
+ }
+ ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider tecp = viewContent as ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider;
+ return (tecp == null) ? null : tecp.TextEditorControl;
+ }
+
+ protected bool CheckName(string name)
+ {
+ if (name == null || name.Length == 0)
+ return false;
+ if (!char.IsLetter(name, 0) && name[0] != '_') {
+ MessageService.ShowError("Names must start with a letter or underscore.");
+ return false;
+ }
+ for (int i = 1; i < name.Length; i++) {
+ if (!char.IsLetterOrDigit(name, i) && name[i] != '_') {
+ MessageService.ShowError("Names may only contain letters, digits or underscores.");
+ return false;
+ }
+ }
+ return true;
+ }
+
+ protected struct Modification
+ {
+ public IDocument Document;
+ public int Offset;
+ public int LengthDifference;
+
+ public Modification(IDocument document, int offset, int lengthDifference)
+ {
+ this.Document = document;
+ this.Offset = offset;
+ this.LengthDifference = lengthDifference;
+ }
+ }
+
+ protected void ModifyDocument(List modifications, IDocument doc, int offset, int length, string newName)
+ {
+ foreach (Modification m in modifications) {
+ if (m.Document == doc) {
+ if (m.Offset < offset)
+ offset += m.LengthDifference;
+ }
+ }
+ int lengthDifference = newName.Length - length;
+ doc.Replace(offset, length, newName);
+ if (lengthDifference != 0) {
+ for (int i = 0; i < modifications.Count; ++i) {
+ Modification m = modifications[i];
+ if (m.Document == doc) {
+ if (m.Offset > offset) {
+ m.Offset += lengthDifference;
+ modifications[i] = m; // Modification is a value type
+ }
+ }
+ }
+ modifications.Add(new Modification(doc, offset, lengthDifference));
+ }
+ }
+
+ protected void ShowAsSearchResults(string pattern, List list)
+ {
+ if (list == null) return;
+ List results = new List(list.Count);
+ foreach (Reference r in list) {
+ SearchResult res = new SearchResult(r.Offset, r.Length);
+ res.ProvidedDocumentInformation = GetDocumentInformation(r.FileName);
+ results.Add(res);
+ }
+ SearchReplaceInFilesManager.ShowSearchResults(pattern, results);
+ }
+
+ protected void RenameReferences(List list, string newName)
+ {
+ List modifiedContents = new List();
+ List modifications = new List();
+ foreach (Reference r in list) {
+ FileService.OpenFile(r.FileName);
+ IViewContent viewContent = FileService.GetOpenFile(r.FileName).ViewContent;
+ if (!modifiedContents.Contains(viewContent)) {
+ modifiedContents.Add(viewContent);
+ }
+ ITextEditorControlProvider p = viewContent as ITextEditorControlProvider;
+ if (p != null) {
+ ModifyDocument(modifications, p.TextEditorControl.Document, r.Offset, r.Length, newName);
+ }
+ }
+ foreach (IViewContent viewContent in modifiedContents) {
+ ParserService.ParseViewContent(viewContent);
+ }
+ }
+ }
+}
diff --git a/src/Main/Base/Project/Src/TextEditor/Conditions/TextContentCondition.cs b/src/Main/Base/Project/Src/TextEditor/Conditions/TextContentCondition.cs
index 516066467a..e76fb1ac33 100644
--- a/src/Main/Base/Project/Src/TextEditor/Conditions/TextContentCondition.cs
+++ b/src/Main/Base/Project/Src/TextEditor/Conditions/TextContentCondition.cs
@@ -16,7 +16,7 @@ using ICSharpCode.TextEditor;
namespace ICSharpCode.SharpDevelop.DefaultEditor.Conditions
{
- public class TextContentAuswerter : IAuswerter
+ public class TextContentConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs
index ca1757372d..6a00a4fcfc 100644
--- a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs
+++ b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs
@@ -131,7 +131,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
{
ambience = AmbienceService.CurrentAmbience;
- ambience.ConversionFlags |= ConversionFlags.ShowReturnType;
+ ambience.ConversionFlags = ConversionFlags.ShowReturnType | ConversionFlags.ShowParameterNames | ConversionFlags.ShowModifiers;
imageIndex = ClassBrowserIconService.GetIcon(method);
text = method.Name;
description = ambience.Convert(method);
@@ -143,7 +143,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
{
ambience = AmbienceService.CurrentAmbience;
- ambience.ConversionFlags |= ConversionFlags.ShowReturnType;
+ ambience.ConversionFlags = ConversionFlags.ShowReturnType | ConversionFlags.ShowParameterNames | ConversionFlags.ShowModifiers;
imageIndex = ClassBrowserIconService.GetIcon(field);
text = field.Name;
description = ambience.Convert(field);
@@ -155,7 +155,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
{
ambience = AmbienceService.CurrentAmbience;
- ambience.ConversionFlags |= ConversionFlags.ShowReturnType;
+ ambience.ConversionFlags = ConversionFlags.ShowReturnType | ConversionFlags.ShowParameterNames | ConversionFlags.ShowModifiers;
imageIndex = ClassBrowserIconService.GetIcon(property);
text = property.Name;
description = ambience.Convert(property);
@@ -167,7 +167,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
{
ambience = AmbienceService.CurrentAmbience;
- ambience.ConversionFlags |= ConversionFlags.ShowReturnType;
+ ambience.ConversionFlags = ConversionFlags.ShowReturnType | ConversionFlags.ShowParameterNames | ConversionFlags.ShowModifiers;
imageIndex = ClassBrowserIconService.GetIcon(e);
text = e.Name;
description = ambience.Convert(e);
diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/QuickClassBrowserPanel.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/QuickClassBrowserPanel.cs
index 4ebf566a32..38756d1a41 100644
--- a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/QuickClassBrowserPanel.cs
+++ b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/QuickClassBrowserPanel.cs
@@ -281,9 +281,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
if (currentCompilationUnit != null) {
//// Alex: when changing between files in different compilation units whole process must be restarted
//// happens usually when files are opened from different project(s)
- if (classComboBox.Items == null || classComboBox.Items.Count == 0) {
- FillClassComboBox(false);
- }
for (int i = 0; i < classComboBox.Items.Count; ++i) {
if (((ComboBoxItem)classComboBox.Items[i]).IsInside(textAreaControl.ActiveTextAreaControl.Caret.Line)) {
bool innerClassContainsCaret = false;
@@ -391,10 +388,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
membersComboBox.Items.AddRange(items.ToArray());
membersComboBox.EndUpdate();
UpdateMembersComboBox();
- } else {
- if (membersComboBox.Items.Count > 0) {
- membersComboBox.Items.Clear();
- }
}
}
@@ -408,17 +401,20 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
void FillClassComboBox(bool isUpdateRequired)
{
+ Console.WriteLine("FILL CLASS");
ArrayList items = new ArrayList();
AddClasses(items, currentCompilationUnit.Classes);
if (isUpdateRequired) {
classComboBox.BeginUpdate();
}
classComboBox.Items.Clear();
+ membersComboBox.Items.Clear();
classComboBox.Items.AddRange(items.ToArray());
if (items.Count == 1) {
try {
autoselect = false;
classComboBox.SelectedIndex = 0;
+ FillMembersComboBox();
} finally {
autoselect = true;
}
@@ -487,9 +483,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
void ComboBoxSelectedIndexChanged(object sender, System.EventArgs e)
{
ComboBox comboBox = (ComboBox)sender;
- if (comboBox.SelectedIndex < 0) {
- membersComboBox.Items.Clear();
- } else if (autoselect) {
+ if (autoselect) {
ComboBoxItem item = (ComboBoxItem)comboBox.Items[comboBox.SelectedIndex];
if (item.IsInCurrentPart) {
textAreaControl.ActiveTextAreaControl.Caret.Position = new Point(item.Column, item.Line);
diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs
index f5c7f39179..656b0d1c11 100644
--- a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs
+++ b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs
@@ -456,22 +456,33 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
bm.RemoveMarks(new Predicate(IsClassMemberBookmark));
if (parseInfo == null) return;
foreach (IClass c in parseInfo.MostRecentCompilationUnit.Classes) {
- foreach (IMethod m in c.Methods) {
- if (m.Region == null || m.Region.BeginLine <= 0) continue;
- bm.AddMark(new Bookmarks.MethodBookmark(textAreaControl.Document, m));
- }
- foreach (IProperty m in c.Properties) {
- if (m.Region == null || m.Region.BeginLine <= 0) continue;
- bm.AddMark(new Bookmarks.PropertyBookmark(textAreaControl.Document, m));
- }
- foreach (IField f in c.Fields) {
- if (f.Region == null || f.Region.BeginLine <= 0) continue;
- bm.AddMark(new Bookmarks.FieldBookmark(textAreaControl.Document, f));
- }
- foreach (IEvent e in c.Events) {
- if (e.Region == null || e.Region.BeginLine <= 0) continue;
- bm.AddMark(new Bookmarks.EventBookmark(textAreaControl.Document, e));
- }
+ AddClassMemberBookmarks(bm, c);
+ }
+ }
+
+ void AddClassMemberBookmarks(BookmarkManager bm, IClass c)
+ {
+ if (c.Region != null && c.Region.BeginLine > 0) {
+ bm.AddMark(new Bookmarks.ClassBookmark(textAreaControl.Document, c));
+ }
+ foreach (IClass innerClass in c.InnerClasses) {
+ AddClassMemberBookmarks(bm, innerClass);
+ }
+ foreach (IMethod m in c.Methods) {
+ if (m.Region == null || m.Region.BeginLine <= 0) continue;
+ bm.AddMark(new Bookmarks.MethodBookmark(textAreaControl.Document, m));
+ }
+ foreach (IProperty m in c.Properties) {
+ if (m.Region == null || m.Region.BeginLine <= 0) continue;
+ bm.AddMark(new Bookmarks.PropertyBookmark(textAreaControl.Document, m));
+ }
+ foreach (IField f in c.Fields) {
+ if (f.Region == null || f.Region.BeginLine <= 0) continue;
+ bm.AddMark(new Bookmarks.FieldBookmark(textAreaControl.Document, f));
+ }
+ foreach (IEvent e in c.Events) {
+ if (e.Region == null || e.Region.BeginLine <= 0) continue;
+ bm.AddMark(new Bookmarks.EventBookmark(textAreaControl.Document, e));
}
}
diff --git a/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/SearchReplaceInFilesManager.cs b/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/SearchReplaceInFilesManager.cs
index 97e3707682..5dc4cedc19 100644
--- a/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/SearchReplaceInFilesManager.cs
+++ b/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/SearchReplaceInFilesManager.cs
@@ -57,15 +57,15 @@ namespace SearchAndReplace
static void FinishSearchInFiles(List results)
{
- ShowSearchResults(results);
+ ShowSearchResults(SearchOptions.FindPattern, results);
}
- public static void ShowSearchResults(List results)
+ public static void ShowSearchResults(string pattern, List results)
{
PadDescriptor searchResultPanel = WorkbenchSingleton.Workbench.GetPad(typeof(SearchResultPanel));
if (searchResultPanel != null) {
searchResultPanel.BringPadToFront();
- SearchResultPanel.Instance.ShowSearchResults(SearchOptions.FindPattern, results);
+ SearchResultPanel.Instance.ShowSearchResults(pattern, results);
} else {
MessageService.ShowError("SearchResultPanel can't be created.");
}
diff --git a/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Pad/Nodes/SearchRootNode.cs b/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Pad/Nodes/SearchRootNode.cs
index 6ff7e18208..2a734c0841 100644
--- a/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Pad/Nodes/SearchRootNode.cs
+++ b/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Pad/Nodes/SearchRootNode.cs
@@ -21,6 +21,7 @@ namespace SearchAndReplace
{
List results;
string pattern;
+ int fileCount;
public List Results {
get {
@@ -28,26 +29,27 @@ namespace SearchAndReplace
}
}
- public SearchRootNode(string pattern, List results)
+ public SearchRootNode(string pattern, List results, int fileCount)
{
drawDefault = false;
this.results = results;
this.pattern = pattern;
+ this.fileCount = fileCount;
Text = GetText();
}
string GetText()
{
if (results.Count == 1) {
- if (Nodes.Count == 1) {
+ if (fileCount == 1) {
return "Occurrences of '" + pattern + "' (1 occurence in 1 file)";
} else {
- return "Occurrences of '" + pattern + "' (1 occurence in " + Nodes.Count + " files)";
+ return "Occurrences of '" + pattern + "' (1 occurence in " + fileCount + " files)";
}
} else {
- if (Nodes.Count == 1) {
+ if (fileCount == 1) {
return "Occurrences of '" + pattern + "' (" + results.Count + " occurences in 1 file)";
} else {
- return "Occurrences of '" + pattern + "' (" + results.Count + " occurences in " + Nodes.Count + " files)";
+ return "Occurrences of '" + pattern + "' (" + results.Count + " occurences in " + fileCount + " files)";
}
}
}
diff --git a/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Pad/SearchResultPanel.cs b/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Pad/SearchResultPanel.cs
index 08ee8c15dc..64660b8cdb 100644
--- a/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Pad/SearchResultPanel.cs
+++ b/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Pad/SearchResultPanel.cs
@@ -104,7 +104,7 @@ namespace SearchAndReplace
folderNodes[result.FileName].Results.Add(result);
}
- SearchRootNode searchRootNode = new SearchRootNode(curPattern, curResults);
+ SearchRootNode searchRootNode = new SearchRootNode(curPattern, curResults, folderNodes.Count);
foreach (SearchFolderNode folderNode in folderNodes.Values) {
folderNode.SetText();
searchRootNode.Nodes.Add(folderNode);
@@ -124,7 +124,7 @@ namespace SearchAndReplace
folderNodes[result.FileName].Results.Add(result);
}
- SearchRootNode searchRootNode = new SearchRootNode(curPattern, curResults);
+ SearchRootNode searchRootNode = new SearchRootNode(curPattern, curResults, folderNodes.Count);
foreach (SearchFolderNode folderNode in folderNodes.Values) {
folderNode.PerformInitialization();
foreach (SearchResultNode node in folderNode.Nodes) {
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/Codon.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/Codon.cs
index 8b38b15f41..8f64740798 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/Codon.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/Codon.cs
@@ -120,16 +120,16 @@ namespace ICSharpCode.Core
public object BuildItem(object owner, ArrayList subItems)
{
try {
- IErbauer erbauer = AddInTree.Erbauer[Name];
- if (!erbauer.HandleConditions && conditions.Length > 0) {
+ IDoozer doozer = AddInTree.Doozers[Name];
+ if (!doozer.HandleConditions && conditions.Length > 0) {
ConditionFailedAction action = GetFailedAction(owner);
if (action != ConditionFailedAction.Nothing) {
return null;
}
}
- return erbauer.BuildItem(owner, this, subItems);
+ return doozer.BuildItem(owner, this, subItems);
} catch (KeyNotFoundException) {
- throw new CoreException("Erbauer " + Name + " not found!");
+ throw new CoreException("Doozer " + Name + " not found!");
}
}
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/Condition.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/Condition.cs
index 049f903ddb..c42b68b83c 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/Condition.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/Condition.cs
@@ -58,9 +58,9 @@ namespace ICSharpCode.Core
public bool IsValid(object caller)
{
try {
- return AddInTree.Auswerter[name].IsValid(caller, this);
+ return AddInTree.ConditionEvaluators[name].IsValid(caller, this);
} catch (KeyNotFoundException) {
- throw new CoreException("Auswerter " + name + " not found!");
+ throw new CoreException("Condition evaluator " + name + " not found!");
}
}
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/CompareConditionEvaluator.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/CompareConditionEvaluator.cs
index ca03c4d3d7..34624fa85b 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/CompareConditionEvaluator.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/CompareConditionEvaluator.cs
@@ -11,9 +11,9 @@ using System.Collections;
namespace ICSharpCode.Core
{
///
- /// Description of ClassErbauer.
+ /// Condition evaluator that compares two strings.
///
- public class CompareAuswerter : IAuswerter
+ public class CompareConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/LazyConditionEvaluator.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/LazyConditionEvaluator.cs
index c6da1df102..9f83871da0 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/LazyConditionEvaluator.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/LazyConditionEvaluator.cs
@@ -11,9 +11,9 @@ using System.Collections;
namespace ICSharpCode.Core
{
///
- /// Description of ClassErbauer.
+ /// Condition evaluator that lazy-loads another condition evaluator and executes it.
///
- public class LazyLoadAuswerter : IAuswerter
+ public class LazyConditionEvaluator : IConditionEvaluator
{
AddIn addIn;
string name;
@@ -31,7 +31,7 @@ namespace ICSharpCode.Core
}
}
- public LazyLoadAuswerter(AddIn addIn, Properties properties)
+ public LazyConditionEvaluator(AddIn addIn, Properties properties)
{
this.addIn = addIn;
this.name = properties["name"];
@@ -40,14 +40,14 @@ namespace ICSharpCode.Core
public bool IsValid(object caller, Condition condition)
{
- IAuswerter auswerter = (IAuswerter)addIn.CreateObject(className);
- AddInTree.Auswerter[name] = auswerter;
- return auswerter.IsValid(caller, condition);
+ IConditionEvaluator evaluator = (IConditionEvaluator)addIn.CreateObject(className);
+ AddInTree.ConditionEvaluators[name] = evaluator;
+ return evaluator.IsValid(caller, condition);
}
public override string ToString()
{
- return String.Format("[LazyLoadAuswerter: className = {0}, name = {1}]",
+ return String.Format("[LazyLoadConditionEvaluator: className = {0}, name = {1}]",
className,
name);
}
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/OwnerStateConditionEvaluator.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/OwnerStateConditionEvaluator.cs
index a635ae1e8c..26c190747b 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/OwnerStateConditionEvaluator.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/OwnerStateConditionEvaluator.cs
@@ -17,9 +17,10 @@ namespace ICSharpCode.Core
}
///
- /// Description of ClassErbauer.
+ /// Condition evaluator that compares the state of the caller/owner with a specified value.
+ /// The caller/owner has to implement .
///
- public class OwnerStateAuswerter : IAuswerter
+ public class OwnerStateConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ClassDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ClassDoozer.cs
index 5f26b00cc9..ce0a82cfed 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ClassDoozer.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ClassDoozer.cs
@@ -11,12 +11,12 @@ using System.Collections;
namespace ICSharpCode.Core
{
///
- /// Description of ClassErbauer.
+ /// Builds an object using Reflection. The class name is specified in the addin tree.
///
- public class ClassErbauer : IErbauer
+ public class ClassDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/FileFilterDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/FileFilterDoozer.cs
index 350d396ad3..e682dc55d8 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/FileFilterDoozer.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/FileFilterDoozer.cs
@@ -10,13 +10,10 @@ using System.Collections;
namespace ICSharpCode.Core
{
- ///
- /// Description of ClassErbauer.
- ///
- public class FileFilterErbauer : IErbauer
+ public class FileFilterDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Icon/IconDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Icon/IconDoozer.cs
index cf02cecdf0..7e42979409 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Icon/IconDoozer.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Icon/IconDoozer.cs
@@ -12,10 +12,10 @@ using System.Windows.Forms;
namespace ICSharpCode.Core
{
- public class IconErbauer : IErbauer
+ public class IconDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs
index fd91edd01d..20c8b17b8f 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs
@@ -13,10 +13,10 @@ namespace ICSharpCode.Core
///
/// Includes the content of one path into another path.
///
- public class IncludeErbauer : IErbauer
+ public class IncludeDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
@@ -36,7 +36,7 @@ namespace ICSharpCode.Core
// include path (=multiple items)
return new IncludeReturnItem(caller, path);
} else {
- Console.WriteLine(" requires the attribute 'item' (to include one item) or the attribute 'path' (to include multiple items)");
+ MessageService.ShowMessage(" requires the attribute 'item' (to include one item) or the attribute 'path' (to include multiple items)");
return null;
}
}
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/LazyDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/LazyDoozer.cs
index 7fc27da3ba..933356a24d 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/LazyDoozer.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/LazyDoozer.cs
@@ -11,9 +11,9 @@ using System.Collections;
namespace ICSharpCode.Core
{
///
- /// Description of ClassErbauer.
+ /// This doozer lazy-loads another doozer when it has to build an item.
///
- public class LazyLoadErbauer : IErbauer
+ public class LazyLoadDoozer : IDoozer
{
AddIn addIn;
string name;
@@ -31,7 +31,7 @@ namespace ICSharpCode.Core
}
}
- public LazyLoadErbauer(AddIn addIn, Properties properties)
+ public LazyLoadDoozer(AddIn addIn, Properties properties)
{
this.addIn = addIn;
this.name = properties["name"];
@@ -40,25 +40,27 @@ namespace ICSharpCode.Core
}
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
get {
- return false;
+ IDoozer doozer = (IDoozer)addIn.CreateObject(className);
+ AddInTree.Doozers[name] = doozer;
+ return doozer.HandleConditions;
}
}
public object BuildItem(object caller, Codon codon, ArrayList subItems)
{
- IErbauer erbauer = (IErbauer)addIn.CreateObject(className);
- AddInTree.Erbauer[name] = erbauer;
- return erbauer.BuildItem(caller, codon, subItems);
+ IDoozer doozer = (IDoozer)addIn.CreateObject(className);
+ AddInTree.Doozers[name] = doozer;
+ return doozer.BuildItem(caller, codon, subItems);
}
public override string ToString()
{
- return String.Format("[LazyLoadErbauer: className = {0}, name = {1}]",
+ return String.Format("[LazyLoadDoozer: className = {0}, name = {1}]",
className,
name);
}
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/MenuItem/MenuItemDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/MenuItem/MenuItemDoozer.cs
index a808fad7e8..28f32ffef4 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/MenuItem/MenuItemDoozer.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/MenuItem/MenuItemDoozer.cs
@@ -11,13 +11,10 @@ using System.Collections;
namespace ICSharpCode.Core
{
- ///
- /// Description of ClassErbauer.
- ///
- public class MenuItemErbauer : IErbauer
+ public class MenuItemDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/ToolBarItemDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/ToolBarItemDoozer.cs
index d50e839930..aa14054732 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/ToolBarItemDoozer.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/ToolBarItemDoozer.cs
@@ -11,13 +11,10 @@ using System.Collections;
namespace ICSharpCode.Core
{
- ///
- /// Description of ClassErbauer.
- ///
- public class ToolbarItemErbauer : IErbauer
+ public class ToolbarItemDoozer : IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
public bool HandleConditions {
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/IBuildItemsModifier.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/IBuildItemsModifier.cs
index c6a36cd698..61b1c7a9d1 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/IBuildItemsModifier.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/IBuildItemsModifier.cs
@@ -11,13 +11,13 @@ using System.Collections;
namespace ICSharpCode.Core
{
///
- /// When a Erbauer returns an object implementing
+ /// When a doozer returns an object implementing
/// this interface, the method is called on the list of items
/// that has been built.
- /// This interface can be used to support special Erbauer
+ /// This interface can be used to support special doozers
/// that do not simply build one item but want to modify the list of items built so far.
- /// Example use is the IncludeErbauer which uses this interface to return multiple items
- /// instead of one.
+ /// Example use is the which uses this interface to return
+ /// multiple items instead of one.
///
public interface IBuildItemsModifier
{
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/IConditionEvaluator.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/IConditionEvaluator.cs
index 38b99936da..e1aa49d3ad 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/IConditionEvaluator.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/IConditionEvaluator.cs
@@ -10,9 +10,9 @@ using System;
namespace ICSharpCode.Core
{
///
- /// Description of Erbauer.
+ /// Interface for classes that can evaluate conditions defined in the addin tree.
///
- public interface IAuswerter
+ public interface IConditionEvaluator
{
bool IsValid(object caller, Condition condition);
}
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/IDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/IDoozer.cs
index 756f87723c..383aa04f5c 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/IDoozer.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/IDoozer.cs
@@ -10,10 +10,14 @@ using System.Collections;
namespace ICSharpCode.Core
{
- public interface IErbauer
+ ///
+ /// Interface for classes that can build objects out of codons.
+ ///
+ /// http://en.wikipedia.org/wiki/Fraggle_Rock#Doozers
+ public interface IDoozer
{
///
- /// Gets if the erbauer handles codon conditions on its own.
+ /// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
///
bool HandleConditions { get; }
diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/Runtime.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/Runtime.cs
index a2e6b9a1ba..d470bcb7ac 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddIn/Runtime.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddIn/Runtime.cs
@@ -18,8 +18,8 @@ namespace ICSharpCode.Core
string hintPath;
string assembly;
Assembly loadedAssembly = null;
- List definedErbauer = new List(1);
- List definedConditions = new List(1);
+ List definedDoozers = new List(1);
+ List definedConditionEvaluators = new List(1);
public Runtime(string assembly, string hintPath)
{
@@ -62,15 +62,15 @@ namespace ICSharpCode.Core
}
}
- public List DefinedErbauer {
+ public List DefinedDoozers {
get {
- return definedErbauer;
+ return definedDoozers;
}
}
- public List DefinedConditions {
+ public List DefinedConditionEvaluators {
get {
- return definedConditions;
+ return definedConditionEvaluators;
}
}
@@ -100,28 +100,28 @@ namespace ICSharpCode.Core
string nodeName = reader.LocalName;
Properties properties = Properties.ReadFromAttributes(reader);
switch (nodeName) {
- case "Erbauer":
+ case "Doozer":
if (!reader.IsEmptyElement) {
- throw new AddInLoadException("Erbauer nodes must be empty!");
+ throw new AddInLoadException("Doozer nodes must be empty!");
}
- LazyLoadErbauer lazyLoadErbauer = new LazyLoadErbauer(addIn, properties);
+ LazyLoadDoozer lazyLoadDoozer = new LazyLoadDoozer(addIn, properties);
- if (AddInTree.Erbauer.ContainsKey(lazyLoadErbauer.Name)) {
- throw new AddInLoadException("Duplicate erbauer: " + lazyLoadErbauer.Name);
+ if (AddInTree.Doozers.ContainsKey(lazyLoadDoozer.Name)) {
+ throw new AddInLoadException("Duplicate doozer: " + lazyLoadDoozer.Name);
}
- AddInTree.Erbauer.Add(lazyLoadErbauer.Name, lazyLoadErbauer);
- runtime.definedErbauer.Add(properties);
+ AddInTree.Doozers.Add(lazyLoadDoozer.Name, lazyLoadDoozer);
+ runtime.definedDoozers.Add(properties);
break;
- case "Auswerter":
+ case "ConditionEvaluator":
if (!reader.IsEmptyElement) {
- throw new AddInLoadException("Auswerter nodes must be empty!");
+ throw new AddInLoadException("ConditionEvaluator nodes must be empty!");
}
- LazyLoadAuswerter lazyLoadAuswerter = new LazyLoadAuswerter(addIn, properties);
- if (AddInTree.Auswerter.ContainsKey(lazyLoadAuswerter.Name)) {
- throw new AddInLoadException("Duplicate auswerter: " + lazyLoadAuswerter.Name);
+ LazyConditionEvaluator lazyLoadConditionEvaluator = new LazyConditionEvaluator(addIn, properties);
+ if (AddInTree.ConditionEvaluators.ContainsKey(lazyLoadConditionEvaluator.Name)) {
+ throw new AddInLoadException("Duplicate condition evaluator: " + lazyLoadConditionEvaluator.Name);
}
- AddInTree.Auswerter.Add(lazyLoadAuswerter.Name, lazyLoadAuswerter);
- runtime.definedConditions.Add(properties);
+ AddInTree.ConditionEvaluators.Add(lazyLoadConditionEvaluator.Name, lazyLoadConditionEvaluator);
+ runtime.definedConditionEvaluators.Add(properties);
break;
default:
throw new AddInLoadException("Unknown node in Import section:" + nodeName);
diff --git a/src/Main/Core/Project/Src/AddInTree/AddInTree.cs b/src/Main/Core/Project/Src/AddInTree/AddInTree.cs
index 3406157749..6c167e20e9 100644
--- a/src/Main/Core/Project/Src/AddInTree/AddInTree.cs
+++ b/src/Main/Core/Project/Src/AddInTree/AddInTree.cs
@@ -23,22 +23,22 @@ namespace ICSharpCode.Core
static List addIns = new List();
static AddInTreeNode rootNode = new AddInTreeNode();
- static Dictionary erbauer = new Dictionary();
- static Dictionary auswerter = new Dictionary();
+ static Dictionary doozers = new Dictionary();
+ static Dictionary conditionEvaluators = new Dictionary();
static AddInTree()
{
defaultCoreDirectory = FileUtility.Combine(FileUtility.SharpDevelopRootPath, "AddIns");
- erbauer.Add("Class", new ClassErbauer());
- erbauer.Add("FileFilter", new FileFilterErbauer());
- erbauer.Add("Icon", new IconErbauer());
- erbauer.Add("MenuItem", new MenuItemErbauer());
- erbauer.Add("ToolbarItem", new ToolbarItemErbauer());
- erbauer.Add("Include", new IncludeErbauer());
+ doozers.Add("Class", new ClassDoozer());
+ doozers.Add("FileFilter", new FileFilterDoozer());
+ doozers.Add("Icon", new IconDoozer());
+ doozers.Add("MenuItem", new MenuItemDoozer());
+ doozers.Add("ToolbarItem", new ToolbarItemDoozer());
+ doozers.Add("Include", new IncludeDoozer());
- auswerter.Add("Compare", new CompareAuswerter());
- auswerter.Add("Ownerstate", new OwnerStateAuswerter());
+ conditionEvaluators.Add("Compare", new CompareConditionEvaluator());
+ conditionEvaluators.Add("Ownerstate", new OwnerStateConditionEvaluator());
}
public static List AddIns {
@@ -47,15 +47,15 @@ namespace ICSharpCode.Core
}
}
- public static Dictionary Erbauer {
+ public static Dictionary Doozers {
get {
- return erbauer;
+ return doozers;
}
}
- public static Dictionary Auswerter {
+ public static Dictionary ConditionEvaluators {
get {
- return auswerter;
+ return conditionEvaluators;
}
}
diff --git a/src/Main/Core/Test/AddInTreeTests/AddInTreeLoadingTests.cs b/src/Main/Core/Test/AddInTreeTests/AddInTreeLoadingTests.cs
index 6e415664ed..cd0c15fb97 100644
--- a/src/Main/Core/Test/AddInTreeTests/AddInTreeLoadingTests.cs
+++ b/src/Main/Core/Test/AddInTreeTests/AddInTreeLoadingTests.cs
@@ -78,29 +78,29 @@ namespace ICSharpCode.Core.Tests.AddInTreeTests.Tests
-
-
-
-
+
+
+
+
";
AddIn addIn = AddIn.Load(new StringReader(addInText));
Assert.AreEqual(1, addIn.Runtimes.Count);
Assert.AreEqual(addIn.Runtimes[0].Assembly, "../bin/SharpDevelop.Base.dll");
- Assert.AreEqual(addIn.Runtimes[0].DefinedErbauer.Count, 2);
- Assert.AreEqual(addIn.Runtimes[0].DefinedErbauer[0]["name"], "MyErbauer");
- Assert.AreEqual(addIn.Runtimes[0].DefinedErbauer[0]["class"], "ICSharpCode.Core.ClassErbauer");
+ Assert.AreEqual(addIn.Runtimes[0].DefinedDoozers.Count, 2);
+ Assert.AreEqual(addIn.Runtimes[0].DefinedDoozers[0]["name"], "MyDoozer");
+ Assert.AreEqual(addIn.Runtimes[0].DefinedDoozers[0]["class"], "ICSharpCode.Core.ClassDoozer");
- Assert.AreEqual(addIn.Runtimes[0].DefinedErbauer[1]["name"], "Test");
- Assert.AreEqual(addIn.Runtimes[0].DefinedErbauer[1]["class"], "ICSharpCode.Core.ClassErbauer2");
+ Assert.AreEqual(addIn.Runtimes[0].DefinedDoozers[1]["name"], "Test");
+ Assert.AreEqual(addIn.Runtimes[0].DefinedDoozers[1]["class"], "ICSharpCode.Core.ClassDoozer2");
- Assert.AreEqual(addIn.Runtimes[0].DefinedConditions.Count, 2);
- Assert.AreEqual(addIn.Runtimes[0].DefinedConditions[0]["name"], "MyCompare");
- Assert.AreEqual(addIn.Runtimes[0].DefinedConditions[0]["class"], "ICSharpCode.Core.CompareCondition");
+ Assert.AreEqual(addIn.Runtimes[0].DefinedConditionEvaluators.Count, 2);
+ Assert.AreEqual(addIn.Runtimes[0].DefinedConditionEvaluators[0]["name"], "MyCompare");
+ Assert.AreEqual(addIn.Runtimes[0].DefinedConditionEvaluators[0]["class"], "ICSharpCode.Core.CompareCondition");
- Assert.AreEqual(addIn.Runtimes[0].DefinedConditions[1]["name"], "Condition2");
- Assert.AreEqual(addIn.Runtimes[0].DefinedConditions[1]["class"], "Condition2Class");
+ Assert.AreEqual(addIn.Runtimes[0].DefinedConditionEvaluators[1]["name"], "Condition2");
+ Assert.AreEqual(addIn.Runtimes[0].DefinedConditionEvaluators[1]["class"], "Condition2Class");
}
#endregion
diff --git a/src/Main/StartUp/Project/SharpDevelopMain.cs b/src/Main/StartUp/Project/SharpDevelopMain.cs
index 0557ae00e4..b3c3f2a7ed 100644
--- a/src/Main/StartUp/Project/SharpDevelopMain.cs
+++ b/src/Main/StartUp/Project/SharpDevelopMain.cs
@@ -145,27 +145,27 @@ namespace ICSharpCode.SharpDevelop
// string [] addInDirs = ICSharpCode.SharpDevelop.AddInSettingsHandler.GetAddInDirectories(out ignoreDefaultPath);
// SetAddInDirectories(addInDirs, ignoreDefaultPath);
- AddInTree.Auswerter.Add("ActiveContentExtension", new ActiveContentExtensionAuswerter());
- AddInTree.Auswerter.Add("ActiveViewContentUntitled", new ActiveViewContentUntitledAuswerter());
- AddInTree.Auswerter.Add("ActiveWindowState", new ActiveWindowStateAuswerter());
- AddInTree.Auswerter.Add("CombineOpen", new CombineOpenAuswerter());
- AddInTree.Auswerter.Add("DebuggerSupports", new DebuggerSupportsAuswerter());
- AddInTree.Auswerter.Add("IsProcessRunning", new IsProcessRunningAuswerter());
- AddInTree.Auswerter.Add("OpenWindowState", new OpenWindowStateAuswerter());
- AddInTree.Auswerter.Add("WindowActive", new WindowActiveAuswerter());
- AddInTree.Auswerter.Add("WindowOpen", new WindowOpenAuswerter());
- AddInTree.Auswerter.Add("ProjectActive", new ProjectActiveAuswerter());
- AddInTree.Auswerter.Add("ProjectOpen", new ProjectOpenAuswerter());
- AddInTree.Auswerter.Add("TextContent", new ICSharpCode.SharpDevelop.DefaultEditor.Conditions.TextContentAuswerter());
+ AddInTree.ConditionEvaluators.Add("ActiveContentExtension", new ActiveContentExtensionConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("ActiveViewContentUntitled", new ActiveViewContentUntitledConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("ActiveWindowState", new ActiveWindowStateConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("CombineOpen", new CombineOpenConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("DebuggerSupports", new DebuggerSupportsConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("IsProcessRunning", new IsProcessRunningConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("OpenWindowState", new OpenWindowStateConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("WindowActive", new WindowActiveConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("WindowOpen", new WindowOpenConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("ProjectActive", new ProjectActiveConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("ProjectOpen", new ProjectOpenConditionEvaluator());
+ AddInTree.ConditionEvaluators.Add("TextContent", new ICSharpCode.SharpDevelop.DefaultEditor.Conditions.TextContentConditionEvaluator());
- AddInTree.Erbauer.Add("DialogPanel", new DialogPanelErbauer());
- AddInTree.Erbauer.Add("DisplayBinding", new DisplayBindingErbauer());
- AddInTree.Erbauer.Add("Pad", new PadErbauer());
- AddInTree.Erbauer.Add("LanguageBinding", new LanguageBindingErbauer());
- AddInTree.Erbauer.Add("Parser", new ParserErbauer());
- AddInTree.Erbauer.Add("EditAction", new ICSharpCode.SharpDevelop.DefaultEditor.Codons.EditActionErbauer());
- AddInTree.Erbauer.Add("SyntaxMode", new ICSharpCode.SharpDevelop.DefaultEditor.Codons.SyntaxModeErbauer());
- AddInTree.Erbauer.Add("BrowserSchemeExtension", new ICSharpCode.SharpDevelop.BrowserDisplayBinding.SchemeExtensionErbauer());
+ AddInTree.Doozers.Add("DialogPanel", new DialogPanelDoozer());
+ AddInTree.Doozers.Add("DisplayBinding", new DisplayBindingDoozer());
+ AddInTree.Doozers.Add("Pad", new PadDoozer());
+ AddInTree.Doozers.Add("LanguageBinding", new LanguageBindingDoozer());
+ AddInTree.Doozers.Add("Parser", new ParserDoozer());
+ AddInTree.Doozers.Add("EditAction", new ICSharpCode.SharpDevelop.DefaultEditor.Codons.EditActionDoozer());
+ AddInTree.Doozers.Add("SyntaxMode", new ICSharpCode.SharpDevelop.DefaultEditor.Codons.SyntaxModeDoozer());
+ AddInTree.Doozers.Add("BrowserSchemeExtension", new ICSharpCode.SharpDevelop.BrowserDisplayBinding.SchemeExtensionDoozer());
PropertyService.Load();