From 82a249d50856dff025cc5c8924997cd2f3418dfa Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Thu, 1 Oct 2015 18:43:00 -0500
Subject: [PATCH] Parse C single prec float literals out of OCCA defs

---
 bin/loopy | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bin/loopy b/bin/loopy
index 57dac8038..ef4be0744 100644
--- a/bin/loopy
+++ b/bin/loopy
@@ -24,6 +24,15 @@ def to_python_literal(value):
         # It's a float
         return repr(float(value))
 
+    if value.endswith("f"):
+        try:
+            float(value[:-1])
+        except ValueError:
+            pass
+        else:
+            # It's a float
+            return repr(float(value[:-1]))
+
     return repr(value)
 
 
-- 
GitLab