diff options
| author | Pierre-Marie Pédrot | 2018-11-24 16:56:03 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2018-12-05 17:55:11 +0100 |
| commit | 7f4da9fbbe568ea921845f145c21d036c08c328e (patch) | |
| tree | 1f630528f6258c523cd898dbbee2f2d8db82ad5b | |
| parent | 8a28cf181a47072fe9a09e98bca761774520d0c3 (diff) | |
Make some camlp5 fields immutable.
| -rw-r--r-- | gramlib/gramext.ml | 2 | ||||
| -rw-r--r-- | gramlib/gramext.mli | 2 | ||||
| -rw-r--r-- | gramlib/plexing.ml | 4 | ||||
| -rw-r--r-- | gramlib/plexing.mli | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/gramlib/gramext.ml b/gramlib/gramext.ml index c35c4bd18e..24dc9b865d 100644 --- a/gramlib/gramext.ml +++ b/gramlib/gramext.ml @@ -8,7 +8,7 @@ type 'a parser_t = 'a Stream.t -> Obj.t type 'te grammar = { gtokens : (Plexing.pattern, int ref) Hashtbl.t; - mutable glexer : 'te Plexing.lexer } + glexer : 'te Plexing.lexer } type 'te g_entry = { egram : 'te grammar; diff --git a/gramlib/gramext.mli b/gramlib/gramext.mli index ecb95ec61b..7fad01c6a4 100644 --- a/gramlib/gramext.mli +++ b/gramlib/gramext.mli @@ -6,7 +6,7 @@ type 'a parser_t = 'a Stream.t -> Obj.t type 'te grammar = { gtokens : (Plexing.pattern, int ref) Hashtbl.t; - mutable glexer : 'te Plexing.lexer } + glexer : 'te Plexing.lexer } type 'te g_entry = { egram : 'te grammar; diff --git a/gramlib/plexing.ml b/gramlib/plexing.ml index 7b8618fd20..3b158ebcc4 100644 --- a/gramlib/plexing.ml +++ b/gramlib/plexing.ml @@ -13,6 +13,6 @@ type 'te lexer = { tok_func : 'te lexer_func; tok_using : pattern -> unit; tok_removing : pattern -> unit; - mutable tok_match : pattern -> 'te -> string; + tok_match : pattern -> 'te -> string; tok_text : pattern -> string; - mutable tok_comm : Loc.t list option } + tok_comm : Loc.t list option } diff --git a/gramlib/plexing.mli b/gramlib/plexing.mli index 63c89dac28..e09188763c 100644 --- a/gramlib/plexing.mli +++ b/gramlib/plexing.mli @@ -28,9 +28,9 @@ type 'te lexer = { tok_func : 'te lexer_func; tok_using : pattern -> unit; tok_removing : pattern -> unit; - mutable tok_match : pattern -> 'te -> string; + tok_match : pattern -> 'te -> string; tok_text : pattern -> string; - mutable tok_comm : Loc.t list option } + tok_comm : Loc.t list option } and 'te lexer_func = char Stream.t -> 'te Stream.t * location_function and location_function = int -> Loc.t (** The type of a function giving the location of a token in the |
