mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-12-04 02:07:59 +01:00
5f73c4de80
Move doc string parsing logic from rebuildParsers.php and String_::parseDocString() into ParserAbstract. This stuff is going to get complicated now. For now only implement the validation of the indentation on the end label.
25 lines
450 B
Plaintext
25 lines
450 B
Plaintext
Error conditions for flexible doc strings
|
|
-----
|
|
<?php
|
|
|
|
<<<A
|
|
@@{ "\t" }@@A;
|
|
|
|
<<<A
|
|
FooBar
|
|
@@{ "\t" }@@A;
|
|
-----
|
|
Invalid indentation - tabs and spaces cannot be mixed from 4:1 to 4:3
|
|
Invalid indentation - tabs and spaces cannot be mixed from 8:1 to 8:3
|
|
array(
|
|
0: Stmt_Expression(
|
|
expr: Scalar_String(
|
|
value:
|
|
)
|
|
)
|
|
1: Stmt_Expression(
|
|
expr: Scalar_String(
|
|
value: FooBar
|
|
)
|
|
)
|
|
) |