@@ -33,6 +33,35 @@ public function __construct($sName, $aArguments, $sSeparator = ',', $iLineNo = 0
33
33
parent ::__construct ($ aArguments , $ sSeparator , $ iLineNo );
34
34
}
35
35
36
+ /**
37
+ * @param ParserState $oParserState
38
+ * @param bool $bIgnoreCase
39
+ *
40
+ * @return string
41
+ *
42
+ * @throws SourceException
43
+ * @throws UnexpectedEOFException
44
+ * @throws UnexpectedTokenException
45
+ */
46
+ public static function parseName (ParserState $ oParserState , $ bIgnoreCase = false )
47
+ {
48
+ return $ oParserState ->parseIdentifier ($ bIgnoreCase );
49
+ }
50
+
51
+ /**
52
+ * @param ParserState $oParserState
53
+ *
54
+ * @return array
55
+ *
56
+ * @throws SourceException
57
+ * @throws UnexpectedEOFException
58
+ * @throws UnexpectedTokenException
59
+ */
60
+ public static function parseArgs (ParserState $ oParserState )
61
+ {
62
+ return Value::parseValue ($ oParserState , ['= ' , ' ' , ', ' , '/ ' , '* ' , '+ ' , '- ' ]);
63
+ }
64
+
36
65
/**
37
66
* @param ParserState $oParserState
38
67
* @param bool $bIgnoreCase
@@ -45,9 +74,9 @@ public function __construct($sName, $aArguments, $sSeparator = ',', $iLineNo = 0
45
74
*/
46
75
public static function parse (ParserState $ oParserState , $ bIgnoreCase = false )
47
76
{
48
- $ mResult = $ oParserState-> parseIdentifier ( $ bIgnoreCase );
77
+ $ mResult = self :: parseName ( $ oParserState, $ bIgnoreCase );
49
78
$ oParserState ->consume ('( ' );
50
- $ aArguments = Value:: parseValue ($ oParserState, [ ' = ' , ' ' , ' , ' ] );
79
+ $ aArguments = self :: parseArgs ($ oParserState );
51
80
$ mResult = new CSSFunction ($ mResult , $ aArguments , ', ' , $ oParserState ->currentLine ());
52
81
$ oParserState ->consume (') ' );
53
82
return $ mResult ;
0 commit comments