c/lib/schema.c | 4 ++++ go/schema/check.go | 4 ++++ spec/schema/cmds | 1 + tcl/schema.tcl | 2 +- diff --git a/c/lib/schema.c b/c/lib/schema.c index 6efc5e39cd91085ec0a3a9b75a4ba1193d2f1fcef96a6bbe33ce93f19cf10bdd..a1f1d45d64f1f89b2057ca2c82b0b3ed623312ede614043af8413352b4b2977d 100644 --- a/c/lib/schema.c +++ b/c/lib/schema.c @@ -43,6 +43,7 @@ static const char TypeBin[] = "B"; static const char TypeBlob[] = "O"; static const char TypeBool[] = "b"; +static const char TypeFloat[] = "F"; static const char TypeInt[] = "I"; static const char TypeList[] = "L"; static const char TypeMagic[] = "K"; @@ -364,6 +365,9 @@ } else if (KEKSStrEqual(&(schema->list[idxSchema].atom), TypeInt)) { expected[idxExpected] = KEKSItemPint; idxExpected++; expected[idxExpected] = KEKSItemNint; + idxExpected++; + } else if (KEKSStrEqual(&(schema->list[idxSchema].atom), TypeFloat)) { + expected[idxExpected] = KEKSItemFloat; idxExpected++; } else if (KEKSStrEqual(&(schema->list[idxSchema].atom), TypeList)) { expected[idxExpected] = KEKSItemList; diff --git a/go/schema/check.go b/go/schema/check.go index c8988d37811e68b267eee38997b94ba475e2f00fa4d4c6136579b4e2bd96a702..73284135705de12f1124f05760061f6bf5a6f7662de58924240fa4b590ec4b7f 100644 --- a/go/schema/check.go +++ b/go/schema/check.go @@ -300,6 +300,8 @@ case "N": expected = append(expected, types.NIL) case "b": expected = append(expected, types.Bool) + case "F": + expected = append(expected, types.Float) case "I": expected = append(expected, types.UInt, types.Int) case "L": @@ -337,6 +339,8 @@ case uint64: typ = types.UInt case int64: typ = types.Int + case float64: + typ = types.Float case []any: typ = types.List case map[string]any: diff --git a/spec/schema/cmds b/spec/schema/cmds index 1ad7573e8e7894293c311896704d8ef71624f94298785a93ede7ee9299d0f31d..145b35f63ced758871b2c94eaecf05e956a9211974117e3c7669e1bb77de5a29 100644 --- a/spec/schema/cmds +++ b/spec/schema/cmds @@ -42,6 +42,7 @@ "B"(IN) (BL)"O"(B) "b"OOL + "F"(LOAT) "I"(NT) "L"(IST) "K"(EKS) MAGIC diff --git a/tcl/schema.tcl b/tcl/schema.tcl index 1462a3ecaad7b4c49aeffc1cfab565f8d55a7063650f0b1c229c64cf21ae393f..f2e1ad5043b5525a0908840fa6f29761a21c1e24efae1f61b055db9e733eed98 100644 --- a/tcl/schema.tcl +++ b/tcl/schema.tcl @@ -43,7 +43,7 @@ } proc TYPE {types} { set knownTypes [dict create \ - bin B blob O bool b int I list L magic K map M nil N str S tai T] + bin B blob O bool b int I float F list L magic K map M nil N str S tai T] set l {{STR T}} foreach t $types { lappend l [list STR [dict get $knownTypes [string tolower $t]]]