Skip to content
New issue

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

C# - too many tokens from operators and numbers #2256

Closed
wiktorInny opened this issue Oct 22, 2022 · 1 comment
Closed

C# - too many tokens from operators and numbers #2256

wiktorInny opened this issue Oct 22, 2022 · 1 comment

Comments

@wiktorInny
Copy link

import pygments
from pygments.lexers import get_lexer_by_name

source='''
int a = 5;
int b = 15;
if (a == 5)
b++;
'''

lexer = get_lexer_by_name("csharp", stripall=True)
pygmentsTokens = list(lexer.get_tokens_unprocessed(source))
print(pygmentsTokens)

Operator == produce 2 tokens =, operator ++ too.
Number 15 produce two number tokens: 1 and 5.

@birkenfeld
Copy link
Member

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants