Class
TokenTreeMacroContext
class TokenTreeMacroContext
Namespace: Raven.CodeAnalysis.Macros
Assembly: Raven.CodeAnalysis.dll
Source file: TokenTreeMacroContext.cs
Inheritance: Object → MacroContext → TokenTreeMacroContext
Constructors
3 items
TokenTreeMacroContext(compilation: Compilation, semanticModel: SemanticModel, syntax: FreestandingMacroDeclarationSyntax, cancellationToken?: CancellationToken)
No summary available.
Properties
13 items
ArgumentList: ArgumentListSyntax?
No summary available.
Arguments: ImmutableArray<MacroArgument>
No summary available.
BodySpan: TextSpan
No summary available.
CancellationToken: CancellationToken
No summary available.
Carrier: MacroCarrierSyntax
No summary available.
Compilation: Compilation
No summary available.
DeclarationHeader: MacroDeclarationHeaderSyntax?
No summary available.
ExclamationToken: SyntaxToken
No summary available.
ExpressionArgument: ExpressionSyntax?
No summary available.
Name: NameSyntax
No summary available.
SemanticModel: SemanticModel
No summary available.
Syntax: SyntaxNode
No summary available.
TokenTree: MacroTokenTreeSyntax
No summary available.
Methods
63 items
CreateBodyDiagnostic(bodyRelativeSpan: TextSpan, message: string, severity?: DiagnosticSeverity, code?: string?) -> MacroExpansionDiagnostic
No summary available.
CreateDiagnostic(message: string, severity?: DiagnosticSeverity, syntax?: SyntaxNode?, code?: string?) -> MacroExpansionDiagnostic
No summary available.
Overrides MacroContext.CreateDiagnostic
CreateEmbeddedLanguageProjection(languageId: string, text: string) -> MacroEmbeddedLanguageProjection
Creates a position-preserving embedded-language projection for this macro body.
CreateExpressionFragmentRegion(bodyRelativeSpan: TextSpan, targetType: ITypeSymbol) -> MacroFragmentRegion
Creates an ordinary Raven expression fragment with an expected target type.
CreateFragmentLocal(name: string, type: ITypeSymbol, declarationSpan: TextSpan) -> MacroFragmentLocal
Creates an explicitly typed local declared at a body-relative span in the macro DSL.
CreateFragmentLocal(name: string, type: ITypeSymbol) -> MacroFragmentLocal
Creates an explicitly typed local that a macro can attach to selected fragments.
CreateFragmentParameter(name: string, type: ITypeSymbol, declarationSpan: TextSpan) -> MacroFragmentLocal
Creates a parameter visible inside a Raven fragment and maps it to its declaration in the macro carrier header.
CreateFragmentRegion(kind: MacroFragmentKind, bodyRelativeSpan: TextSpan, locals: ImmutableArray<MacroFragmentLocal>, targetType: ITypeSymbol?) -> MacroFragmentRegion
Creates an ordinary Raven fragment with macro-introduced locals and an optional expression target type.
CreateFragmentRegion(kind: MacroFragmentKind, bodyRelativeSpan: TextSpan, locals: ImmutableArray<MacroFragmentLocal>) -> MacroFragmentRegion
Creates an ordinary Raven fragment and the macro-introduced locals visible inside it.
CreateFragmentRegion(kind: MacroFragmentKind, bodyRelativeSpan: TextSpan) -> MacroFragmentRegion
Creates an ordinary Raven fragment with no macro-introduced locals.
CreateSequenceElementLocal(name: string, sourceExpressionSpan: TextSpan, declarationSpan: TextSpan) -> MacroFragmentLocal
Creates a fragment local whose type is inferred from an authored sequence expression and whose declaration is identified by a body-relative DSL span.
CreateSequenceElementLocal(name: string, sourceExpressionSpan: TextSpan) -> MacroFragmentLocal
Creates a fragment local whose type is inferred from an authored sequence expression.
CreateTokenInfo(token: SyntaxToken, kindName?: string?, classification?: MacroTokenClassification, symbol?: ISymbol?) -> MacroTokenInfo
Creates editor metadata for a token read from this macro body's token stream.
CreateTokenStream() -> MacroTokenStream
No summary available.
CreateUniqueIdentifier(hint?: string) -> IdentifierNameSyntax
Creates identifier-name syntax with a deterministic name that does not collide with authored or previously generated identifiers.
Inherited from MacroContext.CreateUniqueIdentifier
CreateUniqueName(hint?: string) -> string
Creates a deterministic identifier name that does not collide with an identifier authored in the invocation document or returned earlier by this context.
Inherited from MacroContext.CreateUniqueName
Equals(obj: object?) -> bool
Determines whether the specified object is equal to the current object.
Inherited from Object.Equals
GetBodyText() -> string
No summary available.
GetHashCode() -> int
Serves as the default hash function.
Inherited from Object.GetHashCode
GetSymbolInfo(expression: ExpressionSyntax) -> SymbolInfo
Gets symbol information for a parsed Raven expression in the scope of this macro invocation.
GetType() -> Type
Gets the System.Type of the current instance.
Inherited from Object.GetType
GetTypeInfo(expression: ExpressionSyntax) -> TypeInfo
Gets type information for a parsed Raven expression in the scope of this macro invocation.
ParseBlock() -> BlockStatementSyntax
Parses the complete token-tree body as one Raven lexical block while retaining the authored positions of its statements and expressions.
ParseBlock(bodyRelativeSpan: TextSpan) -> BlockStatementSyntax
Parses a region of the token-tree body as one Raven lexical block while retaining the authored positions of its statements and expressions.
ParseBlockResult() -> MacroSyntaxParseResult<BlockStatementSyntax>
No summary available.
ParseBlockResult(bodyRelativeSpan: TextSpan) -> MacroSyntaxParseResult<BlockStatementSyntax>
No summary available.
ParseCompilationUnit() -> CompilationUnitSyntax
No summary available.
ParseCompilationUnit(bodyRelativeSpan: TextSpan) -> CompilationUnitSyntax
No summary available.
ParseCompilationUnitResult() -> MacroSyntaxParseResult<CompilationUnitSyntax>
No summary available.
ParseCompilationUnitResult(bodyRelativeSpan: TextSpan) -> MacroSyntaxParseResult<CompilationUnitSyntax>
No summary available.
ParseExpression() -> ExpressionSyntax
No summary available.
ParseExpression(bodyRelativeSpan: TextSpan) -> ExpressionSyntax
No summary available.
ParseExpressionResult() -> MacroSyntaxParseResult<ExpressionSyntax>
No summary available.
ParseExpressionResult(bodyRelativeSpan: TextSpan) -> MacroSyntaxParseResult<ExpressionSyntax>
No summary available.
ParseMemberDeclaration() -> MemberDeclarationSyntax
No summary available.
ParseMemberDeclaration(bodyRelativeSpan: TextSpan) -> MemberDeclarationSyntax
No summary available.
ParseMemberDeclarationResult() -> MacroSyntaxParseResult<MemberDeclarationSyntax>
No summary available.
ParseMemberDeclarationResult(bodyRelativeSpan: TextSpan) -> MacroSyntaxParseResult<MemberDeclarationSyntax>
No summary available.
ParsePattern() -> PatternSyntax
No summary available.
ParsePattern(bodyRelativeSpan: TextSpan) -> PatternSyntax
No summary available.
ParsePatternResult() -> MacroSyntaxParseResult<PatternSyntax>
No summary available.
ParsePatternResult(bodyRelativeSpan: TextSpan) -> MacroSyntaxParseResult<PatternSyntax>
No summary available.
ParseProjectedExpressionResult(bodyText: string) -> MacroSyntaxParseResult<ExpressionSyntax>
Parses a position-preserving projection of the complete macro body as one Raven expression.
ParseStatement() -> StatementSyntax
No summary available.
ParseStatement(bodyRelativeSpan: TextSpan) -> StatementSyntax
No summary available.
ParseStatementResult() -> MacroSyntaxParseResult<StatementSyntax>
No summary available.
ParseStatementResult(bodyRelativeSpan: TextSpan) -> MacroSyntaxParseResult<StatementSyntax>
No summary available.
ParseType() -> TypeSyntax
No summary available.
ParseType(bodyRelativeSpan: TextSpan) -> TypeSyntax
No summary available.
ParseTypeResult() -> MacroSyntaxParseResult<TypeSyntax>
No summary available.
ParseTypeResult(bodyRelativeSpan: TextSpan) -> MacroSyntaxParseResult<TypeSyntax>
No summary available.
ReadFile(path: string) -> MacroFileReadResult
Reads a text file relative to the invoking source file and observes it as an input to the cached macro expansion.
ReportDiagnostic(diagnostic: Diagnostic) -> ()
No summary available.
Inherited from MacroContext.ReportDiagnostic
ReportDiagnostic(diagnostic: MacroExpansionDiagnostic) -> ()
No summary available.
Inherited from MacroContext.ReportDiagnostic
ReportDiagnostic(message: string, severity?: DiagnosticSeverity, syntax?: SyntaxNode?, code?: string?) -> ()
No summary available.
Inherited from MacroContext.ReportDiagnostic
ReportDiagnostics(diagnostics: IEnumerable<Diagnostic>) -> ()
No summary available.
Inherited from MacroContext.ReportDiagnostics
ReportDiagnostics(diagnostics: IEnumerable<MacroExpansionDiagnostic>) -> ()
No summary available.
Inherited from MacroContext.ReportDiagnostics
ReportDiagnostics<TSyntax>(result: MacroSyntaxParseResult<TSyntax>) -> ()
Reports all parser diagnostics carried by a macro syntax parse result.
Inherited from MacroContext.ReportDiagnostics
RequireSyntax<TSyntax>(syntax: SyntaxNode, message?: string?, code?: string?) -> TSyntax
Requires a syntax node to have the requested shape, reporting a macro diagnostic and returning when it does not.
Inherited from MacroContext.RequireSyntax
ToString() -> string?
Returns a string that represents the current object.
Inherited from Object.ToString
WithOrigin<TSyntax, TSourceSyntax>(syntax: TSyntax, source: MacroSyntaxParseResult<TSourceSyntax>) -> TSyntax
Associates generated Raven syntax with the authored span represented by a parsed macro fragment.
WithOrigin<TSyntax>(syntax: TSyntax, bodyRelativeSpan: TextSpan) -> TSyntax
Associates generated Raven syntax with an authored span in this macro's token-tree body for debugging.
WithOrigins<TSyntax>(syntax: TSyntax, sourceMaps: ImmutableArray<MacroExpansionSourceMap>) -> TSyntax
Associates spans in generated Raven syntax with authored spans in this macro's token-tree body. Each mapping is one-to-one so offsets within a mapped syntax node retain their a…