[Monodevelop-patches-list] r436 - trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Lexer

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sat Jan 10 22:51:36 EST 2004


Author: benm
Date: 2004-01-10 22:51:36 -0500 (Sat, 10 Jan 2004)
New Revision: 436

Modified:
   trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Lexer/Lexer.cs
Log:
fix lexing on unmarked longs and ulongs

Modified: trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Lexer/Lexer.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Lexer/Lexer.cs	2004-01-11 03:32:31 UTC (rev 435)
+++ trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Lexer/Lexer.cs	2004-01-11 03:51:36 UTC (rev 436)
@@ -490,7 +490,15 @@
 				} else {
 					try {
 						return new Token(Tokens.Literal, x, y, digit, Int32.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
-					} catch (Exception) {
+					} catch (Exception) {
+						try {
+							return new Token(Tokens.Literal, x, y, digit, Int64.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+						} catch {}
+							
+						try {
+							return new Token(Tokens.Literal, x, y, digit, UInt64.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+						} catch {}
+						
 						errors.Error(y, x, String.Format("Can't parse int {0}", digit));
 						return new Token(Tokens.Literal, x, y, digit, 0);
 					}




More information about the Monodevelop-patches-list mailing list