syntax-check patch

Joseph Donaldson <[email protected]>
Newsgroups gmane.lisp.scheme.bigloo
Message-ID <[email protected]>
Hello, Manuel,

I have attached a simple patch that moves the syntax-check logic to after the ast is built. This allows for the detection of errors such as unbound variables which were not detected before. An extension to the flycheck emacs package supporting Bigloo and using the syntax-check option can be found at  https://github.com/donaldsonjw/flycheck-bigloo. I would be interested in peoples experience in using it. A screenshot of its use is also attached.

Best Regards,
Joseph Donaldson
flycheck-bigloo.png (image/png, 74.8 KB) - not displayed
syntax-check.patch (text/x-patch, 1022 B)
--- ./bigloo4.1a/comptime/Engine/compiler.scm	2013-09-18 05:10:15.000000000 -0400
+++ ./bigloo4.1amod/comptime/Engine/compiler.scm	2013-10-05 14:29:23.853277104 -0400
@@ -233,16 +233,18 @@
 	 ;; check if inlined code correspond to library functions
 	 (backend-check-inlines (the-backend))
 
-	 ;; stop after performing syntax check and write no output.
-	 ;; this is usefull for use with Flycheck and Flymake
-	 (stop-on-pass 'syntax-check (lambda () #unspecified))
-	 
 	 ;; ok, now we build the ast
 	 (let ((ast (profile ast (build-ast units))))
 	    (stop-on-pass 'ast (lambda () (write-ast ast)))
 	    (check-sharing "ast" ast)
 	    (check-type "ast" ast #f #f)
 
+	    ;; stop after performing syntax check and building ast
+	    ;; and write no output. this is usefull for use with
+	    ;; Flycheck and Flymake
+	    (stop-on-pass 'syntax-check (lambda () #unspecified))
+	 
+
 	    ;; compute the global init property
 	    (when *optim-initflow?*
 	       (set! ast (profile initflow (initflow-walk! ast))))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.