Преглед изворни кода

[parser] never catch Stream.Error when not in display mode

closes #3915
Simon Krajewski пре 7 година
родитељ
комит
6b6260cc9a
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/syntax/grammar.mly

+ 1 - 1
src/syntax/grammar.mly

@@ -873,7 +873,7 @@ and block_with_pos' acc f p s =
 	with
 	with
 		| Stream.Failure ->
 		| Stream.Failure ->
 			List.rev acc,p
 			List.rev acc,p
-		| Stream.Error _ ->
+		| Stream.Error _ when !in_display ->
 			let tk , pos = next_token s in
 			let tk , pos = next_token s in
 			(!display_error) (Unexpected tk) pos;
 			(!display_error) (Unexpected tk) pos;
 			block_with_pos acc pos s
 			block_with_pos acc pos s