Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function build(LexerInterface $lexer, array $params): ?array |
||
25 | { |
||
26 | $start = $lexer->getToken(); |
||
27 | |||
28 | $description = $this->buildAST(ASTKindEnum::DESCRIPTION, $lexer); |
||
29 | |||
30 | $this->expectKeyword($lexer, KeywordEnum::UNION); |
||
31 | |||
32 | return [ |
||
33 | 'kind' => NodeKindEnum::UNION_TYPE_DEFINITION, |
||
34 | 'description' => $description, |
||
35 | 'name' => $this->buildAST(ASTKindEnum::NAME, $lexer), |
||
36 | 'directives' => $this->buildAST(ASTKindEnum::DIRECTIVES, $lexer), |
||
37 | 'types' => $this->buildAST(ASTKindEnum::UNION_MEMBER_TYPES, $lexer), |
||
38 | 'loc' => $this->buildLocation($lexer, $start), |
||
39 | ]; |
||
42 |