]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
fix missing support for floats in json_conv codegen
authorPrashanth Mundkur <prashanth.mundkur@citrix.com>
Fri, 15 May 2009 17:07:29 +0000 (10:07 -0700)
committerPrashanth Mundkur <prashanth.mundkur@citrix.com>
Fri, 15 May 2009 17:07:29 +0000 (10:07 -0700)
gen/json_conv/codegen.ml
gen/json_conv/parser.mly
gen/json_conv/syntax.ml

index e22725fdbd3270552ae09a375d266544372d03a3..d0020d78945990ac440afb5cf442041647b47adc 100644 (file)
@@ -27,6 +27,7 @@ let base_to_str = function
        | B_string -> "Json_conv.string"
        | B_int -> "Json_conv.int"
        | B_int64 -> "Json_conv.int64"
+       | B_float -> "Json_conv.float"
        | B_bool -> "Json_conv.bool"
        | B_ident s -> s
 
@@ -61,7 +62,7 @@ module Var_env = struct
 
        let base_to_stem = function
        | B_string -> "str"     | B_int -> "int"        | B_int64 -> "int64"
-       | B_bool -> "bool"      | B_ident s -> s
+       | B_bool -> "bool"      | B_float -> "float"    | B_ident s -> s
 
        let complex_type_to_stem = function
        | C_base b -> base_to_stem b    | C_option _ -> "opt"   | C_list _ -> "lst"
index ab904dc78439f58fee610baf732829d18d739598..8eed7ad89c5a7e89648a38abb95cf4927210ac31 100644 (file)
@@ -103,6 +103,7 @@ base:
                  | "string" -> B_string
                  | "int"    -> B_int
                  | "int64"  -> B_int64
+                 | "float"  -> B_float
                  | "bool"   -> B_bool
                  | s        -> B_ident s
                }
index 8cf0d0d5d5728a5fe46cf9f58a29c1a788693005..31b9aa9f92d41ff995b2194ac49196feca717971 100644 (file)
@@ -26,6 +26,7 @@ type base_type =
        | B_string
        | B_int
        | B_int64
+       | B_float
        | B_bool
        | B_ident of string