Ref T4334. Adds test cases for most of the lexer rules: tags, literals, and comments. Remaining lexer rules are mostly difficult to test in isolation, or have a known issue in the case of HEREDOC.
Details
Details
- Reviewers
btrahan Firehed - Maniphest Tasks
- T4334: Support PHP5.4+ syntax in XHPAST
- Commits
- rPHU75feb3d50b23: Add PHPAST test cases for most lexer patterns
The JSON dumps aren't very human readable, so I'm verifying that the parser output is sane using the web UI PHPAST tool before committing it to tests.
Diff Detail
Diff Detail
- Branch
- ast2
- Lint
Lint Passed - Unit
Tests Passed
Event Timeline
src/parser/xhpast/__tests__/data/php-literals.php.test | ||
---|---|---|
13 | This syntax is unusual ("binary string"), but part of the mainline PHP parser. It's a feature which was added circa 5.2 for forward-compatibility with 6.0, but will probably never actually do anything. |
Comment Actions
- Add b"double quotes".
- Add 0xFF (hex literal).
- No 0b10 yet because there's no support.