Hello.

I have some thoughts on eval(). 

First, if we use eval() as is, I think we should put its argument in quotes:

  height: eval("2*2");

or 

  height: eval('2*2');

and only skip them if the argument is numeric (or if it is hex-color):

  height: eval(2);

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]+)+)

(maybe need to add ''-style quotes here).

For compatibility reasons, we can have eval() being no-op function, so it 
becomes completely optional.

Ideas? Comments?

-- 
WBR, Andrew

Attachment: signature.asc
Description: This is a digitally signed message part.

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

Reply via email to