cssparser_v2.0.zip
@wrCisco, and anyone else following along,
I have modified CSSParser to extend the set of tokens to include CHARSET, IMPORT, NAMESP and these now are tokenized properly instead of special casing.
I have tracked file offset positions for specific internal parser state transitions and added a pos field to the token structure returned so that file offsets can be used to edit css outside the CSSParser itself.
I have enabled proper indent level tracking to enable nesting of selectors, and nesting @media rules.
I have added a method for a csstoken list (after outside processing or editing), be set back inside of CSSParser so that the serialize_css function can serialize it back to a css file/string.
See attched cssparser_v2.0.zip for people to evaluate.
Thank you for your testing and feedback.
PS: Have completed the cleanup and now have posted cssparser_v2.0.zip
Last edited by KevinH; 01-11-2021 at 11:59 AM.
Reason: Finished cleanup - adding cssparser_v2.0.zip
|