1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00
guile/module/system
Ludovic Courtès e06972410a 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.
2010-10-10 19:10:10 +02:00
..
base Implement fancy format string analysis. 2010-10-10 19:10:10 +02:00
repl add (system repl server) 2010-10-10 12:15:34 +02:00
vm stepping traps use frame-next-source, not frame-source 2010-10-08 12:31:56 +02:00
foreign.scm Rename make-foreign-function' to pointer->procedure'. 2010-09-06 22:24:44 +02:00
xref.scm system xref maintains source mapping for nested procedures too 2010-09-24 13:24:48 +02:00