CompoundSelector.parse constructor

CompoundSelector.parse(
  1. String contents, {
  2. Object? url,
  3. bool allowParent = true,
})

Parses a compound selector from contents.

If passed, url is the name of the file from which contents comes. allowParent controls whether a ParentSelector is allowed in this selector.

Throws a SassFormatException if parsing fails.

Implementation

factory CompoundSelector.parse(
  String contents, {
  Object? url,
  bool allowParent = true,
}) =>
    SelectorParser(
      contents,
      url: url,
      allowParent: allowParent,
    ).parseCompoundSelector();