Merge: doc: fixed some typos and other misc. corrections
[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 #
17 # Import `frontend::code_gen` to also include code generation modules.
18 module frontend
19
20 import no_warning
21 import simple_misc_analysis
22 import literal
23 import modelize
24 import semantize
25 import div_by_zero
26 import serialization_model_phase
27 import deriving
28 import check_annotation
29 import parse_annotations
30 import glsl_validation
31 import parallelization_phase
32 import i18n_phase
33 import regex_phase
34 import actors_injection_phase
35
36 redef class ToolContext
37 # FIXME: there is conflict in linex in nitc, so use this trick to force invocation
38 private var dummy: Bool = do_dummy
39
40 # SEE `dummy`
41 private fun do_dummy: Bool
42 do
43 # Force no warning before analysing classes
44 phases.add_edge(modelize_class_phase, no_warning_phase)
45 # Force easy warnings after modelbuilder
46 phases.add_edge(simple_misc_analysis_phase, modelize_property_phase)
47 # Force easy warnings before intraproc-errors
48 phases.add_edge(scope_phase, simple_misc_analysis_phase)
49 # Code genrated by the serialization phase must be analyzed for literals
50 phases.add_edge(literal_phase, serialization_phase_pre_model)
51 phases.add_edge(modelize_class_phase, serialization_phase_pre_model)
52 phases.add_edge(modelize_class_phase, parallelization_phase)
53 return true
54 end
55 end