Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function parse(Token $token): Node|JsNode |
||
18 | { |
||
19 | $parser = $this->parser; |
||
20 | $stream = $parser->getStream(); |
||
21 | |||
22 | $data = null; |
||
23 | |||
24 | // keep collecting strings until the block ends |
||
25 | while (!$stream->test(Token::BLOCK_END_TYPE)) { |
||
26 | $data = $stream->expect(Token::STRING_TYPE)->getValue(); |
||
27 | } |
||
28 | |||
29 | $stream->expect(Token::BLOCK_END_TYPE); |
||
30 | |||
31 | return new JsNode($data, $token->getLine(), $this->getTag()); |
||
32 | } |
||
41 | } |