quote_decl_encoded

func quote_decl_encoded(source_id: Int, source: String, encoded: String, splices: [SyntaxSplice<Decl>], context: &QuoteContext) -> SyntaxResult<Decl>

Lowering target for quote decl { ... } (ADR 0026 wrapper macros).

View Source
pub func quote_decl_encoded(source_id: Int, source: String, encoded: String, splices: [SyntaxSplice<Decl>], context: &QuoteContext) -> SyntaxResult<Decl> {
	if let .some(input) = capture_macro_input(source_id: source_id, source: source, encoded: encoded) {
		return quote_decl(input: input, splices: splices, context: context)
	}
	SyntaxResult<Decl>(
		value: .none,
		failure: .some(SyntaxFailure(
			code: "syntax.quote.invalid-tokens",
			message: "Quotation token records are invalid",
			span: 0..<0
		))
	)
}