When trying to integrate this library into another project I encountered an error regarding the parse.tokenizer.Token class. I was able to reproduce this same error when running the library's tests:
$ zig build test
/src/zig-arg/src/parser/Parser.zig:120:18: error: expected type '*parser.tokenizer.Token', found '*const parser.tokenizer.Token'
if (token.isShortFlag() or token.isLongFlag()) {
~~~~~^~~~~~~~~~~~
/src/zig-arg/src/parser/Parser.zig:120:18: note: cast discards const qualifier
error: test...
By replacing all occurrences of token: *Token with token: *const Token in the function definitions in src/parser/Parser.zig and src/parser/tokenizer.zig this error is no longer encountered.
This is likely caused by some recent changes in the master branch of the Zig compiler.
Zig version: 0.10.0-dev.3685+dae7aeb33
When trying to integrate this library into another project I encountered an error regarding the
parse.tokenizer.Token
class. I was able to reproduce this same error when running the library's tests:By replacing all occurrences of
token: *Token
withtoken: *const Token
in the function definitions insrc/parser/Parser.zig
andsrc/parser/tokenizer.zig
this error is no longer encountered.This is likely caused by some recent changes in the master branch of the Zig compiler.