reprospect.test.sass.instruction.pattern module

class reprospect.test.sass.instruction.pattern.PatternBuilderView on GitHub

Bases: object

Helper class to build patterns for instruction components.

HEXADECIMAL: Final[str] = '0x[0-9A-Fa-f]+'
static any(*args: str) strView on GitHub

Build a pattern matching any of args.

static group(s: int | str, group: str) strView on GitHub

Wrap a pattern in a named capture group.

static groups(s: int | str, groups: Iterable[str]) strView on GitHub

Wrap a pattern in named capture groups.

static zero_or_more(s: str) strView on GitHub

Build an optional non-capturing pattern that matches zero or more occurrences of the given pattern.

static zero_or_one(s: str) strView on GitHub

Build an optional non-capturing pattern that matches zero or one occurrence of the given pattern.