Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431924
NoWhitespace.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
611 B
Referenced Files
None
Subscribers
None
NoWhitespace.php
View Options
<?php
/**
* @file
* @license https://opensource.org/licenses/Apache-2.0 Apache-2.0
*/
namespace
Wikimedia\CSS\Grammar
;
use
Wikimedia\CSS\Objects\ComponentValueList
;
use
Wikimedia\CSS\Objects\Token
;
/**
* Matcher that asserts there was no whitespace before the current position.
*/
class
NoWhitespace
extends
Matcher
{
/** @inheritDoc */
protected
function
generateMatches
(
ComponentValueList
$values
,
$start
,
array
$options
)
{
$cv
=
$values
[
$start
-
1
]
??
null
;
if
(
!
$cv
instanceof
Token
||
$cv
->
type
()
!==
Token
::
T_WHITESPACE
)
{
yield
$this
->
makeMatch
(
$values
,
$start
,
$start
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 21:14 (1 d, 13 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4e/0b/06d94e0e031e11bdec652e9bf61a
Default Alt Text
NoWhitespace.php (611 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment