diff options
| author | Maxime Dénès | 2016-08-30 16:40:30 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2016-08-30 16:43:15 +0200 |
| commit | cc6957b0dbb19a4c0ca505650d252d9486088a5f (patch) | |
| tree | 4a3d2bce53ea2bd8450fd0c2813e074e21d02c63 /parsing | |
| parent | 0d5abcf9e17b4fe0462ffa60d04a321d2707ccf6 (diff) | |
Fix #4941 - ~/.coqrc file confusing locations
Diffstat (limited to 'parsing')
| -rw-r--r-- | parsing/cLexer.ml4 | 3 | ||||
| -rw-r--r-- | parsing/cLexer.mli | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/parsing/cLexer.ml4 b/parsing/cLexer.ml4 index 2acccfdf55..bec891f7f1 100644 --- a/parsing/cLexer.ml4 +++ b/parsing/cLexer.ml4 @@ -103,6 +103,9 @@ open Error let current_file = ref "" +let get_current_file () = + !current_file + let set_current_file ~fname = current_file := fname diff --git a/parsing/cLexer.mli b/parsing/cLexer.mli index d99ba35573..3b4891d9ac 100644 --- a/parsing/cLexer.mli +++ b/parsing/cLexer.mli @@ -17,7 +17,13 @@ type location_table val location_table : unit -> location_table val restore_location_table : location_table -> unit -(** [set_current_file fname] sets the filename in locations emitted by the lexer *) + +(** [get_current_file fname] returns the filename used in locations emitted by + the lexer *) +val get_current_file : unit -> string + +(** [set_current_file fname] sets the filename used in locations emitted by the + lexer *) val set_current_file : fname:string -> unit val check_ident : string -> unit |
