include_tt 1.1.0

Macros for ultra-flexible injection of compiler trees, literals, or binary data into Rust syntax trees from external sources.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use include_tt::inject;

#[test]
fn test_fix_unktoken() {
	#[allow(unused_assignments)] // bug?
	let mut b = 20;
	assert_eq!("\\".len(), 1);
	inject! {
		// File contains: `\ b = 30; \`
		#ctt("./tests/invalid_token.tt")
	}

	assert_eq!(b, 30);
}