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

Updated the lexer.py code file. #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vignesh1507
Copy link

t_ignore_newline definition: The t_ignore_newline method is unnecessary because the regular expression r"\n+" is already handled by the t_ignore = " \t\r\n\f\v" statement. This line already tells the lexer to ignore all whitespace, including newlines, so the t_ignore_newline method could be removed to avoid redundancy. If the intent is to track line numbers (which seems to be implied by tok.lexer.lineno), you should ensure that's handled in a different part of the code.

fixed #1

@Querela
Copy link
Owner

Querela commented Oct 8, 2024

Not sure, would need to test this first.

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

Successfully merging this pull request may close these issues.

The t_ignore_newline method is unnecessarily used in this code file src/cql/lexer.py
2 participants