Namespace
Raven.Macros
namespace Raven.Macros
Macros
9 items
macro Compile(context: TokenTreeMacroContext) -> ()
Quotes a Raven expression and compiles it into the requested delegate type.
macro EmbedFileContent(path: string, context: FreestandingMacroContext) -> ()
Embeds the UTF-8 text content of a file as a string literal.
macro Error(target: UnionDeclarationSyntax, context: AttachedMacroContext) on Type -> ()
Derives Raven's standard error contract for a union.
macro ErrorMessage(message: ExpressionSyntax, target: CaseDeclarationSyntax, context: AttachedMacroContext) on Type -> ()
Supplies the message for one case of a union derived with `#[Error]`.
macro Json(context: TokenTreeMacroContext) -> ExpressionSyntax<JsonObject>
Constructs a `System.Text.Json.Nodes.JsonObject` from JSON-shaped source.
macro Quote(context: TokenTreeMacroContext) -> ()
Quotes a Raven expression as an immutable Raven syntax tree.
macro Sha256Digest(value: ExpressionSyntax, context: FreestandingMacroContext) -> ()
Computes the SHA-256 digest of a literal value during compilation.
macro Timer(context: TokenTreeMacroContext) -> StatementSyntax
Measures an ordinary Raven block body with `System.Diagnostics.Stopwatch` and writes the elapsed duration. An optional message template uses `{time}` for the elapsed duration while…
macro Xml(context: TokenTreeMacroContext) -> ExpressionSyntax<XElement>
Constructs a `System.Xml.Linq.XElement` from XML-shaped source.