We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The stb C lexer consumes one extra character when parsing a char literal.
This can be demonstrated with this code:
stb_lexer l = {0}; char source[] = "char lit = 'A';"; char store[1024]; stb_c_lexer_init(&l, source, source+sizeof(source)-1, store, sizeof(store)); while (stb_c_lexer_get_token(&l)) { printf("%d: %.*s\n", l.token, l.where_lastchar-l.where_firstchar+1, l.where_firstchar); }
which outputs:
260: char 260: lit 61: = 263: 'A';
when we expected:
260: char 260: lit 61: = 263: 'A' 59: ;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The stb C lexer consumes one extra character when parsing a char literal.
This can be demonstrated with this code:
which outputs:
when we expected:
The text was updated successfully, but these errors were encountered: