Why is it called C# Syntax Graph (but not C# Syntax Tree) in the Syntax Visualizer tool?

400 Views Asked by At

Here is an image of the Roslyn Syntax Visualizer tool (part of Visual Studio):

Roslyn Syntax Visualizer Graph

As I can see we can use the View Directed Syntax Graph command to display this syntax tree window:

Roslyn Syntax Graph

My question is: Why this window is called Syntax Graph but not Syntax Tree?

Is it because every tree is a graph, but then why didn't they choose the name Syntax Tree as more convenient? Why generalize with the Graph term?

If the syntax tree can be cyclic then can you provide me with an example of C# syntax being a Syntax Graph?

1

There are 1 best solutions below

1
On

That's mostly cause Tree is a Graph ... that is A tree is a graph that has no cycles