This repository was archived by the owner on Nov 23, 2024. It is now read-only.
Merged
Conversation
…s variables regardless in which construct they might be declared, (also detect redeclared ones)
Codecov Report
@@ Coverage Diff @@
## main #153 +/- ##
==========================================
+ Coverage 92.71% 92.83% +0.12%
==========================================
Files 90 95 +5
Lines 5313 5794 +481
==========================================
+ Hits 4926 5379 +453
- Misses 387 415 +28
|
Member
|
Please fix the warnings that occur when building the documentation: |
lars-reimann
approved these changes
Oct 2, 2023
Member
lars-reimann
left a comment
There was a problem hiding this comment.
Very nice work, thanks a lot!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #90
Summary of Changes
This feature contains many additions to the collection of data when parsing python code (former scope detection).
We now collect: the scope, the classes, the functions, all global variables, all value and target nodes, the parameters as well as all function calls when traversing the AST.
During this traversal, we also determine the symbols for all name nodes.
We distinguish between
GlobalVariables, LocalVariables, ClassVariables, InstanceVariables, ParametersandBuiltins.Furthermore, this feature resolves the references for all name nodes (target and value nodes).
For each name node we determine its scope, as mentioned above, and a list of all referenced symbols and return a
ReferenceNode.