Skip to content

Commit

Permalink
Updated version and headers
Browse files Browse the repository at this point in the history
  • Loading branch information
kadet1090 committed Mar 27, 2016
1 parent f9a5125 commit c1e7a3b
Show file tree
Hide file tree
Showing 37 changed files with 146 additions and 142 deletions.
8 changes: 4 additions & 4 deletions Formatter/CliFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
8 changes: 4 additions & 4 deletions Formatter/DebugFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
8 changes: 4 additions & 4 deletions Formatter/FormatterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
9 changes: 4 additions & 5 deletions Formatter/HtmlFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand All @@ -25,7 +25,6 @@
*/
class HtmlFormatter implements FormatterInterface
{

public function format(Tokens $tokens)
{
$source = $tokens->getSource();
Expand Down
10 changes: 5 additions & 5 deletions KeyLighter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand All @@ -30,7 +30,7 @@ class KeyLighter
{
use Singleton;

const VERSION = '0.2.0';
const VERSION = '0.7.0';

/**
* Registered aliases
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Kadet
Copyright (C) 2016 Kadet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Language/Css.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function setupRules()
'context' => $this->everywhere()
]),

'operator.punctuation' => new Rule(new SubStringMatcher(';', ['separated' => false]), [
'operator.punctuation' => new Rule(new SubStringMatcher(';'), [
'context' => $this->everywhere()
]),

Expand Down
7 changes: 3 additions & 4 deletions Language/Css/Sass.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ public function setupRules()
{
parent::setupRules();

$this->rules->remove('meta.selector');
$this->rules->remove('meta.declaration');
$this->rules->remove('meta.declaration.media');
$this->rules->remove('meta.selector.tag');

$this->rules->add('meta.selector', new Rule(new RegexMatcher('/(?=(?:\n+|^)(\h*)([^\h].*)\n+\1\h+)/', [
2 => Token::NAME
Expand All @@ -51,16 +49,17 @@ public function setupRules()
'factory' => new TokenFactory(MetaToken::class)
]));

$this->rules->add('meta.declaration.media', new Rule(new RegexMatcher('/@media(.*?)/'), [
$this->rules->add('meta.declaration.media', new Rule(new RegexMatcher('/@media(.*?)\n/'), [
'context' => Validator::everywhere(),
'factory' => new TokenFactory(MetaToken::class)
]));

$this->rules->add('symbol.selector.tag', new Rule(new RegexMatcher('/([\w-]+)/'), [
$this->rules->add('symbol.selector.tag', new Rule(new RegexMatcher('/\b([a-z-][\w-]*)/'), [
'context' => ['meta.selector', '!symbol', '!meta.declaration.media'],
]));

$this->rules->rule('symbol.selector.class')->setContext(['meta.selector']);
$this->rules->rule('keyword.at-rule')->setContext(['meta.selector']);
$this->rules->rule('symbol.selector.class.pseudo')->setContext(['meta.selector']);
$this->rules->rule('symbol.selector.id')->setContext(['meta.selector']);
}
Expand Down
10 changes: 5 additions & 5 deletions Language/Ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand All @@ -28,7 +28,7 @@ public function setupRules()
{
$this->rules->addMany([
'comment' => new Rule(new CommentMatcher([';'], [])),
'symbol.section' => new Rule(new RegexMatcher('/(\[[\.\w]+\])/i')),
'symbol.section' => new Rule(new RegexMatcher('/(\[.*?])/i')),
'variable' => new Rule(new RegexMatcher('/([\.\w]+)\s*=/i')),
'number' => new Rule(new RegexMatcher('/(-?\d+)/i')),

Expand Down
8 changes: 4 additions & 4 deletions Language/JavaScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* @author Kacper "Kadet" Donat <[email protected]>
* Copyright (C) 2016, Some right reserved.
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
8 changes: 4 additions & 4 deletions Language/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
20 changes: 13 additions & 7 deletions Language/Php.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* @author Kacper "Kadet" Donat <[email protected]>
* Copyright (C) 2016, Some right reserved.
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down Expand Up @@ -69,9 +69,15 @@ public function setupRules()
]),
],

'symbol.namespace' => new Rule(new RegexMatcher('/(\\\{0,2}(?:\w+\\\{1,2})+\w+)/i'), [
'context' => ['*symbol', '*none']
]),
'symbol.namespace' => [
/*new Rule(new RegexMatcher('/(\\\{0,2}(?:\w+\\\{1,2})+)\w+/i'), [
'context' => ['*symbol', '*none']
]),*/

new Rule(new RegexMatcher('/namespace\s*(\\\{0,2}(?:\w+\\\{1,2})+\w+);/i'), [
'context' => ['*symbol', '*none']
]),
],

'keyword.escape' => new Rule(new RegexMatcher('/(\\\(?:x[0-9a-fA-F]{1,2}|u\{[0-9a-fA-F]{1,6}\}|[0-7]{1,3}|.))/i'), [
'context' => ['string']
Expand Down
8 changes: 4 additions & 4 deletions Language/PlainText.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
8 changes: 4 additions & 4 deletions Language/PowerShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
4 changes: 2 additions & 2 deletions Language/Sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public function setupRules()
'comment' => new Rule(new CommentMatcher(['#', '--'], [['/*', '*/']])),

'string' => [
new Rule(new SubStringMatcher('\''), [
'single' => new Rule(new SubStringMatcher('\''), [
'factory' => new TokenFactory(ContextualToken::class)
]),
new Rule(new SubStringMatcher('"'), [
'double' => new Rule(new SubStringMatcher('"'), [
'factory' => new TokenFactory(ContextualToken::class)
]),
],
Expand Down
8 changes: 4 additions & 4 deletions Language/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/**
* Highlighter
*1
* Copyright (C) 2015, Some right reserved.
* @author Kacper "Kadet" Donat <[email protected]>
* Copyright (C) 2016, Some right reserved.
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
8 changes: 4 additions & 4 deletions Matcher/CommentMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
8 changes: 4 additions & 4 deletions Matcher/MatcherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
8 changes: 4 additions & 4 deletions Matcher/RegexMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
8 changes: 4 additions & 4 deletions Matcher/SubStringMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Highlighter
*1
* Copyright (C) 2015, Some right reserved.
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <[email protected]>
* @author Kacper "Kadet" Donat <[email protected]>
*
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* Xmpp: [email protected]
* E-mail: [email protected]
*
* From Kadet with love.
*/
Expand Down
Loading

0 comments on commit c1e7a3b

Please sign in to comment.