1 | <?php |
||
37 | class Splitter |
||
38 | { |
||
39 | public const MAX_NAMESPACE_LENGTH = 10; |
||
40 | |||
41 | public const BYTE_NULL = 0; // Zero-byte for terminating documents |
||
42 | public const BYTE_INLINE = 123; // The "{" character indicating an inline expression started |
||
43 | public const BYTE_INLINE_END = 125; // The "}" character indicating an inline expression ended |
||
44 | public const BYTE_PIPE = 124; // The "|" character indicating an inline expression pass operation |
||
45 | public const BYTE_MINUS = 45; // The "-" character (for legacy pass operations) |
||
46 | public const BYTE_TAG = 60; // The "<" character indicating a tag has started |
||
47 | public const BYTE_TAG_END = 62; // The ">" character indicating a tag has ended |
||
48 | public const BYTE_TAG_CLOSE = 47; // The "/" character indicating a tag is a closing tag |
||
49 | public const BYTE_QUOTE_DOUBLE = 34; // The " (standard double-quote) character |
||
50 | public const BYTE_QUOTE_SINGLE = 39; // The ' (standard single-quote) character |
||
51 | public const BYTE_WHITESPACE_SPACE = 32; // A standard space character |
||
52 | public const BYTE_WHITESPACE_TAB = 9; // A standard carriage-return character |
||
53 | public const BYTE_WHITESPACE_RETURN = 13; // A standard tab character |
||
54 | public const BYTE_WHITESPACE_EOL = 10; // A standard (UNIX) line-break character |
||
55 | public const BYTE_SEPARATOR_EQUALS = 61; // The "=" character |
||
56 | public const BYTE_SEPARATOR_COLON = 58; // The ":" character |
||
57 | public const BYTE_SEPARATOR_COMMA = 44; // The "," character |
||
58 | public const BYTE_SEPARATOR_PIPE = 124; // The "|" character |
||
59 | public const BYTE_PARENTHESIS_START = 40; // The "(" character |
||
60 | public const BYTE_PARENTHESIS_END = 41; // The ")" character |
||
61 | public const BYTE_ARRAY_START = 91; // The "[" character |
||
62 | public const BYTE_ARRAY_END = 93; // The "]" character |
||
63 | public const BYTE_SLASH = 47; // The "/" character |
||
64 | public const BYTE_BACKSLASH = 92; // The "\" character |
||
65 | public const BYTE_BACKTICK = 96; // The "`" character |
||
66 | public const MAP_SHIFT = 64; |
||
67 | public const MASK_LINEBREAKS = 0 | (1 << self::BYTE_WHITESPACE_EOL) | (1 << self::BYTE_WHITESPACE_RETURN); |
||
68 | public const MASK_WHITESPACE = 0 | self::MASK_LINEBREAKS | (1 << self::BYTE_WHITESPACE_SPACE) | (1 << self::BYTE_WHITESPACE_TAB); |
||
69 | |||
70 | /** @var Source */ |
||
71 | public $source; |
||
72 | |||
73 | /** @var Context */ |
||
74 | public $context; |
||
75 | |||
76 | public $index = 0; |
||
77 | private $primaryMask = 0; |
||
78 | private $secondaryMask = 0; |
||
79 | |||
80 | public function __construct(Source $source, Contexts $contexts) |
||
85 | |||
86 | /** |
||
87 | * Split a string by searching for recognized characters using at least one, |
||
88 | * optionally two bit masks consisting of OR'ed bit values of each detectable |
||
89 | * character (byte). The secondary bit mask is costless as it is OR'ed into |
||
90 | * the primary bit mask. |
||
91 | * |
||
92 | * @return \Generator|?string[] |
||
|
|||
93 | */ |
||
94 | public function parse(): \Generator |
||
125 | |||
126 | public function switch(Context $context): Context |
||
134 | |||
135 | public function countCharactersMatchingMask(int $primaryMask, int $offset, int $length): int |
||
146 | |||
147 | public function findBytePositionBeforeOffset(int $primaryMask, int $offset): int |
||
157 | |||
158 | public function findBytePositionAfterOffset(int $primaryMask, int $offset): int |
||
168 | } |
||
169 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.