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

Implementing AST properties using singleton edge lists #1646

Merged
merged 5 commits into from
Aug 29, 2024
Merged

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Aug 7, 2024

This PR implements AST edges for all AST properties. Because of a bug (or rather "known limitation") of Neo4J OGM we need to be a bit tricky in assigning AST edges to single-node properties. Specifically, we need to wrap them into a singleton list of one element.

The major advantage is two-fold:

  • We can now easily set the astParent in the constructor of the AstEdge (and probably do other things as well)
  • We can now traverse all edges in the graph since all properties are now edges and not just those in a list

There is a new allEdges / edges function as well as a new shortcut astEdges to retrieve all AST edges starting from a certain node.

@oxisto oxisto force-pushed the better-property-edges branch from 9d732fc to 37cdb1d Compare August 9, 2024 07:37
Base automatically changed from better-property-edges to main August 9, 2024 12:50
@oxisto oxisto force-pushed the ast-property-edges branch 5 times, most recently from 9250c6d to 676f48a Compare August 14, 2024 18:16
@oxisto oxisto marked this pull request as ready for review August 14, 2024 18:16
Copy link
Contributor

@KuechA KuechA left a comment

Choose a reason for hiding this comment

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

We should probably also re-generate the schema for the documentation when finishing this PR since some names of edges might have changed

@oxisto oxisto force-pushed the ast-property-edges branch 3 times, most recently from 72b2df4 to 7bf397e Compare August 24, 2024 16:45
@oxisto oxisto force-pushed the ast-property-edges branch from 4d94f90 to 31e0b65 Compare August 29, 2024 16:37
@oxisto
Copy link
Member Author

oxisto commented Aug 29, 2024

I want to do another small clean up pass before merging.

Copy link

@oxisto oxisto merged commit 9a57367 into main Aug 29, 2024
3 checks passed
@oxisto oxisto deleted the ast-property-edges branch August 29, 2024 20:29
maximiliankaul pushed a commit that referenced this pull request Sep 5, 2024
* Implementing AST properties using singleton edge lists

This PR is a tryout

* Adding mission relationship annotation

* remove one more addStatement

* Some additional cleanup

* Slightly better naeming for delegate
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

Successfully merging this pull request may close these issues.

2 participants