On 2010-07-07, Andrew O. Shadoura wrote:
>   height: eval("2*2");
I would agree, quotes are good.

> Moreover, I think we don't need eval as such, we can just drop it:
>   height: 2*2;
> This won't slow down parsers, as it's easy to check if rule contains eval, 
> using this regexp:
> 
> ^([a-z-]+)[ ]*:[ ]*("([^\x22]*)"|([0-9,.]+)|(#[,0-9a-fA-F]+)+)

I don't like it :-). Using eval it is clear something dynamic is going
to happen. What with the "2*2" bar? Is 
   name: 2*2
a string ('2*2') or to be evaluated? 

What if I want to draw name tags for large features only?
  name: eval("if ((area)>100) (tag(name)) ('')")

Still that easy to identify? I am not especially attached to eval(), but
just allowing inline calculations does not seem very appealing to me.

Sebastian

Attachment: pgpi9jsaAvLkU.pgp
Description: PGP signature

_______________________________________________
Mapcss mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/mapcss

Reply via email to