reid-llvm/examples/macro_easy.reid

10 lines
246 B
Plaintext

import std::String;
import std::print;
fn main() -> u8 {
// - TODO possibly allow to cast between &[ty] and *ty
let bytes = test_macro!("./macro_easy_file.txt");
print(String::new() + bytes.length());
return (bytes as *u8)[0];
}