summaryrefslogtreecommitdiffstats
path: root/parsing/syntaxerr.ml
diff options
context:
space:
mode:
Diffstat (limited to 'parsing/syntaxerr.ml')
-rw-r--r--parsing/syntaxerr.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/parsing/syntaxerr.ml b/parsing/syntaxerr.ml
index 00e06bba0..b0fda3695 100644
--- a/parsing/syntaxerr.ml
+++ b/parsing/syntaxerr.ml
@@ -26,8 +26,8 @@ exception Escape_error
let report_error ppf = function
| Unclosed(opening_loc, opening, closing_loc, closing) ->
- if String.length !Location.input_name = 0
- && Location.highlight_locations ppf opening_loc closing_loc
+ if !Location.input_name = "//toplevel//"
+ && Location.highlight_locations ppf opening_loc closing_loc
then fprintf ppf "Syntax error: '%s' expected, \
the highlighted '%s' might be unmatched" closing opening
else begin