2019-10-24 16:58:52 -04:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Kilo;
|
|
|
|
|
|
|
|
class Syntax {
|
|
|
|
public const HIGHLIGHT_NUMBERS = (1 << 0);
|
2019-10-25 11:49:04 -04:00
|
|
|
public const HIGHLIGHT_STRINGS = (1 << 1);
|
2019-10-24 16:58:52 -04:00
|
|
|
|
|
|
|
public string $filetype = '';
|
|
|
|
public array $filematch = [];
|
2019-10-25 12:08:21 -04:00
|
|
|
public string $singleLineCommentStart = '//';
|
|
|
|
|
2019-10-24 16:58:52 -04:00
|
|
|
public int $flags = 0;
|
|
|
|
|
2019-10-25 12:08:21 -04:00
|
|
|
public static function new(string $name, array $extList, string $slcs, int $flags): self
|
2019-10-24 16:58:52 -04:00
|
|
|
{
|
|
|
|
$self = new self();
|
|
|
|
|
|
|
|
$self->filetype = $name;
|
|
|
|
$self->filematch = $extList;
|
2019-10-25 12:08:21 -04:00
|
|
|
|
|
|
|
$self->singleLineCommentStart = '//';
|
|
|
|
|
2019-10-24 16:58:52 -04:00
|
|
|
$self->flags = $flags;
|
|
|
|
|
|
|
|
return $self;
|
|
|
|
}
|
|
|
|
|
|
|
|
private function __construct() {}
|
|
|
|
}
|