summaryrefslogtreecommitdiffstats
path: root/parsing/parse.ml
diff options
context:
space:
mode:
Diffstat (limited to 'parsing/parse.ml')
-rw-r--r--parsing/parse.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/parsing/parse.ml b/parsing/parse.ml
index d59fc3da4..02a9a56fa 100644
--- a/parsing/parse.ml
+++ b/parsing/parse.ml
@@ -34,7 +34,9 @@ let maybe_skip_phrase lexbuf =
let wrap parsing_fun lexbuf =
try
- parsing_fun Lexer.token lexbuf
+ let ast = parsing_fun Lexer.token lexbuf in
+ Parsing.clear_parser();
+ ast
with
| Lexer.Error(Lexer.Unterminated_comment, _, _) as err -> raise err
| Lexer.Error(Lexer.Unterminated_string, _, _) as err -> raise err