nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72d45d7
)
tools: add a function to go through every classes in the program
author
Jean-Sebastien Gelinas
<calestar@gmail.com>
Fri, 18 Sep 2009 20:47:02 +0000
(16:47 -0400)
committer
Jean Privat
<jean@pryen.org>
Mon, 11 Jan 2010 21:52:25 +0000
(16:52 -0500)
Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>
src/program.nit
patch
|
blob
|
history
diff --git
a/src/program.nit
b/src/program.nit
index
07c5277
..
63572e3
100644
(file)
--- a/
src/program.nit
+++ b/
src/program.nit
@@
-208,6
+208,16
@@
class Program
end
end
+ # This function will call the attached block for each live local classes
+ # in this program
+ fun with_each_live_local_classes
+ !action(m: MMLocalClass)
+ do
+ for c in module.local_classes do
+ action(c)
+ end
+ end
+
init(m: MMModule, toolcontext: ToolContext) do
_module = m
_tc = toolcontext