Skip to content

Conversation

karan-batavia
Copy link
Contributor

No description provided.

val leftAst = astForExpression(createDotNetNodeInfo(coalesceExpression.json(ParserKeys.Left)))
val rightAst = astForExpression(createDotNetNodeInfo(coalesceExpression.json(ParserKeys.Right)))

leftAst ++ rightAst
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably add a <operator>.coalesce so that we can embed the correct semantics

Copy link
Contributor

Choose a reason for hiding this comment

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

Should this not also be a callNode or something similar with the operator you suggested above?

Copy link
Contributor

Choose a reason for hiding this comment

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

@AndreiDreyer Yes, something like callAst(callNode, leftAst ++ rightAst)

|}
|""".stripMargin)

"resolve methodFullName" in {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like AST tests here too, please. Specifically to verify the coalescing operator.

@DavidBakerEffendi DavidBakerEffendi added the c# Relates to csharpsrc2cpg label Jul 22, 2024
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