API Browser

Method

RequireSyntax

func RequireSyntax<TSyntax>(syntax: SyntaxNode, message: string? = null, code: string? = null) -> TSyntax where TSyntax: SyntaxNode

Declaring type: MacroContext
Namespace: Raven.CodeAnalysis.Macros
Assembly: Raven.CodeAnalysis.dll
Source file: MacroContext.cs

Requires a syntax node to have the requested shape, reporting a macro diagnostic and returning when it does not.

Parameters

Name Type Description
syntax SyntaxNode
message String?
code String?

Return value

TSyntax