@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
55 | - * @param RuleInterface|NodeInterface $rule |
|
55 | + * @param null|NodeInterface $rule |
|
56 | 56 | * @return \Generator |
57 | 57 | */ |
58 | 58 | private function analyze(RuleInterface $rule): \Generator |
@@ -18,7 +18,7 @@ |
||
18 | 18 | trait ArgumentsProvider |
19 | 19 | { |
20 | 20 | /** |
21 | - * @return iterable|ArgumentDefinitionNode[] |
|
21 | + * @return \Generator |
|
22 | 22 | */ |
23 | 23 | public function getArgumentNodes(): iterable |
24 | 24 | { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | trait DirectivesProvider |
18 | 18 | { |
19 | 19 | /** |
20 | - * @return iterable|DirectiveInvocationNode[] |
|
20 | + * @return \Generator |
|
21 | 21 | */ |
22 | 22 | public function getDirectiveNodes(): iterable |
23 | 23 | { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | trait FieldsProvider |
19 | 19 | { |
20 | 20 | /** |
21 | - * @return iterable|FieldDefinitionNode[] |
|
21 | + * @return \Generator |
|
22 | 22 | */ |
23 | 23 | public function getFieldNodes(): iterable |
24 | 24 | { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | trait InterfacesProvider |
19 | 19 | { |
20 | 20 | /** |
21 | - * @return iterable|TypeNameNode[] |
|
21 | + * @return \Generator |
|
22 | 22 | */ |
23 | 23 | public function getInterfaceNodes(): iterable |
24 | 24 | { |
@@ -32,8 +32,8 @@ |
||
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @param Readable $file |
35 | - * @param RuleInterface|ProvidesType|ProvidesName $ast |
|
36 | - * @return \Generator|mixed |
|
35 | + * @param RuleInterface $ast |
|
36 | + * @return \Generator |
|
37 | 37 | */ |
38 | 38 | public function apply(Readable $file, RuleInterface $ast) |
39 | 39 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param Context $context |
37 | - * @return iterable |
|
37 | + * @return \Generator |
|
38 | 38 | */ |
39 | 39 | public function getOpcodes(Context $context): iterable |
40 | 40 | { |
@@ -14,7 +14,6 @@ |
||
14 | 14 | use Railt\Io\Readable; |
15 | 15 | use Railt\Parser\Ast\NodeInterface; |
16 | 16 | use Railt\Parser\Ast\RuleInterface; |
17 | -use Railt\Parser\Exception\UnexpectedTokenException; |
|
18 | 17 | use Railt\Parser\Exception\UnrecognizedTokenException; |
19 | 18 | use Railt\SDL\Exception\SyntaxException; |
20 | 19 | use Railt\SDL\Frontend\AST\ProvidesOpcode; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | /** |
54 | 54 | * @param Readable $file |
55 | - * @return iterable|OpcodeInterface[] |
|
55 | + * @return \Generator |
|
56 | 56 | * @throws SyntaxException |
57 | 57 | */ |
58 | 58 | public function load(Readable $file): iterable |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | /** |
81 | 81 | * @param Readable $file |
82 | 82 | * @param Context $context |
83 | - * @return iterable|OpcodeInterface[] |
|
83 | + * @return OpcodeHeap |
|
84 | 84 | * @throws SyntaxException |
85 | 85 | */ |
86 | 86 | private function collect(Readable $file, Context $context): iterable |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * @param NodeInterface $node |
105 | 105 | * @param Context $context |
106 | - * @return iterable|Opcode[]|\Generator |
|
106 | + * @return \Generator |
|
107 | 107 | */ |
108 | 108 | private function bypass(NodeInterface $node, Context $context): \Generator |
109 | 109 | { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | /** |
128 | 128 | * @param ProvidesOpcode $provider |
129 | 129 | * @param Context $context |
130 | - * @return \Generator|OpcodeInterface[] |
|
130 | + * @return \Generator |
|
131 | 131 | */ |
132 | 132 | private function extract(ProvidesOpcode $provider, Context $context): \Generator |
133 | 133 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param Context $context |
37 | - * @return iterable |
|
37 | + * @return \Generator |
|
38 | 38 | */ |
39 | 39 | public function getOpcodes(Context $context): iterable |
40 | 40 | { |