vala r1295 - in trunk: . vala



Author: juergbi
Date: Mon Apr 21 19:27:00 2008
New Revision: 1295
URL: http://svn.gnome.org/viewvc/vala?rev=1295&view=rev

Log:
2008-04-21  Juerg Billeter  <j bitron ch>

	* vala/valaintegerliteral.vala, vala/valarealliteral.vala:
	  accept lower-case suffixes for integer and real literals,
	  based on patch by Jaap A. Haitsma, fixes bug 528968


Modified:
   trunk/ChangeLog
   trunk/vala/valaintegerliteral.vala
   trunk/vala/valarealliteral.vala

Modified: trunk/vala/valaintegerliteral.vala
==============================================================================
--- trunk/vala/valaintegerliteral.vala	(original)
+++ trunk/vala/valaintegerliteral.vala	Mon Apr 21 19:27:00 2008
@@ -60,13 +60,13 @@
 		string number = value;
 	
 		int l = 0;
-		while (number.has_suffix ("L")) {
+		while (number.has_suffix ("l") || number.has_suffix ("L")) {
 			l++;
 			number = number.ndup (number.size () - 1);
 		}
 
 		bool u = false;
-		if (number.has_suffix ("U")) {
+		if (number.has_suffix ("u") || number.has_suffix ("U")) {
 			u = true;
 			number = number.ndup (number.size () - 1);
 		}

Modified: trunk/vala/valarealliteral.vala
==============================================================================
--- trunk/vala/valarealliteral.vala	(original)
+++ trunk/vala/valarealliteral.vala	Mon Apr 21 19:27:00 2008
@@ -53,7 +53,7 @@
 	 * @return the name of literal type
 	 */
 	public string get_type_name () {
-		if (value.has_suffix ("F")) {
+		if (value.has_suffix ("f") || value.has_suffix ("F")) {
 			return "float";
 		}
 		



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]