php8.1: added new octal numbers syntax (#10)

Also fixed a bug where `0X...` and `0B...` were not recognized as valid numbers.
This commit is contained in:
Makhnev Petr
2021-07-31 18:37:01 +03:00
committed by GitHub
parent 8df80651e0
commit 44bbff6073
4 changed files with 10595 additions and 10291 deletions

View File

@@ -29,3 +29,14 @@ func TestNeverTypePHP81(t *testing.T) {
function f(): never {}
`)
}
func TestNumbersPHP81(t *testing.T) {
tester.NewParserPrintTestSuite(t).UsePHP8().Run(`<?php
echo 0x10;
echo 0X10;
echo 0b10;
echo 0B10;
echo 0o10;
echo 0O10;
`)
}