diff options
author | Nicolas Pouillard <np@nicolaspouillard.fr> | 2006-07-17 14:18:26 +0000 |
---|---|---|
committer | Nicolas Pouillard <np@nicolaspouillard.fr> | 2006-07-17 14:18:26 +0000 |
commit | 5422545d53025198d9b18325a2c0ba934c189d3b (patch) | |
tree | 881c86e7858404145759f648659330c74a989d59 /camlp4/Camlp4Top | |
parent | 10cdef3018438b24bfb6ecacaa7b6b6534e130d6 (diff) |
Keep the last loc to have a correct loc for subsequent implem or interf
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7509 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/Camlp4Top')
-rw-r--r-- | camlp4/Camlp4Top/Camlp4Top.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/camlp4/Camlp4Top/Camlp4Top.ml b/camlp4/Camlp4Top/Camlp4Top.ml index 2ceb10cb8..817227138 100644 --- a/camlp4/Camlp4Top/Camlp4Top.ml +++ b/camlp4/Camlp4Top/Camlp4Top.ml @@ -78,7 +78,7 @@ value use_file token_stream = let (pl, stopped_at_directive) = Gram.parse_tokens_after_filter Syntax.use_file token_stream in - if stopped_at_directive then + if stopped_at_directive <> None then match pl with [ [ <:str_item< #load $str:s$ >> ] -> do { Topdirs.dir_load Format.std_formatter s; loop () } @@ -94,7 +94,7 @@ value use_file token_stream = let (pl, stopped_at_directive) = Gram.parse_tokens_after_filter Syntax.use_file token_stream in - if stopped_at_directive then pl @ loop () else pl + if stopped_at_directive <> None then pl @ loop () else pl in List.map Ast2pt.phrase (pl0 @ pl); Toploop.parse_toplevel_phrase.val := wrap toplevel_phrase; |