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

Need to get last line number in addition to declaration start line number #3

Open
Enliven26 opened this issue Nov 25, 2024 · 2 comments

Comments

@Enliven26
Copy link

Enliven26 commented Nov 25, 2024

            if isinstance(declaration, node.ClassDeclaration):
                parent_string = str(declaration)

Currently I'm trying to get the last line number of certain declaration. However, using above method and calculating the length of the declaration, it might give different result from the source file since it ignores comments and blank lines

@Enliven26
Copy link
Author

nvm I modified the library by myself

@Enliven26 Enliven26 changed the title Need to get last line in addition to declaration position Need to get last line number in addition to declaration start line number Nov 25, 2024
@Enliven26 Enliven26 reopened this Nov 25, 2024
@Enliven26
Copy link
Author

I reopen because someone else might find the same issue

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

1 participant