Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value

LineName::parsepublic staticWC 1.0

Method of the class: LineName{}

No Hooks.

Returns

LineName.

Usage

$result = LineName::parse( $oParserState );
$oParserState(ParserState) (required)
.

LineName::parse() code WC 10.7.0

public static function parse(ParserState $oParserState)
{
    $oParserState->consume('[');
    $oParserState->consumeWhiteSpace();
    $aNames = [];
    do {
        if ($oParserState->getSettings()->bLenientParsing) {
            try {
                $aNames[] = $oParserState->parseIdentifier();
            } catch (UnexpectedTokenException $e) {
                if (!$oParserState->comes(']')) {
                    throw $e;
                }
            }
        } else {
            $aNames[] = $oParserState->parseIdentifier();
        }
        $oParserState->consumeWhiteSpace();
    } while (!$oParserState->comes(']'));
    $oParserState->consume(']');
    return new LineName($aNames, $oParserState->currentLine());
}