danmar / simplecpp

C++ preprocessor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Escape sequences in character literals are not handled.

keinflue opened this issue · comments

#if '\'' != '\\'
ok
#else
fail
#endif

This results in




fail

when it should result in ok.

It seems that escape sequences in character literals are not handled at all and instead they are interpreted as backslash literal.

If the contribution would be welcome, I could try my hand at implementing support at least partially. It seems simplifyNumbers just requires special casing for the possible escape sequences.

If the contribution would be welcome, I could try my hand at implementing support at least partially. It seems simplifyNumbers just requires special casing for the possible escape sequences.

Yes your contribution would be highly welcome.

This issue was resolved with #216.