CSS example grammar: Simplify |integer| and |float| rules

It's not necessary to parse |parts| in the |integer| and |float| rule
into integer/float value. Everywhere these rules are used the result is
converted back into string anyway.
redux
David Majda 11 years ago
parent 2d4ecaf39c
commit 68c6452d8a

@ -316,10 +316,10 @@ nmchar
/ escape
integer
= parts:$[0-9]+ { return parseInt(parts); }
= parts:$[0-9]+ { return parts; }
float
= parts:$([0-9]* "." [0-9]+) { return parseFloat(parts); }
= parts:$([0-9]* "." [0-9]+) { return parts; }
string1
= '"' chars:([^\n\r\f\\"] / "\\" nl:nl { return nl } / escape)* '"' {

Loading…
Cancel
Save