Skip to content
Discussion options

You must be logged in to vote

It's almost right! This is how you use braces to limit the scope:

{
    if (context.TryGetNode<ElseBlockContext>(out var tempBlock))
    {
        var else_block = ...
    }
} // tempBlock ceases to exist beyond this point

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by CyrusNajmabadi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants