Skip to content

Add parse_whitespace_separated() #105

Closed
@mitchhentges

Description

@mitchhentges

For servo/servo#9283, Servo needs to be able to parse rect(...) values with values separated purely by spaces, for example: rect(0, 0, 5, 5).

However, cssparser only provides parse_comma_separated(). I looked into it a little, and it's a little challenging: parse_{x}_separated() will parse up to a Delimiter, of which all 8 slots of the byte are in use. It is not possible to have more than one true bit per byte, because some bitwise OR logic is used which depends on mutual exclusivity.

Additionally, three different Delimiters would need to be added: space, tab, newline.
So, I'd love to implement this, but I'll need some pointers :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions