Skip to content

Updated the lexer.py code file. #2

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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.

# for free to join this conversation on GitHub. Already have an account? # 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