kphp
kphp copied to clipboard
improve `#define` directives handling during the preprocessing
Right now, user can't write #define FFI_LIB "foo.so" (note: several spaces between the FFI_LIB and string literal). PHP does support this, so KPHP should as well.
The relevant code looks like this: https://github.com/VKCOM/kphp/blob/ff4e29f8cda8455350fc4c3079899292bb3e6dac/compiler/ffi/ffi_parser.cpp#L38-L52
That code could also benefit from some unit tests that make sure that preprocessed source keeps the lines number.