]> git.pld-linux.org Git - packages/vcmi.git/blob - erm.patch
- up to 1.3.0
[packages/vcmi.git] / erm.patch
1 From 6225d8585d215569c4a919171bea1915c306d1c8 Mon Sep 17 00:00:00 2001
2 From: Andreas Grois <andi@grois.info>
3 Date: Mon, 25 Sep 2023 21:26:23 +0200
4 Subject: [PATCH] Make ERM compile again.
5
6 This is not a proper clean up. It does not bring the code up to the
7 current state of the rest of the codebase. However, the module now
8 compiles again.
9 ---
10  scripting/erm/ERMInterpreter.cpp | 279 +++++++++++++++++--------------
11  scripting/erm/ERMInterpreter.h   |  13 +-
12  scripting/erm/ERMParser.h        |   1 +
13  3 files changed, 151 insertions(+), 142 deletions(-)
14
15 diff --git a/scripting/erm/ERMInterpreter.cpp b/scripting/erm/ERMInterpreter.cpp
16 index 663cb35722..e4f60105ab 100644
17 --- a/scripting/erm/ERMInterpreter.cpp
18 +++ b/scripting/erm/ERMInterpreter.cpp
19 @@ -163,7 +163,7 @@ namespace ERMConverter
20                 Variable operator()(const TVarExpNotMacro & val) const\r
21                 {\r
22                         if(val.val.has_value())\r
23 -                               return Variable(val.varsym, val.val.get());\r
24 +                               return Variable(val.varsym, *val.val);\r
25                         else\r
26                                 return Variable(val.varsym, 0);\r
27                 }\r
28 @@ -392,7 +392,7 @@ namespace ERMConverter
29  \r
30                         if(trig.params.has_value())\r
31                         {\r
32 -                               for(auto & p : trig.params.get())\r
33 +                               for(auto & p : *trig.params)\r
34                                         optionParams.push_back(std::visit(BodyOption(), p));\r
35                         }\r
36  \r
37 @@ -572,7 +572,7 @@ namespace ERMConverter
38                                 {\r
39                                         if(option.params.has_value())\r
40                                         {\r
41 -                                               for(auto & p : option.params.get())\r
42 +                                               for(auto & p : *option.params)\r
43                                                 {\r
44                                                         std::string macroName = std::visit(MC_S(), p);\r
45  \r
46 @@ -739,7 +739,7 @@ namespace ERMConverter
47  \r
48                                         if(trig.params.has_value())\r
49                                         {\r
50 -                                               for(auto & p : trig.params.get())\r
51 +                                               for(auto & p : *trig.params)\r
52                                                         optionParams.push_back(std::visit(BodyOption(), p));\r
53                                         }\r
54  \r
55 @@ -759,10 +759,10 @@ namespace ERMConverter
56                                 break;\r
57                         case 'H': //checking if string is empty\r
58                                 {\r
59 -                                       if(!trig.params.has_value() || trig.params.get().size() != 1)\r
60 +                                       if(!trig.params.has_value() || trig.params->size() != 1)\r
61                                                 throw EScriptExecError("VR:H option takes exactly 1 parameter!");\r
62  \r
63 -                                       std::string opt = std::visit(VR_H(), trig.params.get()[0]);\r
64 +                                       std::string opt = std::visit(VR_H(), (*trig.params)[0]);\r
65                                         boost::format fmt("ERM.VR(%s):H(%s)");\r
66                                         fmt % v.str() % opt;\r
67                                         putLine(fmt.str());\r
68 @@ -770,10 +770,10 @@ namespace ERMConverter
69                                 break;\r
70                         case 'U':\r
71                                 {\r
72 -                                       if(!trig.params.has_value() || trig.params.get().size() != 1)\r
73 +                                       if(!trig.params.has_value() || trig.params->size() != 1)\r
74                                                 throw EScriptExecError("VR:H/U need 1 parameter!");\r
75  \r
76 -                                       std::string opt = std::visit(VR_S(), trig.params.get()[0]);\r
77 +                                       std::string opt = std::visit(VR_S(), (*trig.params)[0]);\r
78                                         boost::format fmt("ERM.VR(%s):%c(%s)");\r
79                                         fmt % v.str() % (trig.optionCode) % opt;\r
80                                         putLine(fmt.str());\r
81 @@ -781,10 +781,10 @@ namespace ERMConverter
82                                 break;\r
83                         case 'M': //string operations\r
84                                 {\r
85 -                                       if(!trig.params.has_value() || trig.params.get().size() < 2)\r
86 +                                       if(!trig.params.has_value() || trig.params->size() < 2)\r
87                                                 throw EScriptExecError("VR:M needs at least 2 parameters!");\r
88  \r
89 -                                       std::string opt = std::visit(VR_X(), trig.params.get()[0]);\r
90 +                                       std::string opt = std::visit(VR_X(), (*trig.params)[0]);\r
91                                         int paramIndex = 1;\r
92  \r
93                                         if(opt == "3")\r
94 @@ -795,16 +795,16 @@ namespace ERMConverter
95                                         }\r
96                                         else\r
97                                         {\r
98 -                                               auto target = std::visit(VR_X(), trig.params.get()[paramIndex++]);\r
99 +                                               auto target = std::visit(VR_X(), (*trig.params)[paramIndex++]);\r
100  \r
101                                                 boost::format fmt("%s = ERM.VR(%s):M%s(");\r
102                                                 fmt % target % v.str() % opt;\r
103                                                 put(fmt.str());\r
104                                         }\r
105                                         \r
106 -                                       for(int i = paramIndex; i < trig.params.get().size(); i++)\r
107 +                                       for(int i = paramIndex; i < trig.params->size(); i++)\r
108                                         {\r
109 -                                               opt = std::visit(VR_X(), trig.params.get()[i]);\r
110 +                                               opt = std::visit(VR_X(), (*trig.params)[i]);\r
111                                                 if(i > paramIndex) put(",");\r
112                                                 put(opt);\r
113                                         }\r
114 @@ -814,10 +814,10 @@ namespace ERMConverter
115                                 break;\r
116                         case 'X': //bit xor\r
117                                 {\r
118 -                                       if(!trig.params.has_value() || trig.params.get().size() != 1)\r
119 +                                       if(!trig.params.has_value() || trig.params->size() != 1)\r
120                                                 throw EScriptExecError("VR:X option takes exactly 1 parameter!");\r
121  \r
122 -                                       std::string opt = std::visit(VR_X(), trig.params.get()[0]);\r
123 +                                       std::string opt = std::visit(VR_X(), (*trig.params)[0]);\r
124  \r
125                                         boost::format fmt("%s = bit.bxor(%s, %s)");\r
126                                         fmt % v.str() % v.str() % opt;putLine(fmt.str());\r
127 @@ -831,10 +831,10 @@ namespace ERMConverter
128                                 break;\r
129                         case 'S': //setting variable\r
130                                 {\r
131 -                                       if(!trig.params.has_value() || trig.params.get().size() != 1)\r
132 +                                       if(!trig.params.has_value() || trig.params->size() != 1)\r
133                                                 throw EScriptExecError("VR:S option takes exactly 1 parameter!");\r
134  \r
135 -                                       std::string opt = std::visit(VR_S(), trig.params.get()[0]);\r
136 +                                       std::string opt = std::visit(VR_S(), (*trig.params)[0]);\r
137                                         put(v.str());\r
138                                         put(" = ");\r
139                                         put(opt);\r
140 @@ -849,10 +849,10 @@ namespace ERMConverter
141                                 break;\r
142                         case 'V': //convert string to value\r
143                                 {\r
144 -                                       if(!trig.params.has_value() || trig.params.get().size() != 1)\r
145 +                                       if(!trig.params.has_value() || trig.params->size() != 1)\r
146                                                 throw EScriptExecError("VR:V option takes exactly 1 parameter!");\r
147  \r
148 -                                       std::string opt = std::visit(VR_X(), trig.params.get()[0]);\r
149 +                                       std::string opt = std::visit(VR_X(), (*trig.params)[0]);\r
150                                         boost::format fmt("%s = tostring(%s)");\r
151                                         fmt % v.str() % opt;\r
152                                         putLine(fmt.str());\r
153 @@ -877,7 +877,7 @@ namespace ERMConverter
154                 {\r
155                         if(body.has_value())\r
156                         {\r
157 -                               const ERM::Tbody & bo = body.get();\r
158 +                               const ERM::Tbody & bo = *body;\r
159                                 for(int g=0; g<bo.size(); ++g)\r
160                                 {\r
161                                         std::visit(visitor, bo[g]);\r
162 @@ -975,7 +975,7 @@ namespace ERMConverter
163  \r
164                                 if(body.has_value())\r
165                                 {\r
166 -                                       const ERM::Tbody & bo = body.get();\r
167 +                                       const ERM::Tbody & bo = *body;\r
168                                         if(bo.size() == 1)\r
169                                         {\r
170                                                 boost::format fmt("ERM.%s(%s)");\r
171 @@ -983,7 +983,7 @@ namespace ERMConverter
172                                                 fmt % params;\r
173  \r
174                                                 GenericReceiver gr(out, fmt.str(), (name == "DO"));\r
175 -                                               bo[0].apply_visitor(gr);\r
176 +                                               std::visit(gr,bo[0]);\r
177                                         }\r
178                                         else\r
179                                         {\r
180 @@ -1044,7 +1044,7 @@ namespace ERMConverter
181                                         break;\r
182                                 }\r
183  \r
184 -                               convertConditionInner(cond.rhs.get().get(), op);\r
185 +                               convertConditionInner(cond.rhs->get(), op);\r
186                         }\r
187                 }\r
188  \r
189 @@ -1067,7 +1067,7 @@ namespace ERMConverter
190                                         break;\r
191                                 }\r
192  \r
193 -                               convertConditionInner(cond.rhs.get().get(), cond.ctype);\r
194 +                               convertConditionInner(cond.rhs->get(), cond.ctype);\r
195                         }\r
196  \r
197                         putLine(" then ");\r
198 @@ -1081,7 +1081,7 @@ namespace ERMConverter
199                         if(name=="if")\r
200                         {\r
201                                 if(condition.has_value())\r
202 -                                       convertCondition(condition.get());\r
203 +                                       convertCondition(*condition);\r
204                                 else\r
205                                         putLine("if true then");\r
206                         }\r
207 @@ -1097,7 +1097,7 @@ namespace ERMConverter
208                         {\r
209                                 if(condition.has_value())\r
210                                 {\r
211 -                                       convertCondition(condition.get());\r
212 +                                       convertCondition(*condition);\r
213                                         convert(name, identifier, body);\r
214                                         putLine("end");\r
215                                 }\r
216 @@ -1181,7 +1181,7 @@ namespace ERMConverter
217                 {\r
218                         (*out) << "{}";\r
219                 }\r
220 -               void operator()(const VNode & opt) const;\r
221 +               void operator()(const boost::recursive_wrapper<VNode> & opt) const;\r
222  \r
223                 void operator()(const VSymbol & opt) const \r
224                 {\r
225 @@ -1192,7 +1192,7 @@ namespace ERMConverter
226                         TLiteralEval tmp;\r
227                         (*out) << std::visit(tmp, opt);\r
228                 }\r
229 -               void operator()(ERM const ::Tcommand & opt) const\r
230 +               void operator()(const ERM::Tcommand & opt) const\r
231                 {\r
232                         //this is how FP works, evaluation == producing side effects\r
233                         //TODO: can we evaluate to smth more useful?\r
234 @@ -1202,9 +1202,9 @@ namespace ERMConverter
235                 }\r
236         };\r
237  \r
238 -       void VOptionEval::operator()(const VNode & opt) const\r
239 +       void VOptionEval::operator()(const boost::recursive_wrapper<VNode> & opt) const\r
240         {\r
241 -               VNode tmpn(opt);\r
242 +               VNode tmpn(opt.get());\r
243  \r
244                 (*out) << "{";\r
245  \r
246 @@ -1375,35 +1375,35 @@ struct ScriptScanner
247         }\r
248         void operator()(const TERMline & cmd) const\r
249         {\r
250 -               if(cmd.which() == 0) //TCommand\r
251 +               if(std::holds_alternative<Tcommand>(cmd)) //TCommand\r
252                 {\r
253                         Tcommand tcmd = std::get<Tcommand>(cmd);\r
254 -                       switch (tcmd.cmd.which())\r
255 +                       struct Visitor\r
256                         {\r
257 -                       case 0: //trigger\r
258 +                               void operator()(const ERM::Ttrigger& t) const\r
259                                 {\r
260                                         Trigger trig;\r
261 -                                       trig.line = lp;\r
262 -                                       interpreter->triggers[ TriggerType(std::get<ERM::Ttrigger>(tcmd.cmd).name) ].push_back(trig);\r
263 +                                       trig.line = l;\r
264 +                                       i->triggers[ TriggerType(t.name) ].push_back(trig);\r
265                                 }\r
266 -                               break;\r
267 -                       case 1: //instruction\r
268 +                               void operator()(const ERM::Tinstruction&) const\r
269                                 {\r
270 -                                       interpreter->instructions.push_back(lp);\r
271 +                                       i->instructions.push_back(l);\r
272                                 }\r
273 -                               break;\r
274 -                       case 3: //post trigger\r
275 +                               void operator()(const ERM::Treceiver&) const {}\r
276 +                               void operator()(const ERM::TPostTrigger& pt) const\r
277                                 {\r
278                                         Trigger trig;\r
279 -                                       trig.line = lp;\r
280 -                                       interpreter->postTriggers[ TriggerType(std::get<ERM::TPostTrigger>(tcmd.cmd).name) ].push_back(trig);\r
281 +                                       trig.line = l;\r
282 +                                       i->postTriggers[ TriggerType(pt.name) ].push_back(trig);\r
283                                 }\r
284 -                               break;\r
285 -                       default:\r
286 -                               break;\r
287 -                       }\r
288 -               }\r
289 +                               const decltype(interpreter)& i;\r
290 +                               const LinePointer& l;\r
291 +                       };\r
292  \r
293 +                       Visitor v{interpreter, lp};\r
294 +                       std::visit(v, tcmd.cmd);\r
295 +               }\r
296         }\r
297  };\r
298  \r
299 @@ -1421,68 +1421,85 @@ ERMInterpreter::~ERMInterpreter()
300  \r
301  bool ERMInterpreter::isATrigger( const ERM::TLine & line )\r
302  {\r
303 -       switch(line.which())\r
304 +       if(std::holds_alternative<ERM::TVExp>(line))\r
305         {\r
306 -       case 0: //v-exp\r
307 -               {\r
308 -                       TVExp vexp = std::get<TVExp>(line);\r
309 -                       if(vexp.children.empty())\r
310 -                               return false;\r
311 +               TVExp vexp = std::get<TVExp>(line);\r
312 +               if(vexp.children.empty())\r
313 +                       return false;\r
314  \r
315 -                       switch (getExpType(vexp.children[0]))\r
316 -                       {\r
317 -                       case SYMBOL:\r
318 -                               return false;\r
319 -                               break;\r
320 -                       case TCMD:\r
321 -                               return isCMDATrigger( std::get<ERM::Tcommand>(vexp.children[0]) );\r
322 -                               break;\r
323 -                       default:\r
324 -                               return false;\r
325 -                               break;\r
326 -                       }\r
327 -               }\r
328 -               break;\r
329 -       case 1: //erm\r
330 +               switch (getExpType(vexp.children[0]))\r
331                 {\r
332 -                       TERMline ermline = std::get<TERMline>(line);\r
333 -                       switch(ermline.which())\r
334 -                       {\r
335 -                       case 0: //tcmd\r
336 -                               return isCMDATrigger( std::get<ERM::Tcommand>(ermline) );\r
337 -                               break;\r
338 -                       default:\r
339 -                               return false;\r
340 -                               break;\r
341 -                       }\r
342 +               case SYMBOL:\r
343 +                       return false;\r
344 +                       break;\r
345 +               case TCMD:\r
346 +                       return isCMDATrigger( std::get<ERM::Tcommand>(vexp.children[0]) );\r
347 +                       break;\r
348 +               default:\r
349 +                       return false;\r
350 +                       break;\r
351                 }\r
352 -               break;\r
353 -       default:\r
354 -               assert(0); //it should never happen\r
355 -               break;\r
356         }\r
357 -       assert(0);\r
358 +       else if(std::holds_alternative<TERMline>(line))\r
359 +       {\r
360 +               TERMline ermline = std::get<TERMline>(line);\r
361 +               return std::holds_alternative<ERM::Tcommand>(ermline) && isCMDATrigger( std::get<ERM::Tcommand>(ermline) );\r
362 +       }\r
363 +       else\r
364 +       {\r
365 +               assert(0);\r
366 +       }\r
367         return false;\r
368  }\r
369  \r
370  ERM::EVOtions ERMInterpreter::getExpType(const ERM::TVOption & opt)\r
371  {\r
372 -       //MAINTENANCE: keep it correct!\r
373 -       return static_cast<ERM::EVOtions>(opt.which());\r
374 +       struct Visitor\r
375 +       {\r
376 +               ERM::EVOtions operator()(const boost::recursive_wrapper<ERM::TVExp>&) const\r
377 +               {\r
378 +                       return ERM::EVOtions::VEXP;\r
379 +               }\r
380 +               ERM::EVOtions operator()(const ERM::TSymbol&) const\r
381 +               {\r
382 +                       return ERM::EVOtions::SYMBOL;\r
383 +               }\r
384 +               ERM::EVOtions operator()(char) const\r
385 +               {\r
386 +                       return ERM::EVOtions::CHAR;\r
387 +               }\r
388 +               ERM::EVOtions operator()(double) const\r
389 +               {\r
390 +                       return ERM::EVOtions::DOUBLE;\r
391 +               }\r
392 +               ERM::EVOtions operator()(int) const\r
393 +               {\r
394 +                       return ERM::EVOtions::INT;\r
395 +               }\r
396 +               ERM::EVOtions operator()(const ERM::Tcommand&) const\r
397 +               {\r
398 +                       return ERM::EVOtions::TCMD;\r
399 +               }\r
400 +               ERM::EVOtions operator()(const ERM::TStringConstant&) const\r
401 +               {\r
402 +                       return ERM::EVOtions::STRINGC;\r
403 +               }\r
404 +       };\r
405 +       const Visitor v;\r
406 +       return std::visit(v, opt);\r
407  }\r
408  \r
409  bool ERMInterpreter::isCMDATrigger(const ERM::Tcommand & cmd)\r
410  {\r
411 -       switch (cmd.cmd.which())\r
412 +       struct Visitor\r
413         {\r
414 -       case 0: //trigger\r
415 -       case 3: //post trigger\r
416 -               return true;\r
417 -               break;\r
418 -       default:\r
419 -               return false;\r
420 -               break;\r
421 -       }\r
422 +               bool operator()(const ERM::Ttrigger&) const     { return true; }\r
423 +               bool operator()(const ERM::TPostTrigger&) const { return true; }\r
424 +               bool operator()(const ERM::Tinstruction&) const { return false; }\r
425 +               bool operator()(const ERM::Treceiver&) const    { return false; }\r
426 +       };\r
427 +       const Visitor v;\r
428 +       return std::visit(v, cmd.cmd);\r
429  }\r
430  \r
431  ERM::TLine & ERMInterpreter::retrieveLine(const LinePointer & linePtr)\r
432 @@ -1492,17 +1509,17 @@ ERM::TLine & ERMInterpreter::retrieveLine(const LinePointer & linePtr)
433  \r
434  ERM::TTriggerBase & ERMInterpreter::retrieveTrigger(ERM::TLine & line)\r
435  {\r
436 -       if(line.which() == 1)\r
437 +       if(std::holds_alternative<ERM::TERMline>(line))\r
438         {\r
439                 ERM::TERMline &tl = std::get<ERM::TERMline>(line);\r
440 -               if(tl.which() == 0)\r
441 +               if(std::holds_alternative<ERM::Tcommand>(tl))\r
442                 {\r
443                         ERM::Tcommand &tcm = std::get<ERM::Tcommand>(tl);\r
444 -                       if(tcm.cmd.which() == 0)\r
445 +                       if(std::holds_alternative<ERM::Ttrigger>(tcm.cmd))\r
446                         {\r
447                                 return std::get<ERM::Ttrigger>(tcm.cmd);\r
448                         }\r
449 -                       else if(tcm.cmd.which() == 3)\r
450 +                       else if(std::holds_alternative<ERM::TPostTrigger>(tcm.cmd))\r
451                         {\r
452                                 return std::get<ERM::TPostTrigger>(tcm.cmd);\r
453                         }\r
454 @@ -1569,6 +1586,40 @@ namespace VERMInterpreter
455  {\r
456         VOption convertToVOption(const ERM::TVOption & tvo)\r
457         {\r
458 +               struct OptionConverterVisitor\r
459 +               {\r
460 +                       VOption operator()(const boost::recursive_wrapper<ERM::TVExp>& cmd) const\r
461 +                       { \r
462 +                               return boost::recursive_wrapper<VNode>(VNode(cmd.get()));\r
463 +                       }\r
464 +                       VOption operator()(const ERM::TSymbol & cmd) const\r
465 +                       {\r
466 +                               if(cmd.symModifier.empty())\r
467 +                                       return VSymbol(cmd.sym);\r
468 +                               else\r
469 +                                       return boost::recursive_wrapper<VNode>(VNode(cmd));\r
470 +                       }\r
471 +                       VOption operator()(const char & cmd) const \r
472 +                       {\r
473 +                               return TLiteral(cmd);\r
474 +                       }\r
475 +                       VOption operator()(const double & cmd) const\r
476 +                       {\r
477 +                               return TLiteral(cmd);\r
478 +                       }\r
479 +                       VOption operator()(const int & cmd) const\r
480 +                       {\r
481 +                               return TLiteral(cmd);\r
482 +                       }\r
483 +                       VOption operator()(const ERM::Tcommand & cmd) const\r
484 +                       {\r
485 +                               return cmd;\r
486 +                       }\r
487 +                       VOption operator()(const ERM::TStringConstant & cmd) const\r
488 +                       {\r
489 +                               return TLiteral(cmd.str);\r
490 +                       }\r
491 +               };\r
492                 return std::visit(OptionConverterVisitor(), tvo);\r
493         }\r
494  \r
495 @@ -1706,38 +1757,6 @@ namespace VERMInterpreter
496                 return ret;\r
497         }\r
498  \r
499 -       VOption OptionConverterVisitor::operator()(ERM const ::TVExp & cmd) const\r
500 -       {\r
501 -               return VNode(cmd);\r
502 -       }\r
503 -       VOption OptionConverterVisitor::operator()(ERM const ::TSymbol & cmd) const\r
504 -       {\r
505 -               if(cmd.symModifier.empty())\r
506 -                       return VSymbol(cmd.sym);\r
507 -               else\r
508 -                       return VNode(cmd);\r
509 -       }\r
510 -       VOption OptionConverterVisitor::operator()(const char & cmd) const\r
511 -       {\r
512 -               return TLiteral(cmd);\r
513 -       }\r
514 -       VOption OptionConverterVisitor::operator()(const double & cmd) const\r
515 -       {\r
516 -               return TLiteral(cmd);\r
517 -       }\r
518 -       VOption OptionConverterVisitor::operator()(const int & cmd) const\r
519 -       {\r
520 -               return TLiteral(cmd);\r
521 -       }\r
522 -       VOption OptionConverterVisitor::operator()(ERM const ::Tcommand & cmd) const\r
523 -       {\r
524 -               return cmd;\r
525 -       }\r
526 -       VOption OptionConverterVisitor::operator()(ERM const ::TStringConstant & cmd) const\r
527 -       {\r
528 -               return TLiteral(cmd.str);\r
529 -       }\r
530 -\r
531         VermTreeIterator VOptionList::cdr()\r
532         {\r
533                 VermTreeIterator ret(*this);\r
534 diff --git a/scripting/erm/ERMInterpreter.h b/scripting/erm/ERMInterpreter.h
535 index baf3d317ee..ed25509777 100644
536 --- a/scripting/erm/ERMInterpreter.h
537 +++ b/scripting/erm/ERMInterpreter.h
538 @@ -134,7 +134,7 @@ namespace VERMInterpreter
539                                 "TH", "TM"\r
540                         };\r
541  \r
542 -                       for(int i=0; i<ARRAY_COUNT(validTriggers); ++i)\r
543 +                       for(int i=0; i<std::size(validTriggers); ++i)\r
544                         {\r
545                                 if(validTriggers[i] == trig)\r
546                                         return static_cast<ETrigType>(i);\r
547 @@ -278,17 +278,6 @@ namespace VERMInterpreter
548                 VermTreeIterator cdr();\r
549         };\r
550  \r
551 -       struct OptionConverterVisitor\r
552 -       {\r
553 -               VOption operator()(ERM const ::TVExp & cmd) const;\r
554 -               VOption operator()(ERM const ::TSymbol & cmd) const;\r
555 -               VOption operator()(const char & cmd) const;\r
556 -               VOption operator()(const double & cmd) const;\r
557 -               VOption operator()(const int & cmd) const;\r
558 -               VOption operator()(ERM const ::Tcommand & cmd) const;\r
559 -               VOption operator()(ERM const ::TStringConstant & cmd) const;\r
560 -       };\r
561 -\r
562         struct VNode\r
563         {\r
564         private:\r
565 diff --git a/scripting/erm/ERMParser.h b/scripting/erm/ERMParser.h
566 index 29d92e61b6..95b2ccbbf3 100644
567 --- a/scripting/erm/ERMParser.h
568 +++ b/scripting/erm/ERMParser.h
569 @@ -10,6 +10,7 @@
570  #pragma once\r
571  \r
572  #include <boost/spirit/home/support/unused.hpp>\r
573 +#include <boost/variant/recursive_wrapper.hpp>\r
574  \r
575  namespace spirit = boost::spirit;\r
576  \r
This page took 0.095313 seconds and 3 git commands to generate.