Skip to content

Conversation

xavierpinho
Copy link
Contributor

Renders setter assignments as their corresponding set_PropertyName calls, e.g. x.MyProperty = y roughly becomes x.set_MyProperty(y). There are still some edges to be addressed in future PRs; in particular, we should have a general solution for building signatures so we don't keep falling for them.

@xavierpinho xavierpinho added the c# Relates to csharpsrc2cpg label Feb 4, 2025

protected def astForBinaryExpression(binaryExpr: DotNetNodeInfo): Seq[Ast] = {
private def translateBinaryOperatorName(operatorToken: String): Option[String] = {
Map(
Copy link
Contributor

@max-leuthaeuser max-leuthaeuser Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This map could be statically defined once in the companion object.

@xavierpinho xavierpinho merged commit 6d3589b into master Feb 4, 2025
5 checks passed
@xavierpinho xavierpinho deleted the xavierp/c#-setter branch February 4, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c# Relates to csharpsrc2cpg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants