Fix handling of escaped \ in char or string.
This commit is contained in:
parent
9b2a214cbe
commit
6a0525254e
@ -31,10 +31,10 @@ const char *COMMENT_AND_STRING_REGEX =
|
||||
"/\\*.*?\\*/" // C-style comments, '/* ... */'
|
||||
"|"
|
||||
// Anything inside single quotes, '...', but mind the escaped quote
|
||||
"'(?:\\\\'|.)*?'"
|
||||
"'(?:\\\\\\\\|\\\\'|.)*?'"
|
||||
"|"
|
||||
// Anything inside double quotes, "...", but mind the escaped double quote
|
||||
"\"(?:\\\\\"|.)*?\"";
|
||||
"\"(?:\\\\\\\\|\\\\\"|.)*?\"";
|
||||
|
||||
const char *IDENTIFIER_REGEX = "[_a-zA-Z]\\w*";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user