Author: marek
Date: 2007-05-06 18:12:28 -0400 (Sun, 06 May 2007)
New Revision: 76802
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/cs-parser.jay
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/cs-tokenizer.cs
Log:
2007-05-06 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #81500
* cs-parser.jay: Add special handling for coalescing operator.
2007-05-06 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #81500
* cs-tokenizer.cs: Add special handling for coalescing operator.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2007-05-06 20:26:01 UTC (rev 76801)
+++ trunk/mcs/gmcs/ChangeLog 2007-05-06 22:12:28 UTC (rev 76802)
@@ -1,3 +1,8 @@
+2007-05-06 Marek Safar <[EMAIL PROTECTED]>
+
+ A fix for bug #81500
+ * cs-parser.jay: Add special handling for coalescing operator.
+
2007-05-02 Raja R Harinath <[EMAIL PROTECTED]>
Fix regression in cs0631-3.cs
Modified: trunk/mcs/gmcs/cs-parser.jay
===================================================================
--- trunk/mcs/gmcs/cs-parser.jay 2007-05-06 20:26:01 UTC (rev 76801)
+++ trunk/mcs/gmcs/cs-parser.jay 2007-05-06 22:12:28 UTC (rev 76802)
@@ -279,6 +279,7 @@
%token OP_XOR_ASSIGN "^="
%token OP_OR_ASSIGN "|="
%token OP_PTR "->"
+%token OP_COALESCING "??"
/* Numbers */
%token LITERAL_INTEGER "int literal"
@@ -3847,9 +3848,9 @@
{
$$ = new Conditional ((Expression) $1, (Expression) $3,
(Expression) $5);
}
- | conditional_or_expression INTERR INTERR expression
+ | conditional_or_expression OP_COALESCING expression
{
- $$ = new Nullable.NullCoalescingOperator ((Expression) $1,
(Expression) $4, lexer.Location);
+ $$ = new Nullable.NullCoalescingOperator ((Expression) $1,
(Expression) $3, lexer.Location);
}
// We'll be resolved into a `parenthesized_expression_0' later on.
| conditional_or_expression INTERR CLOSE_PARENS
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2007-05-06 20:26:01 UTC (rev 76801)
+++ trunk/mcs/mcs/ChangeLog 2007-05-06 22:12:28 UTC (rev 76802)
@@ -1,5 +1,10 @@
2007-05-06 Marek Safar <[EMAIL PROTECTED]>
+ A fix for bug #81500
+ * cs-tokenizer.cs: Add special handling for coalescing operator.
+
+2007-05-06 Marek Safar <[EMAIL PROTECTED]>
+
A fix for bug #81529
* attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
its value from base class until it is redefined.
Modified: trunk/mcs/mcs/cs-tokenizer.cs
===================================================================
--- trunk/mcs/mcs/cs-tokenizer.cs 2007-05-06 20:26:01 UTC (rev 76801)
+++ trunk/mcs/mcs/cs-tokenizer.cs 2007-05-06 22:12:28 UTC (rev 76802)
@@ -887,6 +887,13 @@
val = Location;
return Token.TILDE;
case '?':
+#if GMCS_SOURCE
+ d = peek_char ();
+ if (d == '?') {
+ get_char ();
+ return Token.OP_COALESCING;
+ }
+#endif
return Token.INTERR;
}
#if GMCS_SOURCE
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches