diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2005-10-06 06:34:51 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2005-10-06 06:34:51 +0000 |
commit | 0f10b6d6ced53630da9258d706dd401cc817e5a3 (patch) | |
tree | efb8af3adabae6718bb306da129935fb0416828f /yacc | |
parent | 402dc832ece24c10b2b9f9e34442b3a71b6f6bc2 (diff) |
PR#3802: detect polymorphic object and variant types in entry points
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7105 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'yacc')
-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++; } |