]> gitweb.factorcode.org Git - factor.git/blob - core/compiler/errors/errors-docs.factor
Fix permission bits
[factor.git] / core / compiler / errors / errors-docs.factor
1 IN: compiler.errors
2 USING: help.markup help.syntax vocabs.loader words io
3 quotations compiler.errors.private ;
4
5 ARTICLE: "compiler-errors" "Compiler warnings and errors"
6 "The compiler saves various notifications in a global variable:"
7 { $subsection compiler-errors }
8 "These notifications can be viewed later:"
9 { $subsection :errors }
10 { $subsection :warnings }
11 { $subsection :linkage }
12 "Words such as " { $link require } " use a combinator which counts errors and prints a report at the end:"
13 { $link with-compiler-errors } ;
14
15 HELP: compiler-errors
16 { $var-description "Global variable holding an assoc mapping words to compiler errors. This variable is set by " { $link with-compiler-errors } "." } ;
17
18 HELP: compiler-error
19 { $values { "error" "an error" } { "word" word } }
20 { $description "If inside a " { $link with-compiler-errors } ", saves the error for future persual via " { $link :errors } ", " { $link :warnings } " and " { $link :linkage } ". If not inside a " { $link with-compiler-errors } ", ignores the error." } ;
21
22 HELP: compiler-error.
23 { $values { "error" "an error" } { "word" word } }
24 { $description "Prints a compiler error to " { $link output-stream } "." } ;
25
26 HELP: compiler-errors.
27 { $values { "type" symbol } }
28 { $description "Prints compiler errors to " { $link output-stream } ". The type parameter is one of " { $link +error+ } ", " { $link +warning+ } ", or " { $link +linkage+ } "." } ;
29 HELP: :errors
30 { $description "Prints all serious compiler errors from the most recent compile to " { $link output-stream } "." } ;
31
32 HELP: :warnings
33 { $description "Prints all ignorable compiler warnings from the most recent compile to " { $link output-stream } "." } ;
34
35 HELP: :linkage
36 { $description "Prints all C library interface linkage errors from the most recent compile to " { $link output-stream } "." } ;
37
38 { :errors :warnings } related-words
39
40 HELP: with-compiler-errors
41 { $values { "quot" quotation } }
42 { $description "Calls the quotation and collects any compiler warnings and errors. Compiler warnings and errors are summarized at the end and can be viewed with " { $link :errors } ", " { $link :warnings } ", and " { $link :linkage } "." }
43 { $notes "Nested calls to " { $link with-compiler-errors } " are ignored, and only the outermost call collects warnings and errors." } ;