(** * types.ml * ColorML_v2 project * (C) Lilian Besson, 2014 *) type espace_blanc = | Espace of int | Tabulation of int | Nouvelle_ligne of int ;; type entites_Ocaml = | Espace_blanc of espace_blanc | Rien_de_special of string | Commentaire_simple of string | Commentaire_odoc of string | Preprocesseur of string | Chaine_de_caracteres of string | Constantes_specg of string | Constantes_specd of string | Constantes_spec of string | Constantes of string | Types_de_bases of string | Exception_et_modules of string | Statement of string | Statement2 of string | Nombres of string | Operateurs of string | Parentheses of string | Modules_standards of string | Mot_cles_function_like of string | Types_de_bases_spec of string | Exception_et_modules_spec of string | Statement_spec of string | Statement2_spec of string | Nombres_spec of string | Operateurs_spec of string | Parentheses_spec of string | Modules_standards_spec of string | Mot_cles_function_like_spec of string ;; (** {6 Les différentes entités d'un code Ocaml.} *) (** Il s'agit seulement de séparer un code Ocaml en une suite d'entité, afin de pouvoir ensuite l'afficher en colorant certaines d'une couleur et d'autres d'une autre. *) type texte_Ocaml = entites_Ocaml list;; (** Ainsi, un programme Ocaml, réprésenté à l'entrée comme du texte (une chaine), est représenté à la sortie comme une liste d'entité : seulement des morceaux de textes attachés d'une qualité. *) (** Il faudra ensuite exploiter ces "qualités" pour afficher avec le module ANSITerminal un code ML. *)