]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
compiler: Print ast after checking
authorTimm Bäder <mail@baedert.org>
Tue, 8 Nov 2016 07:01:46 +0000 (08:01 +0100)
committerTimm Bäder <mail@baedert.org>
Tue, 8 Nov 2016 07:01:46 +0000 (08:01 +0100)
Checking also alters the AST...

compiler/valacompiler.vala

index 9dcd9bc86af2dd1efd7a684c1705fbe6c083999a..35b001aa7277784f4f27c4507cfb1778dd33c089 100644 (file)
@@ -343,10 +343,7 @@ class Vala.Compiler {
                var parser = new Parser ();
                parser.parse (context);
 
-               if (print_ast) {
-                       var printer = new AstPrinter ();
-                       printer.print_ast (context);
-               }
+
 
                var genie_parser = new Genie.Parser ();
                genie_parser.parse (context);
@@ -366,6 +363,11 @@ class Vala.Compiler {
 
                context.check ();
 
+               if (print_ast) {
+                       var printer = new AstPrinter ();
+                       printer.print_ast (context);
+               }
+
                if (context.report.get_errors () > 0 || (fatal_warnings && context.report.get_warnings () > 0)) {
                        return quit ();
                }