package lutin

  1. Overview
  2. Docs

TYPE/BINDING CHECK : infos associées aux idents

------------------------------------------------------------

Information attachées idents au cours du type/binding check

N.B. les exceptions ont traités comme des constantes abstraites de type CkTypeEff.except

----------------------------------------------------------

type extern_info = {
  1. ed_lib_name : string;
  2. ed_lib_desc : Ezdl.t;
  3. ed_sym : Ezdl.cfunc;
}
type t = {
  1. ii_name : string;
  2. ii_def_ident : Syntaxe.ident option;
  3. ii_nature : nature;
  4. ii_type : CkTypeEff.t list;
  5. ii_hideable : bool;
}
and nature =
  1. | Formal_param
  2. | Support_var
  3. | Const_ident
  4. | Def_ident of Syntaxe.let_info
  5. | Macro_ident of Syntaxe.let_info option * CkTypeEff.profile
  6. | Node_ident of Syntaxe.node_info option * CkTypeEff.profile
  7. | External_func of Syntaxe.let_info option * extern_info option * CkTypeEff.profile
val get_nature : t -> nature
val get_type : t -> CkTypeEff.t
val is_predef : t -> bool
val is_extern : t -> bool
val def_ident : t -> Syntaxe.ident

CRÉATION DES INFOS

val of_support : Syntaxe.ident -> CkTypeEff.t -> t
val of_param : Syntaxe.ident -> CkTypeEff.t -> t

Les constantes abstraites peuvent être :

  • globales, auquels cas il est interdit de les re-définir localement
  • locales, auquels cas on a le droit de redéfinir localement
val of_global_cst : Syntaxe.ident -> CkTypeEff.t -> t
val of_local_cst : Syntaxe.ident -> CkTypeEff.t -> t

macro/alias : on garde toute les infos du let

val of_extern : Syntaxe.ident -> CkTypeEff.profile -> Syntaxe.let_info -> extern_info option -> t

extern : cas simplifie du precedent

val of_predef_op : string -> CkTypeEff.profile -> t

opérateur prédéfini : juste un nom et un profil

val of_predef_cst : string -> CkTypeEff.t -> t

constante prédéfinie : juste un nom et un type

val to_string : t -> string
val is_hideable : t -> bool