ext/rbs_extension/lexer.re in rbs-3.3.2 vs ext/rbs_extension/lexer.re in rbs-3.4.0.pre.1

- old
+ new

@@ -95,10 +95,14 @@ "void" { return next_token(state, kVOID); } "use" { return next_token(state, kUSE); } "as" { return next_token(state, kAS); } "__todo__" { return next_token(state, k__TODO__); } - dqstring = ["] ("\\"[abefnrstv"\\] | [^"\\\x00])* ["]; + unicode_char = "\\u" [0-9a-fA-F]{4}; + oct_char = "\\x" [0-9a-f]{1,2}; + hex_char = "\\" [0-7]{1,3}; + + dqstring = ["] (unicode_char | oct_char | hex_char | "\\" [^xu] | [^\\"\x00])* ["]; sqstring = ['] ("\\"['\\] | [^'\x00])* [']; dqstring { return next_token(state, tDQSTRING); } sqstring { return next_token(state, tSQSTRING); } ":" dqstring { return next_token(state, tDQSYMBOL); }