Skip to content
Discussion options

You must be logged in to vote

We publish a NuGet package that you can use for this: https://www.nuget.org/packages/Azure.Bicep.Core

Here's an example of writing out the syntax tree: https://github.com/anthony-c-martin/samples/blob/main/csharp/bicep-access-syntax-tree/Program.cs - you can try this out here.

For undertanding dependencies between declarations in a file, you're probably going to be more interested in the symbols, which you can also access from the semantic model. See here for an example where we build a symbol graph from the semantic model, and use it to check for cycles:

var symbolGraph = declarationAccessDict
.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@eosfor
Comment options

@anthony-c-martin
Comment options

@eosfor
Comment options

Answer selected by eosfor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants