package lutin

  1. Overview
  2. Docs

Module CkIdentInfoSource

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

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

Sourcetype extern_info = {
  1. ed_lib_name : string;
  2. ed_lib_desc : Ezdl.t;
  3. ed_sym : Ezdl.cfunc;
}
Sourcetype 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;
}
Sourceand 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
Sourceval get_nature : t -> nature
Sourceval get_type : t -> CkTypeEff.t
Sourceval is_predef : t -> bool
Sourceval is_extern : t -> bool
Sourceval def_ident : t -> Syntaxe.ident

CRÉATION DES INFOS

Sourceval of_support : Syntaxe.ident -> CkTypeEff.t -> t
Sourceval 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
Sourceval of_global_cst : Syntaxe.ident -> CkTypeEff.t -> t
Sourceval of_local_cst : Syntaxe.ident -> CkTypeEff.t -> t

macro/alias : on garde toute les infos du let

extern : cas simplifie du precedent

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

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

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

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

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