From 9fbc5e48ea8183dda8fdb652364c0c29f8a309d5 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 1 Nov 2017 14:53:09 +0100 Subject: Made scTypes.types private. --- odf/odf.ml | 8 +++----- odf/odf_ExpressionParser.mly | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'odf') diff --git a/odf/odf.ml b/odf/odf.ml index b091bc9..8fa3411 100755 --- a/odf/odf.ml +++ b/odf/odf.ml @@ -30,17 +30,15 @@ let load_formula formula = let load_content content = begin function | "float" -> Expression.Basic ( - ScTypes.Num ( - ScTypes.Number, + ScTypes.number ( DataType.Num.of_num (Tools.Num.of_float_string content) )) | "date" -> Expression.Basic ( - ScTypes.Num ( - ScTypes.Date, + ScTypes.date ( DataType.Num.of_num (Tools.Num.of_float_string content) )) | _ -> Expression.Basic ( - ScTypes.Str ( + ScTypes.string ( UTF8.from_utf8string content)) end diff --git a/odf/odf_ExpressionParser.mly b/odf/odf_ExpressionParser.mly index 1b60e1c..190e6f1 100755 --- a/odf/odf_ExpressionParser.mly +++ b/odf/odf_ExpressionParser.mly @@ -43,8 +43,7 @@ value: | LETTERS COLON EQ expr EOF {$4} expr: - | num {Value (Num ( - Number, + | num {Value (number ( DataType.Num.of_num @@ snd $1 ))} | MINUS expr {Call (F.sub, [$2])} @@ -54,7 +53,7 @@ expr: | L_SQ_BRACKET ref R_SQ_BRACKET {$2} | LPAREN expr RPAREN {Expression $2} - | STR {Value (Str (u $1))} + | STR {Value (string (u $1))} (* Mathematical operators *) | expr MINUS expr {Call (F.sub, [$1; $3])} -- cgit v1.2.3