quote_expr_encoded

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

Lowering target for quote { ... }: canonical parser tokens are embedded in the macro service image and decoded without scanning source text.

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