9b6e84b107f8b4d512bfff6064e8fe264c5fd86b
[nit.git] / src / 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 phase
19 import simple_misc_analysis
20 import literal
21 import scope
22 import flow
23 import local_var_init
24 import typing
25 import auto_super_init
26 import div_by_zero
27 import cached
28 import serialization_phase
29 import check_annotation
30
31 redef class ToolContext
32 # FIXME: there is conflict in linex in nitc, so use this trick to force invocation
33 private var dummy: Bool = do_dummy
34 fun do_dummy: Bool
35 do
36 # Force easy warnings after modelbuilder
37 phases.add_edge(simple_misc_analysis_phase, modelize_property_phase)
38 # Force easy warnings before intraproc-errors
39 phases.add_edge(scope_phase, simple_misc_analysis_phase)
40 # Code genrated by the serialization phase must be analyzed for literals
41 phases.add_edge(literal_phase, serialization_phase_pre_model)
42 phases.add_edge(modelize_class_phase, serialization_phase_pre_model)
43 return true
44 end
45 end