API Browser

Class

TokenTreeMacroContext

class TokenTreeMacroContext

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

Inheritance: Object → MacroContext → TokenTreeMacroContext

Constructors

3 items

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.
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
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) -> 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.
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.
ParseExpression() -> ExpressionSyntax No summary available.
ParsePattern() -> 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.
ParseType() -> 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.
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…