Use of Syntaxtree

Asked

Viewed 40 times

0

I’m studying C# and came across the SyntaxTree while reading about Roslyn.

I also read the documentation of Microsoft itself on the link: Introduction to syntax analysis

However I still have two doubts, just to fix the content I’m studying.

Doubts are:

  • Where Syntaxtree can be really useful in my application?

  • When should I use?

Thank you.

  • For most applications for nothing. It is useful if you are doing some static code analyzer or some similar tool.

1 answer

1

Gean, good afternoon to you! As stated at the beginning of the post that you used as a basis for the question, I could say that the utility in common systems, commercial, would be zero even as already said the great Maniero. The functionality of the class in question comes solely and exclusively to list points of a system structure as quoted below (removal of the initial text):

These data structures have enough detail that they can represent any program of any size. These structures can describe complete programs that compile and run correctly. They can also describe incomplete programs, while you write them in the editor.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.