forked from MyIntervals/PHP-CSS-Parser
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathExpression.php
More file actions
27 lines (24 loc) · 797 Bytes
/
Copy pathExpression.php
File metadata and controls
27 lines (24 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
/**
* An `Expression` represents a special kind of value that is comprised of multiple components wrapped in parenthesis.
* Examle `height: (vh - 10);`.
*/
class Expression extends CSSFunction
{
/**
* @throws SourceException
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public static function parse(ParserState $oParserState, bool $bIgnoreCase = false): Expression
{
$oParserState->consume('(');
$aArguments = parent::parseArguments($oParserState);
$mResult = new Expression("", $aArguments, ',', $oParserState->currentLine());
$oParserState->consume(')');
return $mResult;
}
}