2008-11-05 Francisco Figueiredo Jr. <francisco@npgsql.org>
[mono.git] / mcs / mcs / cs-parser.jay
index 8d476308425fcc14d36f094d51ff0111300735ed..82665c5e9d1b92c107b51f89c22c0e58908ec6ab 100644 (file)
@@ -1738,7 +1738,7 @@ get_accessor_declaration
          accessor_body
          {
                if (has_get) {
-                       Report.Error (1007, (Location) $3, "Property accessor already defined");
+                       Report.Error (1007, GetLocation ($3), "Property accessor already defined");
                        break;
                }
                Accessor accessor = new Accessor ((ToplevelBlock) $5, (int) $2, (Attributes) $1, current_local_parameters, (Location) $3);
@@ -1773,7 +1773,7 @@ set_accessor_declaration
          accessor_body
          {
                if (has_set) {
-                       Report.Error (1007, ((LocatedToken) $3).Location, "Property accessor already defined");
+                       Report.Error (1007, GetLocation ($3), "Property accessor already defined");
                        break;
                }
                Accessor accessor = new Accessor ((ToplevelBlock) $5, (int) $2, (Attributes) $1, current_local_parameters, (Location) $3);
@@ -2040,11 +2040,13 @@ conversion_operator_declarator
          }
        | IMPLICIT error 
          {
-               syntax_error ((Location) $1, "'operator' expected");
+               Error_SyntaxError (yyToken);
+               $$ = new OperatorDeclaration (Operator.OpType.Implicit, null, GetLocation ($1));
          }
        | EXPLICIT error 
          {
-               syntax_error ((Location) $1, "'operator' expected");
+               Error_SyntaxError (yyToken);
+               $$ = new OperatorDeclaration (Operator.OpType.Explicit, null, GetLocation ($1));
          }
        ;