cppfront
cppfront copied to clipboard
[BUG] In mixed mode cppfront can interfere with string done with raw string literal
Cppfront recognized a line as a cpp2 line but it is in the middle of a raw string literal.
Cpp2 code:
auto a = R"(
i:int = 42;
)";
after compiling with cppfront we get:
// ----- Cpp2 support -----
#include "cpp2util.h"
auto a = R"(
)";
//=== Cpp2 definitions ==========================================================
int i { 42 };
https://godbolt.org/z/qMnerz8cM
Expected: cppfront should treat raw string literals similarly as it treats /* */
comments - there is a need to check if it is in the middle of a raw string literal (like we test if it is in the middle of the comment).