-
Notifications
You must be signed in to change notification settings - Fork 64
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
Start with python match
statement
#1801
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
...anguage-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/ExpressionHandler.kt
Outdated
Show resolved
Hide resolved
...anguage-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/ExpressionHandler.kt
Outdated
Show resolved
Hide resolved
cpg-language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/Python.kt
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...est/kotlin/de/fraunhofer/aisec/cpg/frontends/python/statementHandler/StatementHandlerTest.kt
Outdated
Show resolved
Hide resolved
...anguage-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/ExpressionHandler.kt
Show resolved
Hide resolved
...anguage-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/ExpressionHandler.kt
Outdated
Show resolved
Hide resolved
...anguage-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/ExpressionHandler.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...est/kotlin/de/fraunhofer/aisec/cpg/frontends/python/statementHandler/StatementHandlerTest.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I like this very much.
Some more nitpicking comments, but I think this is good to be merged :)
We should open an issue to track the not implemented cases...
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Outdated
Show resolved
Hide resolved
...language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/StatementHandler.kt
Show resolved
Hide resolved
...ython/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/python/statementHandler/MatchTest.kt
Outdated
Show resolved
Hide resolved
…ontends/python/StatementHandler.kt Co-authored-by: Maximilian Kaul <[email protected]>
Co-authored-by: Maximilian Kaul <[email protected]>
This PR adds the basic comparisons which can be found in python's
match
statement. The statement is modeled as aSwitchStatement
and the main issue are theCaseStatements
which offer a wide range of checks, some of which we cannot model trivially.