nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nitg: adds process_nclassdef to Phase
[nit.git]
/
src
/
phase.nit
diff --git
a/src/phase.nit
b/src/phase.nit
index
70d3a71
..
2ce4187
100644
(file)
--- a/
src/phase.nit
+++ b/
src/phase.nit
@@
-60,6
+60,9
@@
redef class ToolContext
end
errcount = self.error_count
for nclassdef in nmodule.n_classdefs do
end
errcount = self.error_count
for nclassdef in nmodule.n_classdefs do
+ self.info(" phase: {phase.class_name} for {nclassdef.location}", 3)
+ assert phase.toolcontext == self
+ phase.process_nclassdef(nclassdef)
for npropdef in nclassdef.n_propdefs do
self.info(" phase: {phase.class_name} for {npropdef.location}", 4)
assert phase.toolcontext == self
for npropdef in nclassdef.n_propdefs do
self.info(" phase: {phase.class_name} for {npropdef.location}", 4)
assert phase.toolcontext == self
@@
-124,6
+127,11
@@
abstract class Phase
# @toimplement
fun process_nmodule(nmodule: AModule) do end
# @toimplement
fun process_nmodule(nmodule: AModule) do end
+ # Specific actions to execute on the tree of a class definition
+ # Note that the order of the visit is the one of the file
+ # @toimplement
+ fun process_nclassdef(nclassdef: AClassdef) do end
+
# Specific actions to execute on the tree of a property
# Note that the order of the visit is the one of the file
# @toimplement
# Specific actions to execute on the tree of a property
# Note that the order of the visit is the one of the file
# @toimplement