-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from Talesoft/dev-master
Minor bugfixes, documentation
- Loading branch information
Showing
22 changed files
with
236 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
|
||
language: php | ||
|
||
git: | ||
depth: 5 | ||
|
||
php: | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- hhvm | ||
|
||
before_script: | ||
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi; | ||
|
||
install: | ||
- composer self-update | ||
- composer install | ||
- composer install --no-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Compiler.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -91,7 +91,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Compiler.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Compiler.Exception.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -35,7 +35,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Compiler.Exception.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Filter.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -53,7 +53,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Filter.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,14 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Lexer.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
||
namespace Tale\Jade; | ||
|
||
use RuntimeException; | ||
use Tale\Jade\Lexer\Exception; | ||
|
||
/** | ||
|
@@ -60,7 +61,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Lexer.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -208,14 +209,14 @@ public function __construct(array $options = null) | |
|
||
//Validate options | ||
if (!in_array($this->_options['indentStyle'], [null, self::INDENT_TAB, self::INDENT_SPACE])) | ||
throw new \Exception( | ||
throw new RuntimeException( | ||
"indentStyle needs to be null or one of the INDENT_* constants of the lexer" | ||
); | ||
|
||
if (!is_null($this->_options['indentWidth']) && | ||
(!is_int($this->_options['indentWidth']) || $this->_options['indentWidth'] < 1) | ||
) | ||
throw new \Exception( | ||
throw new RuntimeException( | ||
"indentWidth needs to be a integer above 0" | ||
); | ||
} | ||
|
@@ -875,6 +876,8 @@ protected function scanIndent() | |
$mixed = false; | ||
} else { | ||
|
||
var_dump($this->_indentStyle, $this->_indentWidth, $spaces, $tabs, $mixed); | ||
|
||
$this->throwException( | ||
"Mixed indentation style encountered. " | ||
."Dont mix tabs and spaces. Stick to one of both." | ||
|
@@ -1715,6 +1718,7 @@ protected function scanAttributes() | |
|
||
$token['escaped'] = false; | ||
$this->consume(); | ||
$char = $this->peek(); | ||
} | ||
|
||
if (!$token['name'] || $char === '=') { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Lexer.Exception.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -34,7 +34,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Lexer.Exception.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Parser.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -57,7 +57,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Parser.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -172,7 +172,7 @@ class Parser | |
public function __construct(array $options = null, Lexer $lexer = null) | ||
{ | ||
|
||
$this->defineOptions(['lexerOptions' => $options], $options); | ||
$this->defineOptions(['lexerOptions' => []], $options); | ||
|
||
$this->_lexer = $lexer ? $lexer : new Lexer($this->_options['lexerOptions']); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Parser.Exception.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -34,7 +34,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Parser.Exception.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Parser.Node.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -40,7 +40,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Parser.Node.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Renderer.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -51,7 +51,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Renderer.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -144,8 +144,8 @@ public function __construct( | |
$this->forwardOption('filterMap', 'compilerOptions'); | ||
|
||
$this->_lexer = $lexer ? $lexer : new Lexer($this->_options['lexerOptions']); | ||
$this->_parser = $parser ? $parser : new Parser($this->_options['parserOptions'], $lexer); | ||
$this->_compiler = $compiler ? $compiler : new Compiler($this->_options['compilerOptions'], $parser); | ||
$this->_parser = $parser ? $parser : new Parser($this->_options['parserOptions'], $this->_lexer); | ||
$this->_compiler = $compiler ? $compiler : new Compiler($this->_options['compilerOptions'], $this->_parser); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Renderer.Adapter.File.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -59,7 +59,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Renderer.Adapter.File.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Renderer.Adapter.Stream.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -70,7 +70,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Renderer.Adapter.Stream.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Renderer.Adapter.Stream.Wrapper.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -42,7 +42,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Renderer.Adapter.Stream.Wrapper.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/files/Renderer.AdapterBase.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
@@ -41,7 +41,7 @@ | |
* @author Talesoft <[email protected]> | ||
* @copyright Copyright (c) 2015 Talesoft (http://talesoft.io) | ||
* @license http://licenses.talesoft.io/2015/MIT.txt MIT License | ||
* @version 1.3.5 | ||
* @version 1.3.6 | ||
* @link http://jade.talesoft.io/docs/classes/Tale.Jade.Renderer.AdapterBase.html | ||
* @since File available since Release 1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.