summaryrefslogtreecommitdiff
path: root/am
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-10-10 17:13:21 +0200
committerLudovic Courtès <ludo@gnu.org>2010-10-10 19:10:10 +0200
commite06972410a1f743edb8c8d78dc81eccbbac4ee5d (patch)
tree5d2bd3077463122c4a746cad3b570ae98988d863 /am
parent89702c819caf6d1f3a21ef91d2d8f0df2945174e (diff)
downloadguile-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