[svn] r7499: nemerle/trunk/ncc/parsing/Lexer.n

divan svnadmin at nemerle.org
Tue Feb 27 02:04:01 CET 2007


Log:
Fix bug 956.

Author: divan
Date: Tue Feb 27 02:04:00 2007
New Revision: 7499

Modified:
   nemerle/trunk/ncc/parsing/Lexer.n

Modified: nemerle/trunk/ncc/parsing/Lexer.n
==============================================================================
--- nemerle/trunk/ncc/parsing/Lexer.n	(original)
+++ nemerle/trunk/ncc/parsing/Lexer.n	Tue Feb 27 02:04:00 2007
@@ -1438,14 +1438,23 @@
       res
     }
     and highest () {
-      def h = high ();
+      mutable res = high ();
+      def loop () {
       match (tokens) {
-        | "==" :: xs => tokens = xs; h == high ();
-        | "!=" :: xs => tokens = xs; h != high ();
-        | _ => h
+          | "==" :: xs => 
+            tokens = xs; res = high () == res; loop ()
+          | "!=" :: xs => 
+            tokens = xs; res = high () != res; loop ()
+          | _ => ()
       }
+      }
+      loop ();
+      res
     };
-    highest ()
+    def res = highest ();
+    when (tokens != [])
+      throw LexerBase.Error ("Unexpected token after expression");
+    res
   }
 
   public static this () 



More information about the svn mailing list