Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
10 / 10 |
Syntax | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
10 / 10 |
new | |
100.00% |
1 / 1 |
1 | |
100.00% |
10 / 10 |
|||
__construct | n/a |
0 / 0 |
1 | n/a |
0 / 0 |
1 | <?php declare(strict_types=1); |
2 | |
3 | namespace Aviat\Kilo; |
4 | |
5 | class Syntax { |
6 | public const HIGHLIGHT_NUMBERS = (1 << 0); |
7 | public const HIGHLIGHT_STRINGS = (1 << 1); |
8 | |
9 | public string $filetype = ''; |
10 | public array $filematch = []; |
11 | |
12 | public string $singleLineCommentStart = '//'; |
13 | public string $multiLineCommentStart = '/*'; |
14 | public string $multiLineCommentEnd = '*/'; |
15 | |
16 | public array $keywords1 = []; |
17 | public array $keywords2 = []; |
18 | |
19 | // Tokens for PHP files |
20 | public array $tokens = []; |
21 | |
22 | public int $flags = 0; |
23 | |
24 | public static function new(string $name, array $extList, array $keywords1, array $keywords2, string $slcs, string $mcs, string $mce, int $flags): self |
25 | { |
26 | $self = new self(); |
27 | |
28 | $self->filetype = $name; |
29 | $self->filematch = $extList; |
30 | |
31 | $self->keywords1 = $keywords1; |
32 | $self->keywords2 = $keywords2; |
33 | |
34 | $self->singleLineCommentStart = $slcs; |
35 | $self->multiLineCommentStart = $mcs; |
36 | $self->multiLineCommentEnd = $mce; |
37 | |
38 | $self->flags = $flags; |
39 | |
40 | return $self; |
41 | } |
42 | |
43 | private function __construct() {} |
44 | } |