modelbuilder: honor --only-parse
authorJean Privat <jean@pryen.org>
Tue, 8 May 2012 19:33:18 +0000 (15:33 -0400)
committerJean Privat <jean@pryen.org>
Tue, 8 May 2012 20:15:07 +0000 (16:15 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/modelbuilder.nit

index 1c87722..a55f02e 100644 (file)
@@ -105,6 +105,11 @@ class ModelBuilder
 
                self.toolcontext.check_errors
 
+               if self.toolcontext.opt_only_parse.value then
+                       self.toolcontext.info("--only-parse: stop processing", 2)
+                       return new Array[MModule]
+               end
+
                # Build the model
                self.toolcontext.info("*** BUILD MODEL ***", 1)
                self.build_all_classes