@@ -67,7 +67,7 @@ |
||
67 | 67 | |
68 | 68 | private function splitSymbolInTransitions(int $symbolId, int $symbolToAdd): void |
69 | 69 | { |
70 | - $addSymbol = function (array $symbolList) use ($symbolId, $symbolToAdd) { |
|
70 | + $addSymbol = function(array $symbolList) use ($symbolId, $symbolToAdd) { |
|
71 | 71 | if (in_array($symbolId, $symbolList)) { |
72 | 72 | $symbolList[] = $symbolToAdd; |
73 | 73 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | |
96 | 96 | private function setSortedRangeList(Range ...$rangeList): void |
97 | 97 | { |
98 | - $sortByFrom = function (Range $rangeOne, Range $rangeTwo): int { |
|
98 | + $sortByFrom = function(Range $rangeOne, Range $rangeTwo): int { |
|
99 | 99 | return $rangeOne->getStart() <=> $rangeTwo->getStart(); |
100 | 100 | }; |
101 | 101 | usort($rangeList, $sortByFrom); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | |
102 | 102 | public function replaceEachTransition(callable $callback): void |
103 | 103 | { |
104 | - $replaceCallback = function ($data, int $stateIn, int $stateOut) use ($callback) { |
|
104 | + $replaceCallback = function($data, int $stateIn, int $stateOut) use ($callback) { |
|
105 | 105 | $newData = call_user_func($callback, $data, $stateIn, $stateOut); |
106 | 106 | $this->replaceTransition($stateIn, $stateOut, $newData); |
107 | 107 | }; |
@@ -358,7 +358,7 @@ |
||
358 | 358 | |
359 | 359 | public function onFinish(): void |
360 | 360 | { |
361 | - $addTransitionToLanguage = function (RangeSet $rangeSet, int $stateIn, int $stateOut) { |
|
361 | + $addTransitionToLanguage = function(RangeSet $rangeSet, int $stateIn, int $stateOut) { |
|
362 | 362 | $this |
363 | 363 | ->getLanguageBuilder() |
364 | 364 | ->addTransition($stateIn, $stateOut, ...$rangeSet->getRanges()); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | */ |
69 | 69 | private function checkMultipleEpsilons(int $symbolId, Production ...$productionList): void |
70 | 70 | { |
71 | - $isEpsilonProduction = function (Production $production): bool { |
|
71 | + $isEpsilonProduction = function(Production $production): bool { |
|
72 | 72 | return $production->isEpsilon(); |
73 | 73 | }; |
74 | 74 | $epsilonProductionList = array_filter($productionList, $isEpsilonProduction); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | public const NT_EXPRESSION = 0x09; |
20 | 20 | public const NT_COMMAND = 0x0A; |
21 | - public const NT_LOOP = 0x0B; |
|
21 | + public const NT_LOOP = 0x0B; |
|
22 | 22 | |
23 | - public const T_EOI = 0xFF; |
|
23 | + public const T_EOI = 0xFF; |
|
24 | 24 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | abstract class SymbolType |
6 | 6 | { |
7 | - public const NT_ROOT = 0x00; // Root symbol fot LL(1) parser |
|
7 | + public const NT_ROOT = 0x00; // Root symbol fot LL(1) parser |
|
8 | 8 | |
9 | 9 | public const T_PLUS = 0x01; // + |
10 | 10 | public const T_STAR = 0x02; // * |
@@ -30,19 +30,19 @@ |
||
30 | 30 | CharBufferInterface $buffer, |
31 | 31 | TokenFactoryInterface $tokenFactory |
32 | 32 | ): TokenMatcherContextInterface { |
33 | - $onConstruct = function (): void { |
|
33 | + $onConstruct = function(): void { |
|
34 | 34 | unset($this->token); |
35 | 35 | }; |
36 | - $onSetNewToken = function (int $tokenType) use ($tokenFactory): void { |
|
36 | + $onSetNewToken = function(int $tokenType) use ($tokenFactory): void { |
|
37 | 37 | $this->token = $tokenFactory->createToken($tokenType); |
38 | 38 | }; |
39 | - $onGetToken = function (): Token { |
|
39 | + $onGetToken = function(): Token { |
|
40 | 40 | return $this->getToken(); |
41 | 41 | }; |
42 | - $onSetMode = function (string $mode): void { |
|
42 | + $onSetMode = function(string $mode): void { |
|
43 | 43 | $this->mode = $mode; |
44 | 44 | }; |
45 | - $onGetMode = function (): string { |
|
45 | + $onGetMode = function(): string { |
|
46 | 46 | return $this->mode; |
47 | 47 | }; |
48 | 48 |
@@ -104,7 +104,7 @@ |
||
104 | 104 | */ |
105 | 105 | EOF; |
106 | 106 | |
107 | - $declare = new Declare_([new DeclareDeclare('strict_types', $this->builder->val(1))]); |
|
107 | + $declare = new Declare_([new DeclareDeclare('strict_types', $this->builder->val(1))]); |
|
108 | 108 | $declare->setDocComment(new Doc($fileDocText)); |
109 | 109 | $nodes[] = $declare; |
110 | 110 |