From: Jean Privat Date: Thu, 4 Dec 2014 03:03:07 +0000 (-0500) Subject: nitls: shows the synopsys of modules and groups by default X-Git-Tag: v0.7~75^2~21 X-Git-Url: http://nitlanguage.org nitls: shows the synopsys of modules and groups by default Signed-off-by: Jean Privat --- diff --git a/src/nitls.nit b/src/nitls.nit index fc6bd41..0dd3cfd 100644 --- a/src/nitls.nit +++ b/src/nitls.nit @@ -32,11 +32,21 @@ class ProjTree if opt_paths then return o.filepath.as(not null) else - return "{o.name} ({o.filepath.to_s})" + var d = "" + if o.mdoc != null then + d = ": {o.mdoc.content.first}" + end + return "{o.name} ({o.filepath.to_s}){d}" end else if o isa ModulePath then if opt_paths then return o.filepath + else if o.mmodule != null then + var d = "" + if o.mmodule.mdoc != null then + d = ": {o.mmodule.mdoc.content.first}" + end + return "{o.name}{d} ({o.filepath})" else return "{o.name} ({o.filepath})" end @@ -108,8 +118,9 @@ else for a in files do var mp = mb.identify_file(a) - if mp == null then - tc.check_errors + tc.check_errors + if mp != null and not opt_paths.value then + mb.load_module(mp.filepath) end end end