Project

General

Profile

« Previous | Next » 

Revision 22a34b49

Added by Christophe Garion about 6 years ago

  • ID 22a34b49c4a5001b78734ad5ffae8704f9a89aaa
  • Parent 1d0fd52b

json-parser: starting changing datatypes

View differences:

src/tools/stateflow/json-parser/json_parser.ml
1 1
open Basetypes
2 2
open Corelang
3 3
open Datatype
4
open LustreSpec
4
open Lustre_types
5 5
open Str
6 6
open Yojson
7 7
open Basic
......
150 150
    Logs.debug (fun m -> m "parse_variable %s" (json |> member "name" |> to_string));
151 151
    let location                  = Location.dummy_loc in
152 152
    let (datatype, initial_value) = lustre_datatype_of_json json location in
153
    mkvar_decl location ~orig:true
154
      ( json |> member "name" |> to_string,
155
        {ty_dec_desc = datatype;  ty_dec_loc = location},
156
        {ck_dec_desc = Ckdec_any; ck_dec_loc = location},
157
        true,
158
        Some initial_value
159
      )
153
    (mkvar_decl location ~orig:true
154
       ( json |> member "name" |> to_string,
155
         {ty_dec_desc = datatype;  ty_dec_loc = location},
156
         {ck_dec_desc = Ckdec_any; ck_dec_loc = location},
157
         true,
158
         Some initial_value,
159
         None
160
       ),
161
     mkexpr location (Expr_const (Const_int 1))
162
    )
160 163
end
161

  

Also available in: Unified diff