Merge branch 'smarter_error_list' of git://factorcode.org/git/factor into smarter_error_list
						commit
						a7eb21659d
					
				| 
						 | 
				
			
			@ -58,3 +58,10 @@ $nl
 | 
			
		|||
    "} cond >>"
 | 
			
		||||
}
 | 
			
		||||
"Note the parse time evaluation with " { $link POSTPONE: << } "." } ;
 | 
			
		||||
 | 
			
		||||
ARTICLE: "loading-libs" "Loading native libraries"
 | 
			
		||||
"Before calling a C library, you must associate its path name on disk with a logical name which Factor uses to identify the library:"
 | 
			
		||||
{ $subsection add-library }
 | 
			
		||||
"Once a library has been defined, you can try loading it to see if the path name is correct:"
 | 
			
		||||
{ $subsection load-library }
 | 
			
		||||
"If the compiler cannot load a library, or cannot resolve a symbol in a library, a linkage error is reported using the compiler error mechanism (see " { $link "compiler-errors" } "). Once you install the right library, reload the source file containing the " { $link add-library } " form to force the compiler to try loading the library again." ;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -115,14 +115,15 @@ SYMBOL: error-summary-hook
 | 
			
		|||
            '[ datastack _ with-datastack ]
 | 
			
		||||
            [ call-error-hook datastack ]
 | 
			
		||||
            recover
 | 
			
		||||
            (listener)
 | 
			
		||||
        ] when*
 | 
			
		||||
        ] [ return ] if*
 | 
			
		||||
    ] [
 | 
			
		||||
        dup lexer-error?
 | 
			
		||||
        [ call-error-hook datastack (listener) ]
 | 
			
		||||
        [ call-error-hook datastack ]
 | 
			
		||||
        [ rethrow ]
 | 
			
		||||
        if
 | 
			
		||||
    ] recover ;
 | 
			
		||||
    ] recover
 | 
			
		||||
 | 
			
		||||
    (listener) ;
 | 
			
		||||
 | 
			
		||||
PRIVATE>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ $nl
 | 
			
		|||
    { { $image "vocab:ui/tools/error-list/icons/compiler-error.tiff" } "Compiler error" { $link "compiler-errors" } }
 | 
			
		||||
    { { $image "vocab:ui/tools/error-list/icons/unit-test-error.tiff" } "Unit test failure" { $link "tools.test" } }
 | 
			
		||||
    { { $image "vocab:ui/tools/error-list/icons/help-lint-error.tiff" } "Help lint failure" { $link "help.lint" } }
 | 
			
		||||
    { { $image "vocab:ui/tools/error-list/icons/linkage-error.tiff" } "Linkage error" { $link "compiler-errors" } }
 | 
			
		||||
    { { $image "vocab:ui/tools/error-list/icons/linkage-error.tiff" } "Linkage error" { $link "loading-libs" } }
 | 
			
		||||
} ;
 | 
			
		||||
 | 
			
		||||
ABOUT: "ui.tools.error-list"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -145,12 +145,6 @@ ARTICLE: "reading-writing-memory" "Reading and writing memory directly"
 | 
			
		|||
{ $subsection set-alien-float }
 | 
			
		||||
{ $subsection set-alien-double } ;
 | 
			
		||||
 | 
			
		||||
ARTICLE: "loading-libs" "Loading native libraries"
 | 
			
		||||
"Before calling a C library, you must associate its path name on disk with a logical name which Factor uses to identify the library:"
 | 
			
		||||
{ $subsection add-library }
 | 
			
		||||
"Once a library has been defined, you can try loading it to see if the path name is correct:"
 | 
			
		||||
{ $subsection load-library } ;
 | 
			
		||||
 | 
			
		||||
ARTICLE: "alien-invoke" "Calling C from Factor"
 | 
			
		||||
"The easiest way to call into a C library is to define bindings using a pair of parsing words:"
 | 
			
		||||
{ $subsection POSTPONE: LIBRARY: }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
 | 
			
		||||
USING: accessors arrays classes.tuple combinators continuations io
 | 
			
		||||
kernel lexer math prettyprint quotations sequences source-files
 | 
			
		||||
strings words ;
 | 
			
		||||
source-files.errors strings words ;
 | 
			
		||||
 | 
			
		||||
IN: fuel.pprint
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue