Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

stretch.mli 1.97 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
(******************************************************************************)
(*                                                                            *)
(*                                   Menhir                                   *)
(*                                                                            *)
(*                       François Pottier, Inria Paris                        *)
(*              Yann Régis-Gianas, PPS, Université Paris Diderot              *)
(*                                                                            *)
(*  Copyright Inria. All rights reserved. This file is distributed under the  *)
(*  terms of the GNU General Public License version 2, as described in the    *)
(*  file LICENSE.                                                             *)
(*                                                                            *)
(******************************************************************************)

14
15
(* A stretch is a fragment of a source file. It holds the file name,
   the line number, and the line count (that is, the length) of the
POTTIER Francois's avatar
POTTIER Francois committed
16
   fragment. These are used to generate line number directives when the
17
18
19
20
   fragment is copied to an output file. It also holds the textual
   content of the fragment, as a string. The [raw_content] field holds
   the text that was found in the source file, while the [content]
   field holds the same text after transformation by the lexer (which
21
22
   may substitute keywords, insert padding, insert parentheses, etc.).
   See [Lexer.mk_stretch] and its various call sites in [Lexer]. *)
23
24

type t = {
25
26
27
28
29
30
    stretch_filename    : string;
    stretch_linenum     : int;
    stretch_linecount   : int;
    stretch_raw_content : string;
    stretch_content     : string;
    stretch_keywords    : Keyword.keyword list
POTTIER Francois's avatar
POTTIER Francois committed
31
  }
32

33
(* An OCaml type is either a stretch (if it was found in some
34
35
36
37
38
   source file) or a string (if it was inferred via [Infer]). *)

type ocamltype =
  | Declared of t
  | Inferred of string