For better readability, please use preformatted text when posting log and code lines.
Please manually convert the Arduino sketch into valid C++ code and see if the error still occurs. See: Convert Arduino file to C++ manually — PlatformIO latest documentation