Closed jfalcon closed 1 month ago
The escape sequence \v
is not valid according to the Zig grammer. It is therefore rejected by the compiler (and ZLS).
$ cat sample.zig
const whitespace = [_]u8{ ' ', '\t', '\v', '\n', '\r' };
$ zig ast-check sample.zig
sample.zig:1:40: error: invalid escape character: 'v'
const whitespace = [_]u8{ ' ', '\t', '\v', '\n', '\r' };
Any proposal to change this need to be directed at Zig and not ZLS.
Zig Version
0.13.0
ZLS Version
0.13.0
Client / Code Editor / Extensions
VS Code with Zig Language Extension (ziglang.vscode-zig)
Steps to Reproduce and Observed Behavior
In VS Code, create or open any file with a
.zig
extension and type the following:There's an error for
'\v'
.Expected Behavior
The escape sequence for a vertical tab (
\v
) should be considered valid as it's still used in some systems rather than a new line, etc.Relevant log output