parser: Do not crash if last_loken is unset
[nit.git] / src / abstracttool.nit
index a2ad03b..3d4d80e 100644 (file)
@@ -55,7 +55,7 @@ special ToolContext
                        dump_context_info
                end
 
-               if not to_do.is_empty and not opt_only_metamodel.value then
+               if not to_do.is_empty and not opt_only_metamodel.value and not opt_only_parse.value then
                        perform_work(to_do)
                end
        end