API Browser

Method

ParseProjectedExpressionResult

func ParseProjectedExpressionResult(bodyText: string) -> MacroSyntaxParseResult<ExpressionSyntax>

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

Parses a position-preserving projection of the complete macro body as one Raven expression.

Parameters

Name Type Description
bodyText String

Return value

MacroSyntaxParseResult<ExpressionSyntax>

Remarks

The projection must have the same length and line breaks as the authored body. This lets a macro temporarily replace its own delimiters or holes with Raven syntax while retaining authored diagnostic positions.