Skip to content

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