comparison lib/js/urweb.js @ 838:5154a047c6bc

Lexing some more string escape sequences; JS versions of number read; fix problem with signature unification; escape < more often in Jscomp
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Jun 2009 19:28:25 -0400
parents b0a85cbefed2
children 44c2c089ca15
comparison
equal deleted inserted replaced
837:ccf22c2c77b2 838:5154a047c6bc
393 var r = parseFloat(s); 393 var r = parseFloat(s);
394 if (r.toString() == s) 394 if (r.toString() == s)
395 return r; 395 return r;
396 else 396 else
397 er("Can't parse float: " + s); 397 er("Can't parse float: " + s);
398 }
399
400 function pio(s) {
401 var r = parseInt(s);
402 if (r.toString() == s)
403 return r;
404 else
405 return null;
406 }
407
408 function pflo(s) {
409 var r = parseFloat(s);
410 if (r.toString() == s)
411 return r;
412 else
413 return null;
398 } 414 }
399 415
400 function uf(s) { 416 function uf(s) {
401 return escape(s).replace(new RegExp ("/", "g"), "%2F"); 417 return escape(s).replace(new RegExp ("/", "g"), "%2F");
402 } 418 }