diff options
author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2014-05-12 15:37:50 +0000 |
---|---|---|
committer | Gabriel Scherer <gabriel.scherer@gmail.com> | 2014-05-12 15:37:50 +0000 |
commit | 689d9aff79e802ca51a9105780e529e08fdc80aa (patch) | |
tree | f7b1072cb0745b801311103dff4802b0175ddaaa /stdlib/camlinternalFormat.ml | |
parent | fa67173b240995c60c6a002263fad7bd5b8625e8 (diff) |
allows some more ignored formats
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14817 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/camlinternalFormat.ml')
-rw-r--r-- | stdlib/camlinternalFormat.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/stdlib/camlinternalFormat.ml b/stdlib/camlinternalFormat.ml index 9ddcf748d..81bd9f1a8 100644 --- a/stdlib/camlinternalFormat.ml +++ b/stdlib/camlinternalFormat.ml @@ -1666,7 +1666,12 @@ let fmt_ebb_of_string str = as ignoring it would typically result in a different typing than what the legacy parser used *) if not !ign_used && ign then - incompatible_flag pct_ind str_ind symb "'_'"; + begin match symb with + (* argument-less formats can safely be ignored in legacy mode *) + | ('@' | '%' | '!' | ',') when legacy_behavior -> () + | _ -> + incompatible_flag pct_ind str_ind symb "'_'" + end; fmt_result (* Parse formatting informations (after '@'). *) |