diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-10-10 17:13:21 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-10-10 19:10:10 +0200 |
commit | e06972410a1f743edb8c8d78dc81eccbbac4ee5d (patch) | |
tree | 5d2bd3077463122c4a746cad3b570ae98988d863 /am | |
parent | 89702c819caf6d1f3a21ef91d2d8f0df2945174e (diff) | |
download | guile-e06972410a1f743edb8c8d78dc81eccbbac4ee5d.tar.gz |
Implement fancy format string analysis.
* module/language/tree-il/analyze.scm (format-string-argument-count):
Return two values, the minimum and maximum number of arguments.
Add support for most of `format' escapes, including conditionals.
(format-analysis): Adjust accordingly.
* module/system/base/message.scm (%warning-types)[format]: Take two
arguments, MIN and MAX, instead of EXPECTED. Display warning
accordingly.
* test-suite/tests/tree-il.test ("warnings")["format"]("~%, ~~, ~&, ~t,
~_, and ~\\n", "~{...~}", "~{...~}, too many args", "~@{...~}",
"~@{...~}, too few args", "~(...~)", "~v", "~v:@y", "~*", "~?",
"complex 1", "complex 2", "complex 3"): New tests.
("conditionals"): New test prefix.
Diffstat (limited to 'am')
0 files changed, 0 insertions, 0 deletions