nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parser: `Visitor::visit` does not accepts `null`
[nit.git]
/
src
/
frontend.nit
diff --git
a/src/frontend.nit
b/src/frontend.nit
index
d219ad8
..
04254a7
100644
(file)
--- a/
src/frontend.nit
+++ b/
src/frontend.nit
@@
-24,6
+24,7
@@
import local_var_init
import typing
import auto_super_init
import div_by_zero
import typing
import auto_super_init
import div_by_zero
+import cached
redef class ToolContext
# FIXME: there is conflict in linex in nitc, so use this trick to force invocation
redef class ToolContext
# FIXME: there is conflict in linex in nitc, so use this trick to force invocation
@@
-36,4
+37,19
@@
redef class ToolContext
phases.add_edge(scope_phase, simple_misc_analysis_phase)
return true
end
phases.add_edge(scope_phase, simple_misc_analysis_phase)
return true
end
+
+ fun run_global_phases(mainmodule: MModule)
+ do
+ for phase in phases_list do
+ phase.process_mainmodule(mainmodule)
+ end
+ end
end
end
+
+redef class Phase
+ # Specific action to execute on the whole program
+ # Called by the `ToolContext::run_global_phases`
+ # @toimplement
+ fun process_mainmodule(mainmodule: MModule) do end
+end
+