diff options
Diffstat (limited to 'yacc/reader.c')
-rw-r--r-- | yacc/reader.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/yacc/reader.c b/yacc/reader.c index 1e0a7da7c..6c8e4a278 100644 --- a/yacc/reader.c +++ b/yacc/reader.c @@ -1730,7 +1730,12 @@ static int is_polymorphic(char * s) { while (*s != 0) { char c = *s++; - if (c == '\'') return 1; + if (c == '\'' || c == '#') return 1; + if (c == '[') { + c = *s; + while (c == ' ' || c == '\t' || c == '\r' || c == '\n') c = *++s; + if (c == '<' || c == '>') return 1; + } if (In_bitmap(caml_ident_start, c)) { while (In_bitmap(caml_ident_body, *s)) s++; } |