Additional information passed along during statement creation.
auto tryGetBlock(const ASTContext& context,
SyntaxNode& syntax) -> const Statement*
- Attempts to match up the head of the block list with the given statement syntax node.
- void observeTiming(const TimingControl& timing)
- Observes that the given timing control has been created and checks it for correctness given the current statement context.
- auto enterLoop(bool isForLoop = false) -> auto
- Records that we've entered a loop, and returns a guard that will revert back to the previous state on destruction.
span<const StatementBlockSymbol*const > blocks
- A series of block symbols that are expected to be used, in order, during the creation of the statement tree.
- bitmask<StatementFlags> flags
- Tracks various bits of context about where we are in statement creation.
- SourceRange lastEventControl
- A source range indicating the last event control observed while creating statements.
- const ASTContext& rootAstContext
- The context used for creating statements.
const Statement* slang::
ast:: Statement:: StatementContext:: tryGetBlock(const ASTContext& context,
const syntax:: SyntaxNode& syntax)
Attempts to match up the head of the block list with the given statement syntax node.
If they match, the block symbol is popped and returned wrapped inside a BlockStatement. Otherwise nullptr is returned.