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