Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updated the lexer.py code file.#2

Open
vignesh1507 wants to merge 1 commit into
Querela:main from
vignesh1507:main
Open

Updated the lexer.py code file. #2
vignesh1507 wants to merge 1 commit into
Querela:main from
vignesh1507:main

Conversation

@vignesh1507

@vignesh1507 vignesh1507 commented Oct 4, 2024

Copy link
Copy Markdown

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 commented Oct 8, 2024

Copy link
Copy Markdown
Owner

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

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

AltStyle によって変換されたページ (->オリジナル) /