Open lexidor opened 2 years ago
Describe the bug Hackfmt fails to format files containing xhp class declarations.
xhp class
Standalone code, or other way to reproduce the problem
Placed in file.hack
file.hack
xhp class F { }
Steps to reproduce the behavior:
hackfmt file.hack
Expected behavior
Expected format output like this:
Actual behavior
$ hackfmt file.hack (1,5)-(1,5) Encountered unexpected token `XHP`. File failed to parse without errors
Environment
'Ubuntu 18.04'
'apt-get with dl.hhvm.com repository'
Please include the output of hhvm --version and hh_client --version HipHop VM 4.80.6 (rel) Compiler: 1626798808_939072534 Repo schema: d1ae8e21bf3419a65f12a010527485564e719d07 hackc-80878ab52458a2db6bcc91cf1747df93ca647992-4.80.6
Please include the output of hhvm --version and hh_client --version
hhvm --version
hh_client --version
HipHop VM 4.80.6 (rel) Compiler: 1626798808_939072534 Repo schema: d1ae8e21bf3419a65f12a010527485564e719d07 hackc-80878ab52458a2db6bcc91cf1747df93ca647992-4.80.6
HipHop VM 4.102.7 (rel) Compiler: 1647389495_389373763 Repo schema: d1ae8e21bf3419a65f12a010527485564e719d07 hackc-d09f6f5fa7d62773a2784453de10384260f720d7-4.102.7
HipHop VM 4.128.4 (rel) (non-lowptr) Compiler: 1648578890_742766188 Repo schema: 3bffe303632e801137165e448a12a0707742584f hackc-8b25016efed065c93522fd47cf375a24a364ab71-4.128.4
HipHop VM 4.164.0 (rel) (non-lowptr) Compiler: 1657309234_951459400 Repo schema: c762591bd64e87a7b3be143e72e4a2e69ad9179f hackc-34126416fe6f3d0ed29cbc7bc914e61c3c7607e4-4.164.0
Describe the bug Hackfmt fails to format files containing
xhp class
declarations.Standalone code, or other way to reproduce the problem
Placed in
file.hack
Steps to reproduce the behavior:
hackfmt file.hack
Expected behavior
Expected format output like this:
Actual behavior
Environment
HipHop VM 4.102.7 (rel) Compiler: 1647389495_389373763 Repo schema: d1ae8e21bf3419a65f12a010527485564e719d07 hackc-d09f6f5fa7d62773a2784453de10384260f720d7-4.102.7
HipHop VM 4.128.4 (rel) (non-lowptr) Compiler: 1648578890_742766188 Repo schema: 3bffe303632e801137165e448a12a0707742584f hackc-8b25016efed065c93522fd47cf375a24a364ab71-4.128.4
HipHop VM 4.164.0 (rel) (non-lowptr) Compiler: 1657309234_951459400 Repo schema: c762591bd64e87a7b3be143e72e4a2e69ad9179f hackc-34126416fe6f3d0ed29cbc7bc914e61c3c7607e4-4.164.0