Hi Andrzej, okay, I think that meant I should apply the patch, done with r3839.
I've also checked your idea for the shorter form. I first thought it is simple
but then noticed that
you didn't specify the continue statement in the shorter form.
I guess you want that to be added automatically. Does that also mean that
"with_actions" should
be added automatically if there are actions?
In other words: If we have
a=b {name ... } [0x0C ... resolution 24] [0x10801 resolution 18]
would that be the same as
a=b {name ... } [0x0C ... resolution 24 continue with_actions]
a=b [0x10801 resolution 18]
I guess that also means we should allow
a=b {name ... } [0x0C ... resolution 24] {set ... } [0x10801 resolution 18]
as a replacement for
a=b {name ... } [0x0C ... resolution 24 continue with_actions]
a=b {set ... } [0x10801 resolution 18]
Now, I think that mens we should also allow
a=b {name ... } [0x0C ... resolution 24] {set c=2 }
as a repelacement for
a=b {name ... } [0x0C ... resolution 24 continue with_actions]
a=b {set c=2 }
The attached patch seems to implement it that way and contains some unit tests.
I hope it doesn't mess up error handling when the style contains syntax errors.
Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Andrzej
Popowski <[email protected]>
Gesendet: Donnerstag, 9. März 2017 14:57:11
An: [email protected]
Betreff: Re: [mkgmap-dev] if-then-else in style and style options
Hi Gerd,
I don't think that kind of expression is necessary, unless it speeds up
compilation, which it probably doesn't in current implementation. But it
would be nice to have it. Maybe using keyword "apply" would help?
Similarly like in relations.
Just another thought, could we get following syntax:
junction=roundabout & (highway=trunk | highway=trunk_link) [0x0c
road_class=4 road_speed=2 resolution 24][0x10801 resolution 18]
instead of 2 rules:
junction=roundabout & (highway=trunk | highway=trunk_link) [0x0c
road_class=4 road_speed=2 resolution 24 continue]
junction=roundabout & (highway=trunk | highway=trunk_link) [0x10801
resolution 18]
--
Best regards,
Andrzej
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
reuse-expression-v1.patch
Description: reuse-expression-v1.patch
_______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
