API Browser

Member group

WithOrigin

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

Overloads / Variants

WithOrigin

func WithOrigin<TSyntax, TSourceSyntax>(syntax: TSyntax, source: MacroSyntaxParseResult<TSourceSyntax>) -> TSyntax where TSyntax: SyntaxNode where TSourceSyntax: SyntaxNode

Source file: TokenTreeMacroContext.cs

Associates generated Raven syntax with the authored span represented by a parsed macro fragment.

Parameters

Name Type Description
syntax TSyntax
source MacroSyntaxParseResult<TSourceSyntax>

Return value

TSyntax

WithOrigin

func WithOrigin<TSyntax>(syntax: TSyntax, bodyRelativeSpan: TextSpan) -> TSyntax where TSyntax: SyntaxNode

Source file: TokenTreeMacroContext.cs

Associates generated Raven syntax with an authored span in this macro's token-tree body for debugging.

Parameters

Name Type Description
syntax TSyntax
bodyRelativeSpan TextSpan

Return value

TSyntax