diff options
Diffstat (limited to 'src/bin/eolian_mono/eolian_mono.cc')
-rw-r--r-- | src/bin/eolian_mono/eolian_mono.cc | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc index 97996d9..62eed11 100644 --- a/src/bin/eolian_mono/eolian_mono.cc +++ b/src/bin/eolian_mono/eolian_mono.cc | |||
@@ -1,3 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright 2019 by its authors. See AUTHORS. | ||
3 | * | ||
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | * you may not use this file except in compliance with the License. | ||
6 | * You may obtain a copy of the License at | ||
7 | * | ||
8 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | * | ||
10 | * Unless required by applicable law or agreed to in writing, software | ||
11 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | * See the License for the specific language governing permissions and | ||
14 | * limitations under the License. | ||
15 | */ | ||
1 | 16 | ||
2 | #include <iostream> | 17 | #include <iostream> |
3 | #include <fstream> | 18 | #include <fstream> |
@@ -129,6 +144,25 @@ run(options_type const& opts) | |||
129 | } | 144 | } |
130 | }()}; | 145 | }()}; |
131 | 146 | ||
147 | if (!as_generator( | ||
148 | "/*\n" | ||
149 | " * Copyright 2019 by its authors. See AUTHORS.\n" | ||
150 | " *\n" | ||
151 | " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" | ||
152 | " * you may not use this file except in compliance with the License.\n" | ||
153 | " * You may obtain a copy of the License at\n" | ||
154 | " *\n" | ||
155 | " * http://www.apache.org/licenses/LICENSE-2.0\n" | ||
156 | " *\n" | ||
157 | " * Unless required by applicable law or agreed to in writing, software\n" | ||
158 | " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" | ||
159 | " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" | ||
160 | " * See the License for the specific language governing permissions and\n" | ||
161 | " * limitations under the License.\n" | ||
162 | " */\n\n" | ||
163 | ).generate(iterator, attributes::unused, efl::eolian::grammar::context_null())) | ||
164 | throw std::runtime_error("Failed to generate license notice"); | ||
165 | |||
132 | if (!as_generator("#pragma warning disable CS1591\n").generate(iterator, efl::eolian::grammar::attributes::unused, efl::eolian::grammar::context_null())) | 166 | if (!as_generator("#pragma warning disable CS1591\n").generate(iterator, efl::eolian::grammar::attributes::unused, efl::eolian::grammar::context_null())) |
133 | throw std::runtime_error("Failed to generate pragma to disable missing docs"); | 167 | throw std::runtime_error("Failed to generate pragma to disable missing docs"); |
134 | 168 | ||
@@ -137,7 +171,8 @@ run(options_type const& opts) | |||
137 | "using System.Collections.Generic;\n" | 171 | "using System.Collections.Generic;\n" |
138 | "using System.Linq;\n" | 172 | "using System.Linq;\n" |
139 | "using System.Threading;\n" | 173 | "using System.Threading;\n" |
140 | "using System.ComponentModel;\n") | 174 | "using System.ComponentModel;\n" |
175 | "using System.Diagnostics.CodeAnalysis;\n") | ||
141 | .generate(iterator, efl::eolian::grammar::attributes::unused, efl::eolian::grammar::context_null())) | 176 | .generate(iterator, efl::eolian::grammar::attributes::unused, efl::eolian::grammar::context_null())) |
142 | { | 177 | { |
143 | throw std::runtime_error("Failed to generate file preamble"); | 178 | throw std::runtime_error("Failed to generate file preamble"); |