src: create groups for related things
[nit.git] / src / frontend / frontend.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 # Collect and orchestration of main frontend phases
16 module frontend
17
18 import simple_misc_analysis
19 import literal
20 import modelize
21 import semantize
22 import div_by_zero
23 import cached
24 import serialization_phase
25 import check_annotation
26
27 redef class ToolContext
28 # FIXME: there is conflict in linex in nitc, so use this trick to force invocation
29 private var dummy: Bool = do_dummy
30 fun do_dummy: Bool
31 do
32 # Force easy warnings after modelbuilder
33 phases.add_edge(simple_misc_analysis_phase, modelize_property_phase)
34 # Force easy warnings before intraproc-errors
35 phases.add_edge(scope_phase, simple_misc_analysis_phase)
36 # Code genrated by the serialization phase must be analyzed for literals
37 phases.add_edge(literal_phase, serialization_phase_pre_model)
38 phases.add_edge(modelize_class_phase, serialization_phase_pre_model)
39 return true
40 end
41 end