for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Highlighter
*
* Copyright (C) 2016, Some right reserved.
* @author Kacper "Kadet" Donat <[email protected]>
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* From Kadet with love.
*/
namespace Kadet\Highlighter\Language\Css;
use Kadet\Highlighter\Matcher\RegexMatcher;
use Kadet\Highlighter\Parser\Rule;
class Less extends PreProcessor
{
* Tokenization rules
public function setupRules()
parent::setupRules();
$this->rules->add('variable', new Rule(new RegexMatcher('/(@[\w-]+)/'), [
'context' => ['!comment', '!keyword'],
'priority' => -1
]));
}
public function getIdentifier()
return 'less';
public static function getMetadata()
return [
'name' => ['less'],
'mime' => ['text/x-less'],
'extension' => ['*.less']
];