lua-minify icon indicating copy to clipboard operation
lua-minify copied to clipboard

Allow for numeric escape sequences

Open n1tehawk opened this issue 8 years ago • 1 comments

Lua strings accept numerical escapes as a "\ddd" sequence, where ddd is 1-3 decimal digits (see Lua Manual, "Lexical Conventions").

This patch makes the parser tolerate escape sequences starting with a digit, copying them to the output as-is. Note that they're not validated in this case.

n1tehawk avatar Aug 14 '17 13:08 n1tehawk

This (partly) fixes #4.

Lua 5.2+ also recognizes \xXX, where XX is a sequence of exactly two hexadecimal digits. This isn't addressed by this PR, and would have to be treated separately.

Regards, NiteHawk

n1tehawk avatar Aug 14 '17 13:08 n1tehawk