- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 7 Aug 2012 08:58:45 -0700
- To: Simon Sapin <simon.sapin@kozea.fr>
- Cc: www-style@w3.org
On Tue, Aug 7, 2012 at 8:41 AM, Simon Sapin <simon.sapin@kozea.fr> wrote: > Le 07/08/2012 17:36, Tab Atkins Jr. a écrit : >> I can't do whitespace >> collapsing, even, because you can have an unbounded number of >> *comments* between the two tokens as well. > > I don’t see how this is a problem, there is an unbounded number of > characters in many tokens. Would an internal "the last token was whitespace" > flag not be enough? "Unbounded" is fine as long as they're being added to the thing you're currently working on. It's problematic if you need to remember all the things you're skipping past so you can emit them later. Currently the parser has only a single instance of lookahead, and that's specifically for dealing with !important, so it can tell whether to append a DELIM(!) token to the property or set its important flag. Having to read an unbounded number of whitespace and comment tokens forward, and then emit them later if it turns out the next "real" token isn't an IDENT(important), is problematic. I'd like to avoid it if possible. ~TJ
Received on Tuesday, 7 August 2012 15:59:33 UTC