LexError on vertical tab \v
sthiele opened this issue · 2 comments
sthiele commented
Parsing some C++ that uses '\v'
I get the following error.
warning: -- rust-cpp parse error --
warning: There was an error parsing the crate for the rust-cpp build script:
warning: Parsing crate:``:
warning: Error("LexError")
warning: In order to provide a better error message, the build script will exit successfully, such that rustc can provide an error message.
error: unknown character escape: v
--> src/lib.rs:60:27
|
60 | static const char = '\v';
| ^ unknown character escape
ogoffart commented
Right, that's an expected limitation: The code within the macro still need to be valid rust tokens.
I added a notice in the documentation about that in commit a9af87b
So you must change your code to use the ascii escape sequence (i believe that would be \x0b
)
sthiele commented
Thanks