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
32 lines (29 loc) · 885 Bytes
/
Copy pathExpression.php
File metadata and controls
32 lines (29 loc) · 885 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
28
29
30
31
32
<?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
{
/**
* @param ParserState $oParserState
* @param bool $bIgnoreCase
*
* @return Expression
*
* @throws SourceException
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public static function parse(ParserState $oParserState, $bIgnoreCase = false)
{
$oParserState->consume('(');
$aArguments = self::parseArgs($oParserState);
$mResult = new Expression("", $aArguments, ',', $oParserState->currentLine());
$oParserState->consume(')');
return $mResult;
}
}