Author: olivier
Date: 2007-06-25 02:44:02 -0400 (Mon, 25 Jun 2007)
New Revision: 80670

Modified:
   
trunk/olive/class/Microsoft.JScript.Compiler/Microsoft.JScript.Compiler/ChangeLog
   
trunk/olive/class/Microsoft.JScript.Compiler/Microsoft.JScript.Compiler/Parser.cs
Log:
2007-06-25  Olivier Dufour  <[EMAIL PROTECTED]>

        * Parser.cs : fix UnaryExpression to avoid infinite loop
        

Modified: 
trunk/olive/class/Microsoft.JScript.Compiler/Microsoft.JScript.Compiler/ChangeLog
===================================================================
--- 
trunk/olive/class/Microsoft.JScript.Compiler/Microsoft.JScript.Compiler/ChangeLog
   2007-06-25 06:38:57 UTC (rev 80669)
+++ 
trunk/olive/class/Microsoft.JScript.Compiler/Microsoft.JScript.Compiler/ChangeLog
   2007-06-25 06:44:02 UTC (rev 80670)
@@ -1,3 +1,7 @@
+2007-06-25  Olivier Dufour  <[EMAIL PROTECTED]>
+
+       * Parser.cs : fix UnaryExpression to avoid infinite loop
+       
 2007-06-24  Olivier Dufour  <[EMAIL PROTECTED]>
 
        * Parser.cs : fix for statement

Modified: 
trunk/olive/class/Microsoft.JScript.Compiler/Microsoft.JScript.Compiler/Parser.cs
===================================================================
--- 
trunk/olive/class/Microsoft.JScript.Compiler/Microsoft.JScript.Compiler/Parser.cs
   2007-06-25 06:38:57 UTC (rev 80669)
+++ 
trunk/olive/class/Microsoft.JScript.Compiler/Microsoft.JScript.Compiler/Parser.cs
   2007-06-25 06:44:02 UTC (rev 80670)
@@ -712,45 +712,46 @@
                        // get by first token
                        switch (current.Kind) {
                                case Token.Type.delete:
+                                       Next ();
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), Expression.Operation.delete, new TextSpan (start, 
current));
-                                       Next ();
                                        break;
                                case [EMAIL PROTECTED]:
+                                       Next ();
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), [EMAIL PROTECTED], new TextSpan (start, current));
-                                       Next ();
                                        break;
                                case [EMAIL PROTECTED]:
+                                       Next (); 
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), [EMAIL PROTECTED], new TextSpan (start, current));
-                                       Next (); 
                                        break;
                                case Token.Type.PlusPlus:
+                                       Next ();
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), Expression.Operation.PrefixPlusPlus, new TextSpan 
(start, current));
-                                       Next ();
                                        break;
                                case Token.Type.MinusMinus:
+                                       Next ();
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), Expression.Operation.PrefixMinusMinus, new 
TextSpan (start, current));
-                                       Next ();
                                        break;
                                case Token.Type.Plus:
+                                       Next ();
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), Expression.Operation.PrefixPlus, new TextSpan 
(start, current));
-                                       Next ();
                                        break;
                                case Token.Type.Minus:
+                                       Next ();
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), Expression.Operation.PrefixMinus, new TextSpan 
(start, current)); 
-                                       Next ();
                                        break;
                                case Token.Type.Tilda:
+                                       Next ();
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), Expression.Operation.Tilda, new TextSpan (start, 
current));
-                                       Next ();
                                        break;
                                case Token.Type.Bang:
+                                       Next ();
                                        expr = new UnaryOperatorExpression 
(this.ParseExpression (noIn), Expression.Operation.Bang, new TextSpan (start, 
current));
-                                       Next ();
                                        break;
                                default:
                                        expr = ParsePostfixExpression ();
                                        break;
                        }
+                       //Next (); //go ahead
                        return expr;
                }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to