@@ -9,6 +9,10 @@ |
||
9 | 9 | public function drawFile( $_template ) { |
10 | 10 | return $this->draw($_template); |
11 | 11 | } |
12 | + |
|
13 | + /** |
|
14 | + * @param string $_template |
|
15 | + */ |
|
12 | 16 | public function drawText( $_template ) { |
13 | 17 | return $this->draw(trim($_template)); |
14 | 18 | } |
@@ -6,13 +6,13 @@ |
||
6 | 6 | public function __construct() { |
7 | 7 | parent::__construct(); |
8 | 8 | } |
9 | - public function drawFile( $_template ) { |
|
9 | + public function drawFile($_template) { |
|
10 | 10 | return $this->draw($_template); |
11 | 11 | } |
12 | - public function drawText( $_template ) { |
|
12 | + public function drawText($_template) { |
|
13 | 13 | return $this->draw(trim($_template)); |
14 | 14 | } |
15 | - public function draw( $_template ) { |
|
15 | + public function draw($_template) { |
|
16 | 16 | $Parsedown = new Parsedown\Parsedown(); |
17 | 17 | $page = $Parsedown->text($_template); |
18 | 18 | return $page; |
@@ -4,14 +4,14 @@ |
||
4 | 4 | |
5 | 5 | //JATE SUFF |
6 | 6 | require_once (end($GLOBALS["JATEPath"])."jate/functions/requirer.php"); |
7 | - requireComponent ("functions/folder.php"); |
|
8 | - requireComponent ("modules/JConfig/JConfig.php"); |
|
9 | - requireComponents ("functions"); |
|
10 | - requireModules ("modules"); |
|
7 | + requireComponent("functions/folder.php"); |
|
8 | + requireComponent("modules/JConfig/JConfig.php"); |
|
9 | + requireComponents("functions"); |
|
10 | + requireModules("modules"); |
|
11 | 11 | |
12 | 12 | //USER STUFF |
13 | - requireComponent ("config.php",false); |
|
14 | - requireModules ("modules",false); |
|
15 | - requireComponents ("bundles/models",false); |
|
16 | - requireComponents ("bundles/controllers",false); |
|
13 | + requireComponent("config.php", false); |
|
14 | + requireModules("modules", false); |
|
15 | + requireComponents("bundles/models", false); |
|
16 | + requireComponents("bundles/controllers", false); |
|
17 | 17 | ?> |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | // autoload.php @generated by Composer |
4 | 4 | |
5 | -require_once __DIR__ . '/composer' . '/autoload_real.php'; |
|
5 | +require_once __DIR__.'/composer'.'/autoload_real.php'; |
|
6 | 6 | |
7 | 7 | return ComposerAutoloaderInitb1e7ddc74da87434be0b5632a8bb4210::getLoader(); |
@@ -9,8 +9,8 @@ |
||
9 | 9 | */ |
10 | 10 | class Pug extends Jade |
11 | 11 | { |
12 | - /** |
|
13 | - * @var string |
|
14 | - */ |
|
15 | - protected $streamName = 'pug'; |
|
12 | + /** |
|
13 | + * @var string |
|
14 | + */ |
|
15 | + protected $streamName = 'pug'; |
|
16 | 16 | } |
@@ -9,183 +9,183 @@ |
||
9 | 9 | */ |
10 | 10 | class Lexer extends Scanner |
11 | 11 | { |
12 | - /** |
|
13 | - * @var int |
|
14 | - */ |
|
15 | - public $lineno = 1; |
|
16 | - |
|
17 | - /** |
|
18 | - * @var bool |
|
19 | - */ |
|
20 | - public $pipeless; |
|
21 | - |
|
22 | - /** |
|
23 | - * @var bool |
|
24 | - */ |
|
25 | - public $allowMixedIndent; |
|
26 | - |
|
27 | - /** |
|
28 | - * @var int |
|
29 | - */ |
|
30 | - public $lastTagIndent = -2; |
|
31 | - |
|
32 | - /** |
|
33 | - * @var array |
|
34 | - */ |
|
35 | - protected $customKeywords = array(); |
|
36 | - |
|
37 | - /** |
|
38 | - * @param $input |
|
39 | - */ |
|
40 | - public function __construct($input, array $options = array()) |
|
41 | - { |
|
42 | - $this->allowMixedIndent = isset($options['allowMixedIndent']) && $options['allowMixedIndent']; |
|
43 | - $this->customKeywords = isset($options['customKeywords']) ? $options['customKeywords'] : array(); |
|
44 | - $this->setInput($input); |
|
45 | - } |
|
46 | - |
|
47 | - /** |
|
48 | - * Construct token with specified parameters. |
|
49 | - * |
|
50 | - * @param string $type token type |
|
51 | - * @param string $value token value |
|
52 | - * |
|
53 | - * @return object new token object |
|
54 | - */ |
|
55 | - public function token($type, $value = null) |
|
56 | - { |
|
57 | - return (object) array( |
|
58 | - 'type' => $type, |
|
59 | - 'line' => $this->lineno, |
|
60 | - 'value' => $value, |
|
61 | - ); |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * Consume input. |
|
66 | - * |
|
67 | - * @param string $bytes utf8 string of input to consume |
|
68 | - */ |
|
69 | - protected function consume($bytes) |
|
70 | - { |
|
71 | - $this->input = substr($this->input, strlen($bytes)); |
|
72 | - } |
|
73 | - |
|
74 | - /** |
|
75 | - * Defer token. |
|
76 | - * |
|
77 | - * @param \stdClass $token token to defer |
|
78 | - */ |
|
79 | - public function defer(\stdClass $token) |
|
80 | - { |
|
81 | - $this->deferred[] = $token; |
|
82 | - } |
|
83 | - |
|
84 | - /** |
|
85 | - * Lookahead token 'n'. |
|
86 | - * |
|
87 | - * @param int $number number of tokens to predict |
|
88 | - * |
|
89 | - * @return object predicted token |
|
90 | - */ |
|
91 | - public function lookahead($number = 1) |
|
92 | - { |
|
93 | - $fetch = $number - count($this->stash); |
|
94 | - |
|
95 | - while ($fetch-- > 0) { |
|
96 | - $this->stash[] = $this->next(); |
|
97 | - } |
|
98 | - |
|
99 | - return $this->stash[--$number]; |
|
100 | - } |
|
101 | - |
|
102 | - /** |
|
103 | - * Return stashed token. |
|
104 | - * |
|
105 | - * @return object|bool token if has stashed, false otherways |
|
106 | - */ |
|
107 | - protected function getStashed() |
|
108 | - { |
|
109 | - return count($this->stash) ? array_shift($this->stash) : null; |
|
110 | - } |
|
111 | - |
|
112 | - /** |
|
113 | - * Return deferred token. |
|
114 | - * |
|
115 | - * @return object|bool token if has deferred, false otherways |
|
116 | - */ |
|
117 | - protected function deferred() |
|
118 | - { |
|
119 | - return count($this->deferred) ? array_shift($this->deferred) : null; |
|
120 | - } |
|
121 | - |
|
122 | - /** |
|
123 | - * Return next token or previously stashed one. |
|
124 | - * |
|
125 | - * @return object |
|
126 | - */ |
|
127 | - public function advance() |
|
128 | - { |
|
129 | - $token = $this->getStashed() |
|
130 | - or $token = $this->next(); |
|
131 | - |
|
132 | - return $token; |
|
133 | - } |
|
134 | - |
|
135 | - /** |
|
136 | - * Return next token. |
|
137 | - * |
|
138 | - * @return object |
|
139 | - */ |
|
140 | - protected function next() |
|
141 | - { |
|
142 | - return $this->nextToken(); |
|
143 | - } |
|
144 | - |
|
145 | - /** |
|
146 | - * @return bool|mixed|null|object|void |
|
147 | - */ |
|
148 | - public function nextToken() |
|
149 | - { |
|
150 | - if ($token = $this->deferred()) { |
|
151 | - return $token; |
|
152 | - } |
|
153 | - foreach (array( |
|
154 | - 'Blank', |
|
155 | - 'EOS', |
|
156 | - 'PipelessText', |
|
157 | - 'Yield', |
|
158 | - 'Doctype', |
|
159 | - 'Interpolation', |
|
160 | - 'Case', |
|
161 | - 'When', |
|
162 | - 'Default', |
|
163 | - 'Extends', |
|
164 | - 'Append', |
|
165 | - 'Prepend', |
|
166 | - 'Block', |
|
167 | - 'Include', |
|
168 | - 'Mixin', |
|
169 | - 'Call', |
|
170 | - 'Conditional', |
|
171 | - 'Each', |
|
172 | - 'Assignment', |
|
173 | - 'CustomKeyword', |
|
174 | - 'Tag', |
|
175 | - 'Filter', |
|
176 | - 'Code', |
|
177 | - 'Id', |
|
178 | - 'ClassName', |
|
179 | - 'Attributes', |
|
180 | - 'Indent', |
|
181 | - 'Comment', |
|
182 | - 'Colon', |
|
183 | - 'AndAttributes', |
|
184 | - 'Text', |
|
185 | - ) as $tokenType) { |
|
186 | - if ($token = $this->{'scan' . $tokenType}()) { |
|
187 | - return $token; |
|
188 | - } |
|
189 | - } |
|
190 | - } |
|
12 | + /** |
|
13 | + * @var int |
|
14 | + */ |
|
15 | + public $lineno = 1; |
|
16 | + |
|
17 | + /** |
|
18 | + * @var bool |
|
19 | + */ |
|
20 | + public $pipeless; |
|
21 | + |
|
22 | + /** |
|
23 | + * @var bool |
|
24 | + */ |
|
25 | + public $allowMixedIndent; |
|
26 | + |
|
27 | + /** |
|
28 | + * @var int |
|
29 | + */ |
|
30 | + public $lastTagIndent = -2; |
|
31 | + |
|
32 | + /** |
|
33 | + * @var array |
|
34 | + */ |
|
35 | + protected $customKeywords = array(); |
|
36 | + |
|
37 | + /** |
|
38 | + * @param $input |
|
39 | + */ |
|
40 | + public function __construct($input, array $options = array()) |
|
41 | + { |
|
42 | + $this->allowMixedIndent = isset($options['allowMixedIndent']) && $options['allowMixedIndent']; |
|
43 | + $this->customKeywords = isset($options['customKeywords']) ? $options['customKeywords'] : array(); |
|
44 | + $this->setInput($input); |
|
45 | + } |
|
46 | + |
|
47 | + /** |
|
48 | + * Construct token with specified parameters. |
|
49 | + * |
|
50 | + * @param string $type token type |
|
51 | + * @param string $value token value |
|
52 | + * |
|
53 | + * @return object new token object |
|
54 | + */ |
|
55 | + public function token($type, $value = null) |
|
56 | + { |
|
57 | + return (object) array( |
|
58 | + 'type' => $type, |
|
59 | + 'line' => $this->lineno, |
|
60 | + 'value' => $value, |
|
61 | + ); |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * Consume input. |
|
66 | + * |
|
67 | + * @param string $bytes utf8 string of input to consume |
|
68 | + */ |
|
69 | + protected function consume($bytes) |
|
70 | + { |
|
71 | + $this->input = substr($this->input, strlen($bytes)); |
|
72 | + } |
|
73 | + |
|
74 | + /** |
|
75 | + * Defer token. |
|
76 | + * |
|
77 | + * @param \stdClass $token token to defer |
|
78 | + */ |
|
79 | + public function defer(\stdClass $token) |
|
80 | + { |
|
81 | + $this->deferred[] = $token; |
|
82 | + } |
|
83 | + |
|
84 | + /** |
|
85 | + * Lookahead token 'n'. |
|
86 | + * |
|
87 | + * @param int $number number of tokens to predict |
|
88 | + * |
|
89 | + * @return object predicted token |
|
90 | + */ |
|
91 | + public function lookahead($number = 1) |
|
92 | + { |
|
93 | + $fetch = $number - count($this->stash); |
|
94 | + |
|
95 | + while ($fetch-- > 0) { |
|
96 | + $this->stash[] = $this->next(); |
|
97 | + } |
|
98 | + |
|
99 | + return $this->stash[--$number]; |
|
100 | + } |
|
101 | + |
|
102 | + /** |
|
103 | + * Return stashed token. |
|
104 | + * |
|
105 | + * @return object|bool token if has stashed, false otherways |
|
106 | + */ |
|
107 | + protected function getStashed() |
|
108 | + { |
|
109 | + return count($this->stash) ? array_shift($this->stash) : null; |
|
110 | + } |
|
111 | + |
|
112 | + /** |
|
113 | + * Return deferred token. |
|
114 | + * |
|
115 | + * @return object|bool token if has deferred, false otherways |
|
116 | + */ |
|
117 | + protected function deferred() |
|
118 | + { |
|
119 | + return count($this->deferred) ? array_shift($this->deferred) : null; |
|
120 | + } |
|
121 | + |
|
122 | + /** |
|
123 | + * Return next token or previously stashed one. |
|
124 | + * |
|
125 | + * @return object |
|
126 | + */ |
|
127 | + public function advance() |
|
128 | + { |
|
129 | + $token = $this->getStashed() |
|
130 | + or $token = $this->next(); |
|
131 | + |
|
132 | + return $token; |
|
133 | + } |
|
134 | + |
|
135 | + /** |
|
136 | + * Return next token. |
|
137 | + * |
|
138 | + * @return object |
|
139 | + */ |
|
140 | + protected function next() |
|
141 | + { |
|
142 | + return $this->nextToken(); |
|
143 | + } |
|
144 | + |
|
145 | + /** |
|
146 | + * @return bool|mixed|null|object|void |
|
147 | + */ |
|
148 | + public function nextToken() |
|
149 | + { |
|
150 | + if ($token = $this->deferred()) { |
|
151 | + return $token; |
|
152 | + } |
|
153 | + foreach (array( |
|
154 | + 'Blank', |
|
155 | + 'EOS', |
|
156 | + 'PipelessText', |
|
157 | + 'Yield', |
|
158 | + 'Doctype', |
|
159 | + 'Interpolation', |
|
160 | + 'Case', |
|
161 | + 'When', |
|
162 | + 'Default', |
|
163 | + 'Extends', |
|
164 | + 'Append', |
|
165 | + 'Prepend', |
|
166 | + 'Block', |
|
167 | + 'Include', |
|
168 | + 'Mixin', |
|
169 | + 'Call', |
|
170 | + 'Conditional', |
|
171 | + 'Each', |
|
172 | + 'Assignment', |
|
173 | + 'CustomKeyword', |
|
174 | + 'Tag', |
|
175 | + 'Filter', |
|
176 | + 'Code', |
|
177 | + 'Id', |
|
178 | + 'ClassName', |
|
179 | + 'Attributes', |
|
180 | + 'Indent', |
|
181 | + 'Comment', |
|
182 | + 'Colon', |
|
183 | + 'AndAttributes', |
|
184 | + 'Text', |
|
185 | + ) as $tokenType) { |
|
186 | + if ($token = $this->{'scan' . $tokenType}()) { |
|
187 | + return $token; |
|
188 | + } |
|
189 | + } |
|
190 | + } |
|
191 | 191 | } |
@@ -183,7 +183,7 @@ |
||
183 | 183 | 'AndAttributes', |
184 | 184 | 'Text', |
185 | 185 | ) as $tokenType) { |
186 | - if ($token = $this->{'scan' . $tokenType}()) { |
|
186 | + if ($token = $this->{'scan'.$tokenType}()) { |
|
187 | 187 | return $token; |
188 | 188 | } |
189 | 189 | } |
@@ -4,48 +4,48 @@ |
||
4 | 4 | |
5 | 5 | class ExtensionsHelper |
6 | 6 | { |
7 | - protected $extensions; |
|
8 | - |
|
9 | - public function __construct($extensions) |
|
10 | - { |
|
11 | - $this->extensions = is_string($extensions) |
|
12 | - ? array($extensions) |
|
13 | - : array_unique($extensions); |
|
14 | - } |
|
15 | - |
|
16 | - public function getExtensions() |
|
17 | - { |
|
18 | - return $this->extensions; |
|
19 | - } |
|
20 | - |
|
21 | - public function getFirst($defaultValue = '') |
|
22 | - { |
|
23 | - return isset($this->extensions[0]) |
|
24 | - ? $this->extensions[0] |
|
25 | - : $defaultValue; |
|
26 | - } |
|
27 | - |
|
28 | - public function hasValidTemplateExtension($path) |
|
29 | - { |
|
30 | - foreach ($this->getExtensions() as $extension) { |
|
31 | - if (substr($path, -strlen($extension)) === $extension) { |
|
32 | - return true; |
|
33 | - } |
|
34 | - } |
|
35 | - |
|
36 | - return false; |
|
37 | - } |
|
38 | - |
|
39 | - public function findValidTemplatePath($path) |
|
40 | - { |
|
41 | - $extensions = $this->getExtensions(); |
|
42 | - foreach (array_slice(func_get_args(), 1) as $extension) { |
|
43 | - $extensions[] = $extension; |
|
44 | - } |
|
45 | - foreach ($extensions as $extension) { |
|
46 | - if (file_exists($path . $extension)) { |
|
47 | - return realpath($path . $extension); |
|
48 | - } |
|
49 | - } |
|
50 | - } |
|
7 | + protected $extensions; |
|
8 | + |
|
9 | + public function __construct($extensions) |
|
10 | + { |
|
11 | + $this->extensions = is_string($extensions) |
|
12 | + ? array($extensions) |
|
13 | + : array_unique($extensions); |
|
14 | + } |
|
15 | + |
|
16 | + public function getExtensions() |
|
17 | + { |
|
18 | + return $this->extensions; |
|
19 | + } |
|
20 | + |
|
21 | + public function getFirst($defaultValue = '') |
|
22 | + { |
|
23 | + return isset($this->extensions[0]) |
|
24 | + ? $this->extensions[0] |
|
25 | + : $defaultValue; |
|
26 | + } |
|
27 | + |
|
28 | + public function hasValidTemplateExtension($path) |
|
29 | + { |
|
30 | + foreach ($this->getExtensions() as $extension) { |
|
31 | + if (substr($path, -strlen($extension)) === $extension) { |
|
32 | + return true; |
|
33 | + } |
|
34 | + } |
|
35 | + |
|
36 | + return false; |
|
37 | + } |
|
38 | + |
|
39 | + public function findValidTemplatePath($path) |
|
40 | + { |
|
41 | + $extensions = $this->getExtensions(); |
|
42 | + foreach (array_slice(func_get_args(), 1) as $extension) { |
|
43 | + $extensions[] = $extension; |
|
44 | + } |
|
45 | + foreach ($extensions as $extension) { |
|
46 | + if (file_exists($path . $extension)) { |
|
47 | + return realpath($path . $extension); |
|
48 | + } |
|
49 | + } |
|
50 | + } |
|
51 | 51 | } |
@@ -43,8 +43,8 @@ |
||
43 | 43 | $extensions[] = $extension; |
44 | 44 | } |
45 | 45 | foreach ($extensions as $extension) { |
46 | - if (file_exists($path . $extension)) { |
|
47 | - return realpath($path . $extension); |
|
46 | + if (file_exists($path.$extension)) { |
|
47 | + return realpath($path.$extension); |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | } |
@@ -9,27 +9,27 @@ |
||
9 | 9 | */ |
10 | 10 | abstract class Extensions |
11 | 11 | { |
12 | - /** |
|
13 | - * Get main template file extension. |
|
14 | - * |
|
15 | - * @return string |
|
16 | - */ |
|
17 | - public function getExtension() |
|
18 | - { |
|
19 | - $extensions = new ExtensionsHelper($this->getOption('extension')); |
|
12 | + /** |
|
13 | + * Get main template file extension. |
|
14 | + * |
|
15 | + * @return string |
|
16 | + */ |
|
17 | + public function getExtension() |
|
18 | + { |
|
19 | + $extensions = new ExtensionsHelper($this->getOption('extension')); |
|
20 | 20 | |
21 | - return $extensions->getFirst(); |
|
22 | - } |
|
21 | + return $extensions->getFirst(); |
|
22 | + } |
|
23 | 23 | |
24 | - /** |
|
25 | - * Get list of supported extensions. |
|
26 | - * |
|
27 | - * @return array |
|
28 | - */ |
|
29 | - public function getExtensions() |
|
30 | - { |
|
31 | - $extensions = new ExtensionsHelper($this->getOption('extension')); |
|
24 | + /** |
|
25 | + * Get list of supported extensions. |
|
26 | + * |
|
27 | + * @return array |
|
28 | + */ |
|
29 | + public function getExtensions() |
|
30 | + { |
|
31 | + $extensions = new ExtensionsHelper($this->getOption('extension')); |
|
32 | 32 | |
33 | - return $extensions->getExtensions(); |
|
34 | - } |
|
33 | + return $extensions->getExtensions(); |
|
34 | + } |
|
35 | 35 | } |
@@ -9,46 +9,46 @@ |
||
9 | 9 | */ |
10 | 10 | abstract class Filters extends Extensions |
11 | 11 | { |
12 | - /** |
|
13 | - * Register / override new filter. |
|
14 | - * |
|
15 | - * @param string name |
|
16 | - * @param callable filter |
|
17 | - * |
|
18 | - * @return $this |
|
19 | - */ |
|
20 | - public function filter($name, $filter) |
|
21 | - { |
|
22 | - $this->filters[$name] = $filter; |
|
23 | - |
|
24 | - return $this; |
|
25 | - } |
|
26 | - |
|
27 | - /** |
|
28 | - * Check if a filter is registered. |
|
29 | - * |
|
30 | - * @param string name |
|
31 | - * |
|
32 | - * @return bool |
|
33 | - */ |
|
34 | - public function hasFilter($name) |
|
35 | - { |
|
36 | - $helper = new FilterHelper($this->filters, $this->options['filterAutoLoad']); |
|
37 | - |
|
38 | - return $helper->hasFilter($name); |
|
39 | - } |
|
40 | - |
|
41 | - /** |
|
42 | - * Get a registered filter by name. |
|
43 | - * |
|
44 | - * @param string name |
|
45 | - * |
|
46 | - * @return callable |
|
47 | - */ |
|
48 | - public function getFilter($name) |
|
49 | - { |
|
50 | - $helper = new FilterHelper($this->filters, $this->options['filterAutoLoad']); |
|
51 | - |
|
52 | - return $helper->getFilter($name); |
|
53 | - } |
|
12 | + /** |
|
13 | + * Register / override new filter. |
|
14 | + * |
|
15 | + * @param string name |
|
16 | + * @param callable filter |
|
17 | + * |
|
18 | + * @return $this |
|
19 | + */ |
|
20 | + public function filter($name, $filter) |
|
21 | + { |
|
22 | + $this->filters[$name] = $filter; |
|
23 | + |
|
24 | + return $this; |
|
25 | + } |
|
26 | + |
|
27 | + /** |
|
28 | + * Check if a filter is registered. |
|
29 | + * |
|
30 | + * @param string name |
|
31 | + * |
|
32 | + * @return bool |
|
33 | + */ |
|
34 | + public function hasFilter($name) |
|
35 | + { |
|
36 | + $helper = new FilterHelper($this->filters, $this->options['filterAutoLoad']); |
|
37 | + |
|
38 | + return $helper->hasFilter($name); |
|
39 | + } |
|
40 | + |
|
41 | + /** |
|
42 | + * Get a registered filter by name. |
|
43 | + * |
|
44 | + * @param string name |
|
45 | + * |
|
46 | + * @return callable |
|
47 | + */ |
|
48 | + public function getFilter($name) |
|
49 | + { |
|
50 | + $helper = new FilterHelper($this->filters, $this->options['filterAutoLoad']); |
|
51 | + |
|
52 | + return $helper->getFilter($name); |
|
53 | + } |
|
54 | 54 | } |
@@ -7,36 +7,36 @@ |
||
7 | 7 | */ |
8 | 8 | abstract class MixinScanner extends CaseScanner |
9 | 9 | { |
10 | - /** |
|
11 | - * @return object |
|
12 | - */ |
|
13 | - protected function scanCall() |
|
14 | - { |
|
15 | - if (preg_match('/^\+(\w[-\w]*)/', $this->input, $matches)) { |
|
16 | - $this->consume($matches[0]); |
|
17 | - $token = $this->token('call', $matches[1]); |
|
10 | + /** |
|
11 | + * @return object |
|
12 | + */ |
|
13 | + protected function scanCall() |
|
14 | + { |
|
15 | + if (preg_match('/^\+(\w[-\w]*)/', $this->input, $matches)) { |
|
16 | + $this->consume($matches[0]); |
|
17 | + $token = $this->token('call', $matches[1]); |
|
18 | 18 | |
19 | - // check for arguments |
|
20 | - if (preg_match('/^ *\((.*?)\)/', $this->input, $matchesArguments)) { |
|
21 | - $this->consume($matchesArguments[0]); |
|
22 | - $token->arguments = $matchesArguments[1]; |
|
23 | - } |
|
19 | + // check for arguments |
|
20 | + if (preg_match('/^ *\((.*?)\)/', $this->input, $matchesArguments)) { |
|
21 | + $this->consume($matchesArguments[0]); |
|
22 | + $token->arguments = $matchesArguments[1]; |
|
23 | + } |
|
24 | 24 | |
25 | - return $token; |
|
26 | - } |
|
27 | - } |
|
25 | + return $token; |
|
26 | + } |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * @return object |
|
31 | - */ |
|
32 | - protected function scanMixin() |
|
33 | - { |
|
34 | - if (preg_match('/^mixin +(\w[-\w]*)(?: *\((.*)\))?/', $this->input, $matches)) { |
|
35 | - $this->consume($matches[0]); |
|
36 | - $token = $this->token('mixin', $matches[1]); |
|
37 | - $token->arguments = isset($matches[2]) ? $matches[2] : null; |
|
29 | + /** |
|
30 | + * @return object |
|
31 | + */ |
|
32 | + protected function scanMixin() |
|
33 | + { |
|
34 | + if (preg_match('/^mixin +(\w[-\w]*)(?: *\((.*)\))?/', $this->input, $matches)) { |
|
35 | + $this->consume($matches[0]); |
|
36 | + $token = $this->token('mixin', $matches[1]); |
|
37 | + $token->arguments = isset($matches[2]) ? $matches[2] : null; |
|
38 | 38 | |
39 | - return $token; |
|
40 | - } |
|
41 | - } |
|
39 | + return $token; |
|
40 | + } |
|
41 | + } |
|
42 | 42 | } |