From fe1588af5c0ed78a47ffedbb2950176540158409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Thu, 17 Jun 2010 16:08:35 +0200 Subject: [PATCH] Changed field to a record in the signature. --- global/modules.ml | 3 ++- global/signature.ml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/global/modules.ml b/global/modules.ml index 2b7f389..fff3085 100644 --- a/global/modules.ml +++ b/global/modules.ml @@ -26,6 +26,7 @@ type env = mutable types: type_def NamesEnv.t; mutable constr: ty NamesEnv.t; mutable structs : structure NamesEnv.t; + mutable fields: name NamesEnv.t; format_version : string; } @@ -37,7 +38,7 @@ type modules = let current = { name = ""; values = NamesEnv.empty; types = NamesEnv.empty; - constr = NamesEnv.empty; structs = NamesEnv.empty; + constr = NamesEnv.empty; structs = NamesEnv.empty; fields = NamesEnv.empty; format_version = interface_format_version } let modules = diff --git a/global/signature.ml b/global/signature.ml index 22a1a5a..e42d727 100644 --- a/global/signature.ml +++ b/global/signature.ml @@ -16,7 +16,7 @@ open Static let interface_format_version = "6" (** Node argument *) -type arg = { a_type : ty; a_name : name option } +type arg = { a_name : name option; a_type : ty } type param = { p_name : name } @@ -27,7 +27,8 @@ type node = node_params : param list; (** Static parameters *) node_params_constraints : size_constr list } -type structure = (name * ty) list +type field = { f_name : name; f_type : ty } +type structure = field list type type_def = | Tabstract | Tenum of name list | Tstruct of structure